My home server's vscand just got itself into a loop consuming a CPU while read returned 0 bytes.

A bit of D got the stack where it was doing this:

  0   3910                      read:return
              libc.so.1`__read+0x7
              vscand`vs_icap_read+0x25
              vscand`vs_icap_send_chunk+0x3e
              vscand`vs_icap_respmod_request+0xcf
              vscand`vs_icap_scan_file+0x184
              vscand`vs_svc_scan_file+0xd1
              vscand`vs_svc_async_scan+0x22
              libc.so.1`_thrp_setup+0x9b
              libc.so.1`_lwp_start

  0   3910                      read:return
              libc.so.1`__read+0x7
              vscand`vs_icap_read+0x25
              vscand`vs_icap_send_chunk+0x3e
              vscand`vs_icap_respmod_request+0xcf
              vscand`vs_icap_scan_file+0x184
              vscand`vs_svc_scan_file+0xd1
              vscand`vs_svc_async_scan+0x22
              libc.so.1`_thrp_setup+0x9b
              libc.so.1`_lwp_start

Unfortunately I did not get the name of the file is was reading (although I suspect it was a network connection).

The source confirms that it can't handle a return of 0 bytes:

   1173 vs_icap_read(int fd, char *buf, int len)
   1174 {
   1175         char *ptr = buf;
   1176         int resid = len;
   1177         int bytes_read = 0;
   1178
   1179         while (resid > 0) {
   1180                 errno = 0;
   1181                 bytes_read = read(fd, ptr, resid);
   1182                 if (bytes_read < 0) {
   1183                         if (errno == EINTR)
   1184                                 continue;
   1185                         else
   1186                                 return (-1);
   1187                 }
   1188                 resid -= bytes_read;
   1189                 ptr += bytes_read;
   1190         }
   1191
   1192         return (len - resid);
   1193 }

I suspect the problem coincides with a virus engine being restarted.

I'll file a bug next week when I'm back in the office.


--
Sent from my OpenSolaris Laptop
_______________________________________________
cifs-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/cifs-discuss

Reply via email to