From owner-freebsd-threads@FreeBSD.ORG Fri Nov 11 04:29:31 2005 Return-Path: X-Original-To: freebsd-threads@freebsd.org Delivered-To: freebsd-threads@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 78AAD16A420 for ; Fri, 11 Nov 2005 04:29:31 +0000 (GMT) (envelope-from freebsd@spatula.net) Received: from turing.morons.org (morons.org [64.147.161.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6B2AC43D5F for ; Fri, 11 Nov 2005 04:29:30 +0000 (GMT) (envelope-from freebsd@spatula.net) Received: from localhost (localhost.morons.org [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id C619F17046; Thu, 10 Nov 2005 20:29:34 -0800 (PST) Received: from turing.morons.org ([127.0.0.1]) by localhost (turing.morons.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 12069-07; Thu, 10 Nov 2005 20:29:25 -0800 (PST) Received: by turing.morons.org (Postfix, from userid 1001) id 9777B17044; Thu, 10 Nov 2005 20:29:25 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by turing.morons.org (Postfix) with ESMTP id 945C117036; Thu, 10 Nov 2005 20:29:25 -0800 (PST) Date: Thu, 10 Nov 2005 20:29:25 -0800 (PST) From: Nick Johnson X-X-Sender: spatula@turing.morons.org To: Gabriel Becedillas In-Reply-To: <1139bd2a4492e98c3fcf367d5dc1ba00@gmail.com> Message-ID: <20051110202052.O44305@turing.morons.org> References: <1139bd2a4492e98c3fcf367d5dc1ba00@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: amavisd-new at morons.org Cc: freebsd-threads@freebsd.org Subject: Re: pthreads and segmentation fault X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2005 04:29:31 -0000 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. 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