[PATCH] Patch for bug 12105

Ralph Böhme slow at samba.org
Wed Aug 3 21:34:04 UTC 2016


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. :/

> Reviewed-by: Jeremy Allison <jra at samba.org>

Thanks!

Cheerio!
-slow



More information about the samba-technical mailing list