Howard Chu wrote:
Michael Ströder wrote:
Now gdb backtrace of hanging test008 with HEAD and compiled with only -O2:
OK, please try current HEAD again. It's reverted to the original epoll behavior (level-triggered) so this type of problem can no longer occur. Also I've found that setting the descriptor to edge-triggered after-the-fact works, so it still prevents the endless hangup reports from happening.
There was only a change to servers/slapd/daemon.c. Is that right? Still I see hangs in test008 with HEAD.
Ciao, Michael.
Thread 18 (Thread 0xb7641b90 (LWP 15588)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7a24c26 in epoll_wait () from /lib/libc.so.6 #2 0x0806617f in slapd_daemon_task (ptr=0x0) at daemon.c:2291 #3 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #4 0xb7a2438e in clone () from /lib/libc.so.6
Thread 17 (Thread 0xb7240b90 (LWP 15589)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d057b9 in __lll_lock_wait () from /lib/libpthread.so.0 #2 0xb7d00cd1 in _L_lock_89 () from /lib/libpthread.so.0 #3 0xb7d005b2 in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0xb7efaffd in ldap_pvt_thread_mutex_lock (mutex=0x837a5f8) at thr_posix.c:296 #5 0x0815f2cc in monitor_cache_lock (e=0x835f3bc) at cache.c:117 #6 0x0810b1a5 in monitor_send_children (op=0x837d338, rs=0xb72400c8, e_parent=<value optimized out>, sub=1) at search.c:144 #7 0x0810b21c in monitor_send_children (op=0x837d338, rs=0xb72400c8, e_parent=<value optimized out>, sub=1) at search.c:123 #8 0x0810b62d in monitor_back_search (op=0x837d338, rs=0xb72400c8) at search.c:245 #9 0x0806bbc3 in fe_op_search (op=0x837d338, rs=0xb72400c8) at search.c:366 #10 0x0806c438 in do_search (op=0x837d338, rs=0xb72400c8) at search.c:217 #11 0x0806970b in connection_operation (ctx=0xb72401cc, arg_v=0x837d338) at connection.c:1100 #12 0x0806a167 in connection_read_thread (ctx=0xb72401cc, argv=0x1c) at connection.c:1226 #13 0xb7efa400 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:663 #14 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #15 0xb7a2438e in clone () from /lib/libc.so.6
Thread 16 (Thread 0xb653db90 (LWP 15716)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 15 (Thread 0xb583ab90 (LWP 15736)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 14 (Thread 0xb4b37b90 (LWP 15757)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d057b9 in __lll_lock_wait () from /lib/libpthread.so.0 #2 0xb7d00cd1 in _L_lock_89 () from /lib/libpthread.so.0 #3 0xb7d005b2 in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0xb7efaffd in ldap_pvt_thread_mutex_lock (mutex=0x837a5f8) at thr_posix.c:296 #5 0x0815f2cc in monitor_cache_lock (e=0x835f3bc) at cache.c:117 #6 0x0810b1a5 in monitor_send_children (op=0x8385510, rs=0xb4b370c8, e_parent=<value optimized out>, sub=1) at search.c:144 #7 0x0810b21c in monitor_send_children (op=0x8385510, rs=0xb4b370c8, e_parent=<value optimized out>, sub=1) at search.c:123 #8 0x0810b62d in monitor_back_search (op=0x8385510, rs=0xb4b370c8) at search.c:245 #9 0x0806bbc3 in fe_op_search (op=0x8385510, rs=0xb4b370c8) at search.c:366 #10 0x0806c438 in do_search (op=0x8385510, rs=0xb4b370c8) at search.c:217 #11 0x0806970b in connection_operation (ctx=0xb4b371cc, arg_v=0x8385510) at connection.c:1100 #12 0x0806a167 in connection_read_thread (ctx=0xb4b371cc, argv=0x14) at connection.c:1226 #13 0xb7efa400 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:663 #14 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #15 0xb7a2438e in clone () from /lib/libc.so.6
Thread 13 (Thread 0xb4635b90 (LWP 15775)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 12 (Thread 0xb3932b90 (LWP 15776)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d057b9 in __lll_lock_wait () from /lib/libpthread.so.0 #2 0xb7d00cd1 in _L_lock_89 () from /lib/libpthread.so.0 #3 0xb7d005b2 in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0xb7efaffd in ldap_pvt_thread_mutex_lock (mutex=0x837a5f8) at thr_posix.c:296 #5 0x0815f2cc in monitor_cache_lock (e=0x835f3bc) at cache.c:117 #6 0x0810b1a5 in monitor_send_children (op=0x838a7c0, rs=0xb39320c8, e_parent=<value optimized out>, sub=1) at search.c:144 #7 0x0810b21c in monitor_send_children (op=0x838a7c0, rs=0xb39320c8, e_parent=<value optimized out>, sub=1) at search.c:123 #8 0x0810b62d in monitor_back_search (op=0x838a7c0, rs=0xb39320c8) at search.c:245 #9 0x0806bbc3 in fe_op_search (op=0x838a7c0, rs=0xb39320c8) at search.c:366 #10 0x0806c438 in do_search (op=0x838a7c0, rs=0xb39320c8) at search.c:217 #11 0x0806970b in connection_operation (ctx=0xb39321cc, arg_v=0x838a7c0) at connection.c:1100 #12 0x0806a167 in connection_read_thread (ctx=0xb39321cc, argv=0x22) at connection.c:1226 #13 0xb7efa400 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:663 #14 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #15 0xb7a2438e in clone () from /lib/libc.so.6
Thread 11 (Thread 0xb3430b90 (LWP 15781)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 10 (Thread 0xb272db90 (LWP 15824)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 9 (Thread 0xb1229b90 (LWP 15841)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 8 (Thread 0xb0e28b90 (LWP 15854)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 7 (Thread 0xb0825b90 (LWP 15857)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 6 (Thread 0xafb22b90 (LWP 15873)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 5 (Thread 0xaf721b90 (LWP 15885)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0xb77b0610, mutex=0xb77b05f8) at thr_posix.c:277 #3 0x0807a468 in send_ldap_ber (conn=0xb77b0500, ber=0xaf71fde4) at result.c:217 #4 0x0807c48b in slap_send_search_entry (op=0x839d138, rs=0xaf7210c8) at result.c:1246 #5 0x0810b30a in monitor_send_children (op=0x839d138, rs=0xaf7210c8, e_parent=0x835f3bc, sub=1) at search.c:115 #6 0x0810b21c in monitor_send_children (op=0x839d138, rs=0xaf7210c8, e_parent=<value optimized out>, sub=1) at search.c:123 #7 0x0810b62d in monitor_back_search (op=0x839d138, rs=0xaf7210c8) at search.c:245 #8 0x0806bbc3 in fe_op_search (op=0x839d138, rs=0xaf7210c8) at search.c:366 #9 0x0806c438 in do_search (op=0x839d138, rs=0xaf7210c8) at search.c:217 #10 0x0806970b in connection_operation (ctx=0xaf7211cc, arg_v=0x839d138) at connection.c:1100 #11 0x0806a167 in connection_read_thread (ctx=0xaf7211cc, argv=0x1e) at connection.c:1226 #12 0xb7efa400 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:663 #13 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #14 0xb7a2438e in clone () from /lib/libc.so.6
Thread 4 (Thread 0xaf11eb90 (LWP 15887)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d057b9 in __lll_lock_wait () from /lib/libpthread.so.0 #2 0xb7d00cd1 in _L_lock_89 () from /lib/libpthread.so.0 #3 0xb7d005b2 in pthread_mutex_lock () from /lib/libpthread.so.0 #4 0xb7efaffd in ldap_pvt_thread_mutex_lock (mutex=0x837a5f8) at thr_posix.c:296 #5 0x0815f2cc in monitor_cache_lock (e=0x835f3bc) at cache.c:117 #6 0x0810b1a5 in monitor_send_children (op=0x83a4810, rs=0xaf11e0c8, e_parent=<value optimized out>, sub=1) at search.c:144 #7 0x0810b21c in monitor_send_children (op=0x83a4810, rs=0xaf11e0c8, e_parent=<value optimized out>, sub=1) at search.c:123 #8 0x0810b62d in monitor_back_search (op=0x83a4810, rs=0xaf11e0c8) at search.c:245 #9 0x0806bbc3 in fe_op_search (op=0x83a4810, rs=0xaf11e0c8) at search.c:366 #10 0x0806c438 in do_search (op=0x83a4810, rs=0xaf11e0c8) at search.c:217 #11 0x0806970b in connection_operation (ctx=0xaf11e1cc, arg_v=0x83a4810) at connection.c:1100 #12 0x0806a167 in connection_read_thread (ctx=0xaf11e1cc, argv=0x12) at connection.c:1226 #13 0xb7efa400 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:663 #14 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #15 0xb7a2438e in clone () from /lib/libc.so.6
Thread 3 (Thread 0xaed1db90 (LWP 15897)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 2 (Thread 0xae91cb90 (LWP 15898)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7d02c35 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #2 0xb7efb094 in ldap_pvt_thread_cond_wait (cond=0x82ba4f4, mutex=0x82ba4dc) at thr_posix.c:277 #3 0xb7efa472 in ldap_int_thread_pool_wrapper (xpool=0x82ba4d8) at tpool.c:654 #4 0xb7cff1b5 in start_thread () from /lib/libpthread.so.0 #5 0xb7a2438e in clone () from /lib/libc.so.6
Thread 1 (Thread 0xb7864720 (LWP 15573)): #0 0xffffe430 in __kernel_vsyscall () #1 0xb7cff747 in pthread_join () from /lib/libpthread.so.0 #2 0xb7efb1d4 in ldap_pvt_thread_join (thread=3076791184, thread_return=0x0) at thr_posix.c:197 #3 0x08063693 in slapd_daemon () at daemon.c:2663 #4 0x08050ee6 in main (argc=8, argv=0xbf852d54) at main.c:948