[PATCH] Patch for bug 12105

Jeremy Allison jra at samba.org
Wed Aug 3 22:03:21 UTC 2016


On Wed, Aug 03, 2016 at 11:34:04PM +0200, Ralph Böhme wrote:
> On Wed, Aug 03, 2016 at 09:25:12AM -0700, Jeremy Allison wrote:
> > On Wed, Aug 03, 2016 at 03:27:12PM +0200, Ralph Böhme wrote:
> > > Hi!
> > > 
> > > Andreas pointed out that I introduced a regression to async_req that
> > > can cause smbclient (and other callers) to eat 100% CPU.
> > > 
> > > Attached patch fixes this for me:
> > > 
> > > $ bin/smbclient -L 10.10.10.10 -U%
> > > Connection to 10.10.10.10 failed (Error NT_STATUS_HOST_UNREACHABLE)
> > > 
> > > $ bin/smbclient -L www.heise.de -U%
> > > Connection to www.heise.de failed (Error NT_STATUS_IO_TIMEOUT)
> > > 
> > > Please review & push if ok.
> > 
> > Oh wow - this is a subtle one !
> > 
> > But yep - man page and OpenGroup page checks out...
> > 
> >       EINPROGRESS
> >               The  socket  is nonblocking and the connection cannot be completed immediately.
> > 
> >        EALREADY
> >               The socket is nonblocking and a previous connection attempt has not yet been completed.
> > 
> > http://pubs.opengroup.org/onlinepubs/009695399/functions/connect.html
> > 
> > Who coud have guessed connect() had these semantics with
> > multiple calls (not me, obviously :-).
> 
> oh my, I knew that connect had this semantics when I broke this. :/

I didn't, that's why I +1'ed the original patch :-).



More information about the samba-technical mailing list