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

Re: commit: ldap/servers/slapd main.c (init schema early)



On Aug 9, 2005, at 5:12 PM, Hallvard B Furuseth wrote:
Donn Cave writes:
[ ... re call ldap_pvt_thread_initialize() early .. ]

Works for NetBSD 2.0.  Without this change, slapd -T a fails:

slapd: Error detected by libpthread: Invalid mutex.
Detected by file "/big/builds/ab/netbsd-2-0- RELEASE/src/lib/
libpthread/pthread_mutex.c", line 133, function "pthread_mutex_destroy".



Can you get a backtrace to see which mutex?

That would be ldap_pvt_thread_pool_mutex. Trace appended.

That looks like another
problem - that slapd destroys a mutex it never initialized. If moving
ldap_pvt_thread_initialize() fixes it, it might just be hiding the bug.

Well, that's another way to look at it: if you don't call initialize(), then you shouldn't call shutdown().

BTW, which OpenLDAP version?

HEAD for the trace below, 2.3.4, etc.

    Donn Cave, donn@u.washington.edu

#0  0x483ebfbb in kill () from /usr/lib/libc.so.12
#1  0x483cc6d5 in pthread__errorfunc () from /usr/lib/libpthread.so.0
#2  0x483c9450 in pthread_mutex_destroy () from /usr/lib/libpthread.so.0
#3  0x080eee48 in ldap_int_thread_pool_shutdown ()
    at /usr/local/src/openldap-head/libraries/libldap_r/tpool.c:114
#4  0x080ee26b in ldap_pvt_thread_destroy ()
    at /usr/local/src/openldap-head/libraries/libldap_r/threads.c:58
#5  0x0807d5b1 in slap_destroy ()
    at /usr/local/src/openldap-head/servers/slapd/init.c:263
#6  0x080a0337 in slap_tool_destroy ()
    at /usr/local/src/openldap-head/servers/slapd/slapcommon.c:605
#7  0x0809edfb in slapadd (argc=5, argv=0xbfbffb74)
    at /usr/local/src/openldap-head/servers/slapd/slapadd.c:379
#8  0x0804d1ff in main (argc=5, argv=0xbfbffb74)
    at /usr/local/src/openldap-head/servers/slapd/main.c:514
#9  0x0804cbe2 in ___start ()