Debugging and NPTL

Daniel Jacobowitz drow at false.org
Mon May 17 20:32:17 UTC 2004


On Mon, May 17, 2004 at 03:11:45PM -0400, Ali Ijaz Sheikh wrote:
> 
> Hi,
> 
> I have recently started seeing some problems with debugging of multithreaded
> applications with NPTL on 2.6 series kernels.  It seems that GDB is no longer
> being informed of the events occurring in the child threads because
> create_thread (nptl/sysdeps/pthread/create_thread.c) routine does not pass the
> CLONE_PTRACE flag to the clone system call.  For example, if the child thread
> gets a SEGV, the whole thread group is terminated without GDB ever being told.
> 
> When creating a thread in a thread group that is being ptraced, shouldn't the
> child thread be created with a CLONE_PTRACE?  It this a nptl bug?  Or is this
> GDB's fault?
> 
> A simple program that creates a thread and does raise(SIGSEGV) in the child
> thread can be used to reproduce this problem.  Try running that in gdb.

No, it should not be using CLONE_PTRACE.  You didn't say what version
of GDB you were using; you may want to try a newer one.

-- 
Daniel Jacobowitz





More information about the Phil-list mailing list