problems with pthread_testcancel
Daniel Molina Wegener
dmw at unete.cl
Sun Dec 2 05:26:31 PST 2007
Hello,
I'm looking a common problem in many programs with
pthread_testcancel(3). When creating new threads some
programs craches in pthread_testcancel(3).
Now, I'm coding a daemon in C++ using pthreads, but
I don't know where is my mistake or the mistake on the
programs that I run.
Here's the backtrace...
-----8<----------8<----------8<----------8<----------8<-----
#0 0x2819a0ef in pthread_testcancel ()
from /lib/libpthread.so.2
[New Thread 0x8053c00 (LWP 100197)]
[New Thread 0x8053a00 (sleeping)]
[New Thread 0x8053800 (sleeping)]
[New Thread 0x8053600 (sleeping)]
[New Thread 0x8053400 (runnable)]
[New Thread 0x8053200 (LWP 100191)]
[New Thread 0x8053000 (sleeping)]
[New LWP 100182]
(gdb)
(gdb) info threads
* 8 LWP 100182 0x2819a0ef in pthread_testcancel ()
from /lib/libpthread.so.2
7 Thread 0x8053000 (sleeping) 0x2818fb51 in
pthread_mutexattr_init ()
from /lib/libpthread.so.2
6 Thread 0x8053200 (LWP 100191) 0x2819a0af in
pthread_testcancel ()
from /lib/libpthread.so.2
5 Thread 0x8053400 (runnable) 0x280e8a40 in
GCT::ServiceTCP::getSocket (
this=0x0)
at /work/dmw/CXX/gctserver/libgct/src/ServiceTCP.cxx:72
4 Thread 0x8053600 (sleeping) 0x2818fb51 in
pthread_mutexattr_init ()
from /lib/libpthread.so.2
3 Thread 0x8053800 (sleeping) 0x2818fb51 in
pthread_mutexattr_init ()
from /lib/libpthread.so.2
2 Thread 0x8053a00 (sleeping) 0x2818fb51 in
pthread_mutexattr_init ()
from /lib/libpthread.so.2
1 Thread 0x8053c00 (LWP 100197) 0x2819b893 in __error ()
from /lib/libpthread.so.2
Current language: auto; currently c++
(gdb) thread 8
[Switching to thread 8 (LWP 100182)]#0 0x2819a0af in
pthread_testcancel ()
from /lib/libpthread.so.2
(gdb) backtrace
#0 0x2819a0af in pthread_testcancel ()
from /lib/libpthread.so.2
#1 0x2819042f in pthread_mutexattr_init ()
from /lib/libpthread.so.2
#2 0x28170450 in ?? ()
(gdb)
-----8<----------8<----------8<----------8<----------8<-----
Thanks in advance...
--
.O. | Daniel Molina Wegener | C/C++ Developer
..O | dmw [at] unete [dot] cl | FOSS Coding Adict
OOO | FreeBSD & Linux User | Standards Rocks!
More information about the freebsd-questions
mailing list