Full_Name: Hallvard B Furuseth
Version: HEAD
OS: Linux
URL:
Submission from: (NULL) (129.240.202.105)
Submitted by: hallvard
slapadd uses slap_op_mutex uninitialized in operation.c:slap_op_time()
>>>>> Starting test049-sync-config ...
running defines.sh
== thr_debug: Leaked 1 mutexes. ==
Starting producer slapd on TCP/IP port 9011...
thr_debug.c:432: ldap_pvt_thread_mutex_lock error: usage->magic is 0
./scripts/test049-sync-config: line 47: 6207 Aborted (core
dumped) $SLAPADD -F $CFPRO -n 0 -l $CONFLDIF
Using ldapsearch to check that producer slapd is running...
(gdb) backtrace
...
#3 0x0818efbd in check_usage (usage=0x8253018, msg=0x6 "") at thr_debug.c:432
#4 0x08190779 in ldap_pvt_thread_mutex_lock (mutex=0x8253000) at
thr_debug.c:978
#5 0x0809150e in slap_op_time (t=0xbfffd3a0, nop=0xbfffd3a4) at
operation.c:125
#6 0x08080f54 in connection_fake_init2 (conn=0xbfffd548, op=0xbfffd398,
ctx=0x8275160, newmem=0) at connection.c:2053
#7 0x08080db1 in connection_fake_init (conn=0x0, op=0x0, ctx=0x0) at
connection.c:2000
#8 0x0806e870 in config_setup_ldif (be=0x82cb1e8, dir=0x8277008
"/usit/bombur/site/hbf/scratch/ldap/ldap/HEAD/tests/testrun/pro/slapd.d",
readit=1) at bconfig.c:3451
#9 0x0806ec91 in read_config (fname=0x0, dir=0x8277008
"/usit/bombur/site/hbf/scratch/ldap/ldap/HEAD/tests/testrun/pro/slapd.d")
at bconfig.c:3574
#10 0x080e04bc in slap_tool_init (progname=0x81cef70 "slapadd", tool=1, argc=10,
argv=0xbfffee54) at slapcommon.c:510
#11 0x080de993 in slapadd (argc=0, argv=0x0) at slapadd.c:70
#12 0x08066142 in main (argc=10, argv=0xbfffee54) at main.c:645
(gdb) frame 3
#3 0x0818efbd in check_usage (usage=0x8253018, msg=0x6 "") at thr_debug.c:432
432 ERROR( usage->magic, msg );
(gdb) print *usage
$2 = {magic = 0, self = 0, mem = {ptr = 0x0, num = 0}, state = 0}
Configuration:
CPPFLAGS='-DLDAP_REL_ENG -DLDAP_THREAD_DEBUG -DLDAP_RDWR_DEBUG' \
./configure --prefix=/hbf/scratch/ldap/install/head \
--enable-crypt --enable-dynacl --enable-aci --enable-lmpasswd \
--enable-spasswd --enable-modules --enable-rlookups \
--enable-slapi --enable-slp --enable-wrappers \
--enable-backends --disable-sql --enable-overlays
Any hope of making the tools and slapd go through the same init/destroy code
in main(), maybe by making the server just another "tool"? Seems to me the
only hope of making bugs like this keep popping up...