This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
Re: pthread_cancel/pthread_join deadlock
- From: Martin Koegler <martin dot koegler at chello dot at>
- To: Martin Koegler <martin dot koegler at chello dot at>
- Cc: Paul Pluzhnikov <ppluzhnikov at google dot com>, libc-help at sourceware dot org
- Date: Fri, 20 Dec 2013 19:44:13 +0100
- Subject: Re: pthread_cancel/pthread_join deadlock
- Authentication-results: sourceware.org; auth=none
- References: <20131219214404 dot GA24620 at mail dot zuhause> <CALoOobO-4jwCgws7HmXZgkeKu43n7PAAoyq_=Kj5cRpGK2AXxw at mail dot gmail dot com> <20131220081854 dot GA22814 at mail dot zuhause>
On Fri, Dec 20, 2013 at 09:18:54AM +0100, Martin Koegler wrote:
> On Thu, Dec 19, 2013 at 02:37:41PM -0800, Paul Pluzhnikov wrote:
> > On Thu, Dec 19, 2013 at 1:44 PM, Martin Koegler
> > <martin.koegler@chello.at> wrote:
> > > The following test programs produces very likley a lockup, if it is started via GDB:
> >
> > Does it ever lockup when running outside of GDB?
>
> Inside GDB, it happens very likely. Without GDB, it keeps running for minutes.
>
> If GDB losses signals, this could explain the behaviour:
> __pthread_disable_asynccancel starts waiting for the SIGCANCEL signal,
> but SIGCANCEL never reaches the signal handler.
>
> > We've recently found a gdbserver-induced lockup:
> > https://sourceware.org/ml/gdb-patches/2013-11/msg00361.html
> >
> > This may be a similar bug in the GDB itself.
> >
> > The deadlock didn't reproduce for me under current trunk GDB and trunk
> > GLIBC on Linux/x86_64.
The bugs seems to be fixed in GDB trunk.
Regards,
Martin