[Date Prev][Date Next] [Chronological] [Thread] [Top]

(ITS#8871) mutex issue with cancel operation



Full_Name: HsuenJu Ko
Version: 2.4.46
OS: VOS
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (198.97.42.5)


A multi-threaded test case using C API experiences a hang involving
cancel operation.  One thread which performs cancel operation hangs
waiting for a mutex(ld_conn_mutex) in ldap_send_initial_request while
the other thread is performing ldap_result loop waiting for the result
of search operation. The same mutex is held by wait4msg() across the
ldap_int_select() call.  It appears that before the ITS#6672 is installed,
the ld_conn_mutex is unlocked before the ldap_int_select() and after the
ITS#6672 the unlock is moved after ldap_int_select() which causes
the thread performing the cancel to hang until ldap_result returns.
By holding this mutex across select(), then all other threads needing
the mutex are frozen until this select completes.