[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#3793) thread_pool initialization in tools
Full_Name: Donn Cave
Version: OPENLDAP_REL_ENG_2_3
OS: NetBSD 2.0
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (128.95.135.150)
In slapadd, ldap_pvt_thread_pool_init uses ldap_pvt_thread_pool_mutex before it
has been initialized. That initialization would have happened in
ldap_int_thread_pool_startup(), called by ldap_pvt_thread_initialize(), but in
fact the latter is only called in slapd/main.c after the tool function branch
around line 279 (so only in slapd.)
What works for me is to move ldap_pvt_thread_initialize() to init.c:slap_init(),
so it will be called along with ldap_pvt_thread_pool_init().
NetBSD's pthread_mutex_unlock() aborts if the mutex was never initialized.