Date: Sun, 2 Dec 2007 10:26:16 -0300 From: Daniel Molina Wegener <dmw@unete.cl> To: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: problems with pthread_testcancel Message-ID: <200712021026.16840.dmw@unete.cl>
next in thread | raw e-mail | index | archive | help
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!
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200712021026.16840.dmw>