This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Segmentation fault on NPTL pthread_join
- From: Roberto Podesta' <ropode at dist dot unige dot it>
- To: amodra at bigpond dot net dot au
- Cc: binutils at sources dot redhat dot com
- Date: Wed, 16 Nov 2005 10:04:31 +0100
- Subject: Re: Segmentation fault on NPTL pthread_join
Hi,
we have just discovered that the problem was caused by our source code: the NPTL
configuration exposed a problem with the stack sizes used in thread creation
that did not show up with LinuxThreads.
We apologize for this.
Thanks for your help.
Best Regards,
Roberto
Alan Modra amodra@bigpond.net.au wrote:
>On Tue, Nov 08, 2005 at 05:23:01PM +0100, Roberto Podesta' wrote:
>> Hi,
>> we have recently moved a large C/C++ multithreaded application
>> (running on a PowerPC platform) from LinuxThreads
>> to NPTL, and we are having problems we didn't see with the previous (i.e.,
>> LinuxThreads) configuration. In particular,
>> when a thread tries for the first time to terminate another one by calling
>> pthread_cancel and then pthread_join, we get a
>> segmentation fault (all the threads are created joinable). By looking at
>> the corresponding core file, the problem seems
>> to occur in NPTL file pthread_join.c at line 86, where there is a call to
>> lll_wait_tid.
>Do any of your threads dlopen and dlclose shared libraries? If so, you
>might be in the situation where one or more threads have an unmapped
>shared library function somewhere in their function call chain. This
>can result in seg faults when pthread_cancel attempts to unwind the
>stack.
>
>--
>Alan Modra
>IBM OzLabs - Linux Technology Centre
--
Roberto Podesta' - DIST University of Genoa
Via Opera Pia 13, 16145 Genoa (Italy)
Tel. +39 10 3532709
ropode@dist.unige.it