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

Re: tpool cleanup?

Pierangelo Masarati wrote:
Playing with Hallvard's thread debugging code I came into something that
looks strange: slapd does tpool init/cleanup fine, while tools don't.

I wasn't paying attention the first time this email came around. The back-bdb tools *do* use the thread pool in Quick mode. slapd/init.c rev 1.96 breaks slapadd/slapindex now, which was using the thread pool to spawn its indexing threads.

Looking at things in a bit more detail, what I found out is that both
slapd create the connection_pool (while tools clearly don't need it) but
then slapd first calls ldap_pvt_thread_pool_destroy() for it and then
calls ldap_int_thread_pool_shutdown() from inside
ldap_pvt_thread_destroy(); the tools, on the contrary, just call
ldap_int_thread_pool_shutdown() from inside ldap_pvt_thread_destroy(),
which results in an error condition. I've solved it the way it's
committed, but I don't understand why ldap_int_thread_pool_shutdown()
doesn't just shutdown and destroy the connection_pool.
 -- Howard Chu
 Chief Architect, Symas Corp.  http://www.symas.com
 Director, Highland Sun        http://highlandsun.com/hyc
 OpenLDAP Core Team            http://www.openldap.org/project/