Full_Name: Hallvard B Furuseth
Version: RE23
OS: Linux
URL:
Submission from: (NULL) (129.240.6.233)
Submitted by: hallvard
/configure \
--disable-dynamic --disable-aci --enable-crypt --enable-lmpasswd \
--enable-spasswd --enable-rlookups --enable-slapi --enable-wrappers \
--enable-backends --disable-sql --enable-overlays \
CPPFLAGS='-DLDAP_THREAD_DEBUG -DLDAP_RDWR_DEBUG'
./run -b hdb test043-delta-syncrepl
server 1 crashes at accesslog.c line 918, which unlocks &li->li_op_mutex
when it is owned by another thread.
(Can also check it by setting li_unlock = (int) ldap_pvt_thread_self()
instead of 1 after lock, and assert()ing the same before unlock.)
accesslog_op_mod() has a comment
/* FIXME: this needs to be a recursive mutex to allow
* overlays like refint to keep working.
*/
ldap_pvt_thread_mutex_lock( &li->li_op_mutex );
but this problem is not recursive use of the mutex.
(gdb) thread apply all backtrace
Thread 4 (process 10963):
#0 0x007e87a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00a64297 in pthread_join () from /lib/tls/libpthread.so.0
#2 0x081f0f62 in ldap_int_thread_join (thread=20061088, thread_return=0x0)
at thr_posix.c:193
#3 0x081c3de4 in ldap_pvt_thread_join (thread=20061088, thread_return=0x0)
at thr_debug.c:612
#4 0x0807bb54 in slapd_daemon () at daemon.c:2579
#5 0x08066554 in main (argc=8, argv=0xbfffefd4) at main.c:859
Thread 3 (process 10965):
#0 0x007e87a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x008cb82e in epoll_wait () from /lib/tls/libc.so.6
#2 0x0807ae29 in slapd_daemon_task (ptr=0x0) at daemon.c:2174
#3 0x00a633cc in start_thread () from /lib/tls/libpthread.so.0
#4 0x008cb1ae in clone () from /lib/tls/libc.so.6
Thread 2 (process 10967):
#0 0x007e87a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x008bc29b in __write_nocancel () from /lib/tls/libc.so.6
#2 0x0086064f in _IO_new_file_write () from /lib/tls/libc.so.6
#3 0x0086089c in _IO_new_file_xsputn () from /lib/tls/libc.so.6
#4 0x00855af1 in fputs () from /lib/tls/libc.so.6
#5 0x081f6160 in lutil_debug (debug=261, level=1,
fmt=0x8237950 "<= key_change %d\n") at debug.c:89
#6 0x0814f485 in hdb_key_change (be=0x3061d24, db=0x838d518, txn=0x839bfe0,
k=0xb7bba47c, id=16, op=1) at key.c:101
#7 0x0814e7ca in indexer (op=0x83799c0, txn=0x839bfe0, ad=0x830c6e8,
atname=0x830d21c, vals=0x839aaa0, id=16, opid=1, mask=1814) at index.c:244
#8 0x0814e9a3 in index_at_values (op=0x83799c0, txn=0x839bfe0, ad=0x830c6e8,
type=0x830d1e0, tags=0x830c6f8, vals=0x839aaa0, id=16, opid=1)
at index.c:324
#9 0x0814eb05 in hdb_index_values (op=0x83799c0, txn=0x839bfe0,
desc=0x830c6e8, vals=0x839aaa0, id=16, opid=1) at index.c:373
#10 0x0814eec1 in hdb_index_entry (op=0x83799c0, txn=0x839bfe0, opid=1,
e=0x83946e8) at index.c:544
#11 0x0813ce65 in hdb_add (op=0x83799c0, rs=0x306218c) at add.c:304
#12 0x080e8903 in overlay_op_walk (op=0x83799c0, rs=0x306218c, which=op_add,
oi=0x830c800, on=0x0) at backover.c:650
#13 0x080e8ab8 in over_op_func (op=0x83799c0, rs=0x306218c, which=op_add)
at backover.c:702
#14 0x080e8bc4 in over_op_add (op=0x83799c0, rs=0x306218c) at backover.c:748
#15 0x080869e1 in fe_op_add (op=0x83799c0, rs=0x306218c) at add.c:342
#16 0x08086457 in do_add (op=0x83799c0, rs=0x306218c) at add.c:182
#17 0x0807e428 in connection_operation (ctx=0x3062218, arg_v=0x83799c0)
at connection.c:1133
#18 0x081c1d40 in ldap_int_thread_pool_wrapper (xpool=0x82c86c8) at tpool.c:478
#19 0x00a633cc in start_thread () from /lib/tls/libpthread.so.0
#20 0x008cb1ae in clone () from /lib/tls/libc.so.6
Thread 1 (process 10976):
#0 0x007e87a2 in _dl_sysinfo_int80 () from /lib/ld-linux.so.2
#1 0x00829815 in raise () from /lib/tls/libc.so.6
#2 0x0082b279 in abort () from /lib/tls/libc.so.6
#3 0x081c2b9e in error (file=0x82749bd "thr_debug.c", line=784,
msg=0x82750a0 "ldap_pvt_thread_mutex_unlock", var=0x8274d72 "rc", val=1)
at thr_debug.c:155
#4 0x081c44ec in ldap_pvt_thread_mutex_unlock (mutex=0x830cd04)
at thr_debug.c:784
#5 0x08183fdf in accesslog_response (op=0x8386bc8, rs=0x220318c)
at accesslog.c:918
#6 0x08184f14 in accesslog_mod_cleanup (op=0x8386bc8, rs=0x220318c)
at accesslog.c:1241
#7 0x0808fcca in send_ldap_response (op=0x8386bc8, rs=0x220318c)
at result.c:458
#8 0x080903f1 in slap_send_ldap_result (op=0x8386bc8, rs=0x220318c)
at result.c:574
#9 0x0813d474 in hdb_add (op=0x8386bc8, rs=0x220318c) at add.c:409
#10 0x080e8903 in overlay_op_walk (op=0x8386bc8, rs=0x220318c, which=op_add,
oi=0x830c800, on=0x0) at backover.c:650
#11 0x080e8ab8 in over_op_func (op=0x8386bc8, rs=0x220318c, which=op_add)
at backover.c:702
#12 0x080e8bc4 in over_op_add (op=0x8386bc8, rs=0x220318c) at backover.c:748
#13 0x080869e1 in fe_op_add (op=0x8386bc8, rs=0x220318c) at add.c:342
#14 0x08086457 in do_add (op=0x8386bc8, rs=0x220318c) at add.c:182
#15 0x0807e428 in connection_operation (ctx=0x2203218, arg_v=0x8386bc8)
at connection.c:1133
#16 0x081c1d40 in ldap_int_thread_pool_wrapper (xpool=0x82c86c8) at tpool.c:478
#17 0x00a633cc in start_thread () from /lib/tls/libpthread.so.0
#18 0x008cb1ae in clone () from /lib/tls/libc.so.6