[389-devel] Please review: Bug 526319 - SASL IO sometimes loops with "error: would block"

Nathan Kinder nkinder at redhat.com
Tue Sep 29 22:33:11 UTC 2009


On 09/29/2009 02:52 PM, Rich Megginson wrote:
>    https://bugzilla.redhat.com/show_bug.cgi?id=526319
>    Resolves: bug 526319
>    Bug Description: SASL IO sometimes loops with "error: would block"
>    Reviewed by: ???
>    Fix Description: The semantics for recv() are that it returns -1 
> for errors,
> 0 for connection closed, and non-zero for some bytes received.  The 
> sasl code w
> as not using those semantics - it was returning 0 for successful read 
> and -1 for
> error.  Although I have not been able to reproduce the exact failure, 
> what I be
> lieve is happening is that the initial read of the packet length in 
> sasl_io_star
> t_packet() works, and the sasl IO is received.  At some point, the 
> connection is
>    closed by the client, and the PR_Recv return of 0 is not handled 
> correctly,
> and somehow the errno gets set to EWOULDBLOCK.  From this point on, 
> PR_Recv() wi
> ll return -1 (since the socket has been closed) and errno is not reset 
> from EWOU
> LDBLOCK.
>    The fix is to make sure the sasl IO code handles the PR_Recv() 
> return value
>    correctly.
>    Note that with CONNS (8) error log level, you may still 
> occasionally see "wo
> uld block" errors, but as long as they are not endlessly repeating, 
> this should
>    be ok.
>    Platforms tested: RHEL5 x86_64
>    Flag Day: no
>    Doc impact: no
> https://bugzilla.redhat.com/attachment.cgi?id=363058&action=diff
ack
> ------------------------------------------------------------------------
>
> --
> 389-devel mailing list
> 389-devel at redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-directory-devel
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/fedora-directory-devel/attachments/20090929/7a230d8e/attachment.htm>


More information about the Fedora-directory-devel mailing list