Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Nov 2005 20:29:25 -0800 (PST)
From:      Nick Johnson <freebsd@spatula.net>
To:        Gabriel Becedillas <gabriel.becedillas@gmail.com>
Cc:        freebsd-threads@freebsd.org
Subject:   Re: pthreads and segmentation fault
Message-ID:  <20051110202052.O44305@turing.morons.org>
In-Reply-To: <1139bd2a4492e98c3fcf367d5dc1ba00@gmail.com>
References:  <1139bd2a4492e98c3fcf367d5dc1ba00@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
What happens if you use libmap to point pthreads at libc_r using 
/etc/libmap.conf?

You'll need something like this:

[/usr/local/jdk1.4.2/] 
libpthread.so.1         libc_r.so.5
libpthread.so           libc_r.so

I've seen basically the same behaviour with Java. See:

 	http://www.freebsd.org/cgi/query-pr.cgi?pr=threads/84778

Things that are utterly broken with libpthread (kse) often will work just 
fine with libc_r.

But of course there are no bugs in libpthread and KSE works 
flawlessly.</sarcasm>


On Fri, 11 Nov 2005, Gabriel Becedillas wrote:

> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051110202052.O44305>