Subject: OpenLDAP 2.3.11nb2 pthread problems
To: None <tech-pkg@netbsd.org>
From: Matt Dainty <matt@bodgit-n-scarper.com>
List: tech-pkg
Date: 01/15/2006 23:38:31
--=-SkPhSCopQnBMOvztCija
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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

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/libc.so.12
#1  0xbd97d2e5 in pthread__errorfunc () from /usr/lib/libpthread.so.0
#2  0xbd979e94 in pthread_mutex_destroy () from /usr/lib/libpthread.so.0
#3  0xbdbbd9df in ldap_pvt_thread_mutex_destroy ()
from /usr/pkgsrc/databases/openldap/work/openldap-2.3.11/servers/slapd/../.=
./libraries/libldap_r/.libs/libldap_r-2.3.so.0
#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/libc.so.12
#1  0xbd94c233 in abort () from /usr/lib/libc.so.12
#2  0xbd91678e in __assert13 () from /usr/lib/libc.so.12
#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/../.=
./libraries/libldap_r/.libs/libldap_r-2.3.so.0
#11 0xbd97c0ad in pthread_create () from /usr/lib/libpthread.so.0

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
backend.

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.

Cheers

Matt

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDytz3KP58eR+X2TMRArrzAJ9lIzjP786ajSvvMshd2K7tu1Y7fgCeNxTF
Yjn+p/kFrKVrOuZQdLHbXn8=
=0YPB
-----END PGP SIGNATURE-----

--=-SkPhSCopQnBMOvztCija--