All of lore.kernel.org
 help / color / mirror / Atom feed
* debugging threaded apps running under a clone(CLONE_NEWPID)
@ 2009-02-20 16:56 Cedric Le Goater
  2009-02-23 18:21 ` Serge E. Hallyn
  0 siblings, 1 reply; 7+ messages in thread
From: Cedric Le Goater @ 2009-02-20 16:56 UTC (permalink / raw)
  To: Linux Containers; +Cc: Linux Kernel Mailing List

Hello !

to debug threaded apps, gdb uses a special libthread_db which seeks in the
symbols of the exec the list of running threads. This list contains the glibc 
'struct pthread' descriptor with pids and tids which values are relative 
to the namespace in which the threads were created.  

unless you run gdb in the same pid namespace, gdb will not see any thread
in the debugged app. this is frustrating for some scenarios and some 
support from the kernel would be needed to address this issue. Here
are some ideas :

   . enter a pid namespace. hard.  

   . expose the pid numbers of a task in its pid namespaces, through some 
     ways like /proc/self/stat or /proc/self/pids and modify gdb to make 
     the conversion.

How would you do it ? 

Thanks,

C.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-24 14:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20 16:56 debugging threaded apps running under a clone(CLONE_NEWPID) Cedric Le Goater
2009-02-23 18:21 ` Serge E. Hallyn
     [not found]   ` <20090223182153.GD13151-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2009-02-24  9:51     ` Cedric Le Goater
2009-02-24  9:51       ` Cedric Le Goater
2009-02-24 11:28       ` Greg Kurz
2009-02-24 12:09         ` Cedric Le Goater
2009-02-24 14:52       ` Serge E. Hallyn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.