[Date Prev][Date Next]
[Chronological]
[Thread]
[Top]
(ITS#7142) slapadd with tool-threads hangs on failure
Full_Name: Hallvard B Furuseth
Version: 2.4.28, master
OS: Linux x86_64
URL: http://folk.uio.no/hbf/toobig.sh
Submission from: (NULL) (195.1.106.125)
Submitted by: hallvard
slapadd hangs if bi_tool_entry_put() fails.
Tested with back-ldif patched for bi_tool_entry_put() to return NOID
after 6 entries, and on master with mdb and an LDIF > DB maxsize.
Test program enclosed. Backtrace:
Thread 2 (Thread 0x7fb3745fd700 (LWP 31479)):
#0 0x000000371fc0b3dc in pthread_cond_wait@@GLIBC_2.3.2 ()
from /lib64/libpthread.so.0
#1 0x000000000048acaf in getrec_thr (ctx=<value optimized out>)
at slapadd.c:296
#2 0x000000371fc077f1 in start_thread () from /lib64/libpthread.so.0
Thread 1 (Thread 0x7fb37542e7c0 (LWP 31478)):
#0 0x000000371fc0804d in pthread_join () from /lib64/libpthread.so.0
#1 0x000000000048a8e5 in slapadd (argc=<value optimized out>,
argv=<value optimized out>) at slapadd.c:454
#2 0x0000000000406ea5 in main (argc=5, argv=<value optimized out>)
at main.c:655
I don't want to touch that code, don't remember why nearby code uses
ldap_pvt_tread_yield() instead of the clean way of having two conds
(one for producer and one for consumer to wait for).