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

Michael Adam ma at sernet.de
Mon Oct 27 20:28:29 GMT 2008


Volker Lendecke wrote:
> 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: Sorry, I forgot to mention you in the commit message.
I did not mean to steal credits from you, just wanted to
clean out the attic somewhat.

Cheers - Michael

-- 
Michael Adam <ma at sernet.de>
SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
phone: +49-551-370000-0, fax: +49-551-370000-9
AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
http://www.SerNet.DE, mailto: Info @ SerNet.DE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 206 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20081027/1c091187/attachment.bin


More information about the samba-technical mailing list