[SCM] Samba Shared Repository - branch master updated -
jra at samba.org
Mon Oct 27 19:09:33 GMT 2008
On Mon, Oct 27, 2008 at 07:52:49PM +0100, 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.
Wow - great debugging !
> 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.
Yeah, it's definately safe, I was wondering what version
of Solaris was so broken and if it was rare whether we
could get the customer to upgrade. But Solaris 8 is common
enough that we need to support it, thanks !
More information about the samba-technical