Bug 2696

Summary: NPTL libthread_db misbehaves at startup of a static executable
Product: glibc Reporter: Daniel Jacobowitz <drow>
Component: nptlAssignee: Roland McGrath <roland>
Status: RESOLVED FIXED    
Severity: normal CC: glibc-bugs, jan, mkl, r.schwebel
Priority: P2 Flags: fweimer: security-
Version: 2.4   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed: 2006-05-24 20:27:00

Description Daniel Jacobowitz 2006-05-24 20:19:10 UTC
In short, there is no way to either enable libthread_db at _start time for a
static binary, or find the appropriate time to initialize it later.  I propose
allowing it to initialize, and then reporting the "creation" of the first thread
once the pthreads library is initialized.

The patch is here:

  http://sourceware.org/ml/libc-alpha/2006-03/msg00014.html

Without a fix for this problem, GDB can not debug static executables which use NPTL.
Comment 1 Roland McGrath 2006-05-24 20:27:00 UTC
I'm responsible for nptl_db and recall some poking related to this in the past.
I'll look into it, but it won't be before June 5 as I'm leaving for vacation now.
Comment 2 Daniel Jacobowitz 2006-10-25 15:03:34 UTC
Roland, did you ever get a chance to look at this?  Another user just reported a
similar problem on gdb@.
Comment 3 Roland McGrath 2006-10-25 18:55:50 UTC
Sorry, still back burner.  It will be a little while longer before I get to my
libc backlog.
Comment 4 Daniel Jacobowitz 2007-06-27 15:49:55 UTC
Roland checked in an NPTL patch for this and I fixed gdb.