Subject: OpenLDAP 2.3.11nb2 pthread problems
To: None <>
From: Matt Dainty <>
List: tech-pkg
Date: 01/15/2006 23:38:31
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

OpenLDAP 2.3.11nb2 slapd seems to have problems starting on NetBSD/i386

slapd: Error detected by libpthread: Invalid mutex.
Detected by file "/usr/src/lib/libpthread/pthread_mutex.c", line 133,
function "pthread_mutex_destroy".
See pthread(3) for information.

(gdb) bt
#0  0xbd8cb0bb in kill () from /usr/lib/
#1  0xbd97d2e5 in pthread__errorfunc () from /usr/lib/
#2  0xbd979e94 in pthread_mutex_destroy () from /usr/lib/
#3  0xbdbbd9df in ldap_pvt_thread_mutex_destroy ()
from /usr/pkgsrc/databases/openldap/work/openldap-2.3.11/servers/slapd/../.=
#4  0x0808b245 in schema_destroy ()
#5  0x0804e947 in main ()
#6  0x0804e4a6 in ___start ()

Experimenting with different values in $PTHREAD_DIAGASSERT didn't seem
to stop it, the same as the last pthread-related problem I encountered.

Running the test suite fails on the test008-concurrency:

(gdb) bt
#0  0xbd8cb0bb in kill () from /usr/lib/
#1  0xbd94c233 in abort () from /usr/lib/
#2  0xbd91678e in __assert13 () from /usr/lib/
#3  0x080728a6 in ch_malloc ()
#4  0x080b0986 in search_stack ()
#5  0x080b0cd9 in search_candidates ()
#6  0x080b04a2 in bdb_search ()
#7  0x0805fc61 in fe_op_search ()
#8  0x0805f5ad in do_search ()
#9  0x0805de75 in connection_operation ()
#10 0xbdbbcf68 in ldap_int_thread_pool_wrapper ()
from /usr/pkgsrc/databases/openldap/work/openldap-2.3.11/servers/slapd/../.=
#11 0xbd97c0ad in pthread_create () from /usr/lib/

Reverting to the previous version in pkgsrc; 2.2.27nb1 works okay, and
passes the whole test suite.

My PKG_OPTIONS.openldap is set to just 'sasl', along with using the bdb

I haven't tried the latest 2.3.17 yet, any idea which patches in pkgsrc
would be no longer necessary?

Any reason why we seem to make such huge leaps in versions? IIRC at one
point we went from 2.1.30 -> 2.2.13 which broke for me, and now 2.2.27
-> 2.3.11.



Content-Type: application/pgp-signature; name=signature.asc
Content-Description: This is a digitally signed message part

Version: GnuPG v1.4.1 (GNU/Linux)