This is the mail archive of the libc-help@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: pthread_cancel/pthread_join deadlock


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.

Will retry with GDB trunk, as the relevant files have not really changed:
http://repo.or.cz/w/glibc.git/history/64a17f1adde4715bb6607f64decd73b2df9e6852:/nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
http://repo.or.cz/w/glibc.git/history/64a17f1adde4715bb6607f64decd73b2df9e6852:/nptl/nptl-init.c
http://repo.or.cz/w/glibc.git/history/64a17f1adde4715bb6607f64decd73b2df9e6852:/nptl/pthread_cancel.c
http://repo.or.cz/w/glibc.git/history/64a17f1adde4715bb6607f64decd73b2df9e6852:/nptl/pthread_join.c

Regards,
Martin


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]