[SCM] Samba Shared Repository - branch master updated - b881d2ee78f685aea7ae8b67b3e0fb3c4f5205ed

Volker Lendecke Volker.Lendecke at SerNet.DE
Mon Oct 27 18:52:49 GMT 2008


On Mon, Oct 27, 2008 at 11:36:29AM -0700, Jeremy Allison wrote:
> >     [s3]winbind: fix smbd hanging on Solaris when winbindd closes socket.
> >     
> >     On some versions of Solaris, we observed a strange effect of close(2)
> >     on a socket: After the server (here winbindd) called close, the client fd
> >     was not marked as readable for select. And a write call to the fd did
> >     not produce an error EPIPE but just returned as if successful.
> 
> What versions ? Is this a known bug ? Sounds perfectly horrid. More
> info please !

This was a customer's system and took AGES to find. From
time to time, in arbitrary winbind calls, smbd would just
hang doing nothing for 30 seconds. We just could not find
anything in the logs, just that the smbd request never made
it to winbind. Eventually I found the culprit many minutes
in the logfile before: winbind had idled the smbd that later
hung, and the select for readability (our check for havin
been idled) wb_common.c did not trigger. So smbd happily
sent its data through the socket that winbind had already
closed. smbd thus waits for the 30 second wb_common timeout.
This one-byte write solves this: It makes the winbind socket
in smbd readable when it should not be, thus triggering our
check properly.

This is on a Solaris 8 box of unknown patchlevel at a
customer site, which for some reason I don't know can't be
patched. But as this one-byte write should not hurt
anything, I think it is safe to put upstream. If you need
the exact system level, I can ask.

Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20081027/e2ba45cb/attachment.bin


More information about the samba-technical mailing list