pthreads and segmentation fault

Gabriel Becedillas gabriel.becedillas at gmail.com
Thu Nov 10 19:31:41 PST 2005


Hi,
I'm getting a segmentation fault on FreeBSD 5.4 using pthreads. I was 
googling around and found that there are a lot of people hitting the 
same bug, but didn't found a solution to it yet.
The active threads on my application are this ones:

(gdb) info threads
* 8 LWP 100052  0x2824231b in pthread_testcancel ()
    from /usr/lib/libpthread.so.1
   7 Thread 7 (sleeping)  0x2823a207 in pthread_mutexattr_init ()
    from /usr/lib/libpthread.so.1
   6 Thread 6 (LWP 100106)  0x282422fb in pthread_testcancel ()
    from /usr/lib/libpthread.so.1
   5 Thread 5 (sleeping)  0x2823a207 in pthread_mutexattr_init ()
    from /usr/lib/libpthread.so.1
   4 Thread 4 (sleeping)  0x2823a207 in pthread_mutexattr_init ()
    from /usr/lib/libpthread.so.1
   3 Thread 3 (runnable)  0x2836af7b in select () from /lib/libc.so.5
   2 Thread 2 (sleeping)  0x2823a207 in pthread_mutexattr_init ()
    from /usr/lib/libpthread.so.1
   1 Thread 1 (runnable)  0x283d49ff in flockfile () from /lib/libc.so.5

My application runs ok on other platforms (Linux and Mac OS X) and 
since there are a lot of people hitting the same bug ( always 
pthread_testcancel() & pthread_mutexattr_init() around ) I think that 
there must be something wrong in FreeBSD pthreads implementation.
I really need to find a solution to my problem as soon as possible. 
Does anyone have a solution to this ?
I've talked to a guy that is hitting the same problem and he told me 
that this is not fixed on FreeBSD 6.0.
Thanks a lot.



More information about the freebsd-threads mailing list