https://bugs.openldap.org/show_bug.cgi?id=8901
--- Comment #10 from Howard Chu hyc@openldap.org --- (In reply to Marcelo.DeCastroLoebens from comment #9)
(In reply to Howard Chu from comment #8)
Fix in https://git.openldap.org/openldap/openldap/-/merge_requests/888 please test.
Thanks for the fix and the speedy replies.
I will start testing the integration of this patch with our system. Will need some time (can't say for sure how much) since the occurrence is low, I will leave a test env cycling the shutdown over a bunch of times, then report here the results.
For reference, the direct way to verify this fix is to check for proper thread pool cleanup after throwing a bit of load at the server.
I did this using test008 in the test suite.
tests% ./run -k test008
The -k flag tells it not to kill slapd after the test finishes. Then attach to the server with gdb and set a breakpoint on the last line of the ldap_pvt_thread_pool_close() function. (tpool.c:907 with this patch). Then send slapd a signal to tell it to shutdown. When it hits the breakpoint, there should be no more threadpool worker threads left.
I've tested on Linux and Windows and verified proper cleanup here.