http://bugzilla.opensuse.org/show_bug.cgi?id=1171128
http://bugzilla.opensuse.org/show_bug.cgi?id=1171128#c5
--- Comment #5 from William Brown ---
That is not correct. No extra patches to affect shutdown have been added.
You have threads created with:
ldap_pvt_thread_create(..., ldap_int_thread_pool_wrapper, ...)
On shutdown you have the following loop:
while (pq->ltp_open_count) {
ldap_pvt_thread_cond_broadcast(&pq->ltp_cond);
ldap_pvt_thread_cond_wait(&pq->ltp_cond, &pq->ltp_mutex);
}
And the ldap_int_thread_pool_wrapper performs the decrement on shutdown:
pq->ltp_open_count--;
This is from your git master. These integer operations are non-atomic, and
un-fenced, meaning that it is possible (and likely) that there may be
disagreements between ltp_open_count between your threads. It appears also that
ltp_active_count and ltp_finishing, and many other variables are also
non-atomic, meaning that this thread pool is unsound and may have effects on
systems at scale during shutdown that are non-deterministic. I think it's
beyond my ability to resolve this in openldap as I am not familiar enough with
the code base, but it is from my view very plausible that this is the cause of
the issues.
As a result, the patch stays.
--
You are receiving this mail because:
You are on the CC list for the bug.