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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



   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

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

--
389-devel mailing list
389-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-directory-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux