[Date Prev][Date Next]
Re: tpool cleanup?
- To: Pierangelo Masarati <firstname.lastname@example.org>
- Subject: Re: tpool cleanup?
- From: Howard Chu <email@example.com>
- Date: Thu, 27 Apr 2006 20:53:33 -0700
- Cc: openldap-devel@OpenLDAP.org
- In-reply-to: <1143839562.4496.21.camel@ando>
- References: <1143839562.4496.21.camel@ando>
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1) Gecko/20060427 SeaMonkey/1.5a
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/