diff options
author | Rich Megginson <rmeggins@redhat.com> | 2009-03-06 20:02:13 +0000 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2009-03-06 20:02:13 +0000 |
commit | 2a355b73670780a972a70bcd40366ace157e1658 (patch) | |
tree | 15922b6de9d9d1d3e638bd6ef86c7791e4beb839 /ldap/servers/slapd/mapping_tree.c | |
parent | a0ece5a1605556b7f05dfeea4394e9b5df714b8d (diff) | |
download | ds-2a355b73670780a972a70bcd40366ace157e1658.tar.gz ds-2a355b73670780a972a70bcd40366ace157e1658.tar.xz ds-2a355b73670780a972a70bcd40366ace157e1658.zip |
Resolves: bug 488866
Bug Description: crash in reliab15 test
Reviewed by: nhosoi (Thanks!)
Fix Description: I could not reproduce the crash, but I think the problem is that the server is not handling the disconnection case correctly. It seems that in the event of disconnection (LDAP_SERVER_DOWN 81 - Can't contact server) the code would continue to read results.
repl5_inc_result_threadmain() will call conn_read_result_ex() in a loop. If conn_read_result_ex() detects a disconnection or an unrecoverable error, it will call conn_disconnect to close the connection, and return CONN_NOT_CONNECTED. Once this happens, the code must not use conn->ld any more. However, the code did not differentiate between the not connected case and other errors, so it would keep trying to read results (in case some errors are recoverable, the thread still has to read all of the pending results). The code has been fixed to handle disconnect cases specially. I also added some additional locking to make sure the result and the abort flags were set/read correctly. Finally, I changed the code that waits for results to come in, so that if the connection has been closed, it will just return immediately.
Platforms tested: RHEL5 x86_64
Flag Day: no
Doc impact: no
Diffstat (limited to 'ldap/servers/slapd/mapping_tree.c')
0 files changed, 0 insertions, 0 deletions