[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
SIGSEGV on recursive pthread_join
From: |
Richard Guenther |
Subject: |
SIGSEGV on recursive pthread_join |
Date: |
Mon, 5 Jan 2004 17:17:47 +0100 (CET) |
Hi!
I'm experiencing a weird behavior with the NPTL threads, as that my
application (sf.net/projects/glame) segfaults upon invocation of a
pthread_join while the main process is currently joining the thread that
tries to do the join. I.e.
main:
pthread_join(thread1)
thread1:
pthread_join(thread2)
...
pthread_join(threadN)
thread2..N:
maybe completed
and now as soon as thread1 joins thread2, the pthread_join() in main
segfaults! The backtrace is not very helpful, it just shows pthread_join
from /lib/tls/libpthread.so.0. If using a libc with debugging symbols,
the failure does _not_ occour!? All threads were launched by main
initially.
This is on Debian unstable, libc6(-dbg) 2.3.2.ds1-10 on a AMD Duron,
kernel 2.6.1-rc1-mm2.
If you want to reproduce this yourself (I tried a simple testcase, but
this didnt work), try
cvs -d:pserver:address@hidden:/cvsroot/glame login
(password empty)
cvs -z3 -d:pserver:address@hidden:/cvsroot/glame co -r v1_0 glame
followed by ./autogen.sh and ./configure --enable-debug --disable-gui &&
make, then inside the src directory type
src> ./cglame
cglame> (test-latency 5)
which should segfault (numbers 1 to 4 which correspond to 3 to 6 threads
including main and one manager work for me, 5 and higher fail).
You may also look into the relevant sources which can be browsed at
http://cvs.sourceforge.net/viewcvs.py/glame/glame/src/filter/filter_ops.c?only_with_tag=v1_0
main blocks in filter_wait(), the collecting thread is in waiter() in
the postprocessing stage which is done via method dispatch which leads to
postprocess_node. As soon as the thread is joined there, the main thread
segfaults.
Any idea what is going wrong here?
Thanks for any hints,
Richard.
- SIGSEGV on recursive pthread_join,
Richard Guenther <=
- Re: SIGSEGV on recursive pthread_join, Jeroen Dekkers, 2004/01/05
- Re: SIGSEGV on recursive pthread_join, Richard Guenther, 2004/01/05
- Re: SIGSEGV on recursive pthread_join, Jeroen Dekkers, 2004/01/05
- Re: SIGSEGV on recursive pthread_join, Richard Guenther, 2004/01/06
- Re: SIGSEGV on recursive pthread_join, Jeroen Dekkers, 2004/01/07
- Re: SIGSEGV on recursive pthread_join, Richard Guenther, 2004/01/08
- Re: SIGSEGV on recursive pthread_join, Andreas Schwab, 2004/01/09
- Re: SIGSEGV on recursive pthread_join, Richard Guenther, 2004/01/08
- Re: SIGSEGV on recursive pthread_join, Jeroen Dekkers, 2004/01/08
- Re: SIGSEGV on recursive pthread_join, Richard Guenther, 2004/01/08