Red Hat Bugzilla – Bug 173915
Can't attach to process with "hand-made" threads
Last modified: 2015-01-07 19:11:14 EST
When attaching to a process using an old version of the Quadrics library, gdb
fails to attach to some "threads":
Reading symbols from /lib/tls/libpthread.so.0...Reading symbols from
[Thread debugging using libthread_db enabled]
[New Thread 1076535136 (LWP -1)]
Error while reading shared library symbols:
Can't attach LWP -1: No such process
Quadrics creates its "threads" using:
if ((res = __clone (elan3_lwp, stack + ELANLWP_STACK_SIZE,
CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGHAND,
(void *) ctx)) == -1)
Whereas the glibc creates a thread using:
int clone_flags = (CLONE_VM | CLONE_FS | CLONE_FILES | CLONE_SIGNAL
| CLONE_SETTLS | CLONE_PARENT_SETTID
| CLONE_CHILD_CLEARTID | CLONE_SYSVSEM
#if __ASSUME_NO_CLONE_DETACHED == 0
Your installed "libthread_db.so.1" just needs to be compatible with the thread
implementation in the specific application.
Please provide the specific version of the Quadrics (libmpi?) binary library, if
still relevant. Also RHEL4 provides both linuxthreads (now deprecated) and NPTL
threads implementation and it needs to match properly.
In fact more important are the specific memory structures created for the
threads ("struct pthread"). In each case you could provide your own old-MPI(?)
compatible "libthread_db.so.1" implementation, still I am not sure if it is
worth the effort.
RHEL 4.4 contains a technology preview of frysk (http://sourceware.org/frysk),
it would be useful to know if frysk can at least attach to such processes.
QE ack. Bastian, hopefully you can help us out with testing or provide a testcase?
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
Development Management has reviewed and declined this request. You may appeal
this decision by reopening this request.