diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-06-23 10:36:52 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-06-23 11:45:22 -0600 |
commit | f70152942727368aa0ce378bdfd54c6bad32e69d (patch) | |
tree | c281e502023c121f996439c080cd4869d3896a75 /ldap/include | |
parent | beb23fe4b5cc15a692a2282b27a49deedb502eda (diff) | |
download | ds-f70152942727368aa0ce378bdfd54c6bad32e69d.tar.gz ds-f70152942727368aa0ce378bdfd54c6bad32e69d.tar.xz ds-f70152942727368aa0ce378bdfd54c6bad32e69d.zip |
Bug 604453 - SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
https://bugzilla.redhat.com/show_bug.cgi?id=604453
Resolves: bug 604453
Bug Description: SASL Stress and Server crash: Program quits with the assertion failure in PR_Poll
Reviewed by: nhosoi (Thanks!)
Branch: master
Fix Description: When the server pushes the SASL IO layer on to the connection
it must do so when there are no other references to the connection. The only
way to do this without introducing more locking is to have the saslbind code
just register the intent to push SASL IO at the next available time. This
cannot be done in the sasl bind code (or any operation code for that matter)
because connection_threadmain() will enable the connection for reading
(and polling) after reading the PDU and before calling the operation
function. Therefore, during the operation function, the connection may be
being actively polled, so we must not access the conn c_prfd.
The best place to push the IO layer is in connection_threadmain, after the
server has notified that there is read ready on the connection, but before
we have actually attempted to read anything. At this point,
connection_threadmain is the only thread that will be accessing the
connection, and if we push or pop the IO layer before calling the read
function, we are guaranteed to have the correct IO layer to use.
The code has been made generic enough to allow for use by the startTLS code
if the need arises.
I also added some more locking in the saslbind code, and changed the sasl IO
code to more closely resemble the way that the NSS code deals with IO
layer push/pop.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
(cherry picked from commit c28fcadfc7812108573e40f13624e11a5a8609e5)
Diffstat (limited to 'ldap/include')
0 files changed, 0 insertions, 0 deletions