Bug 173915 - Can't attach to process with "hand-made" threads
Can't attach to process with "hand-made" threads
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: gdb (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jan Kratochvil
Jay Turner
Depends On:
Blocks: 200951
  Show dependency treegraph
Reported: 2005-11-22 11:28 EST by Bastien Nocera
Modified: 2015-01-07 19:11 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-02-24 12:41:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Bastien Nocera 2005-11-22 11:28:00 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:

             | CLONE_DETACHED
             | 0);
Comment 1 Jan Kratochvil 2006-07-29 19:44:17 EDT
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.
Comment 2 Andrew Cagney 2006-07-31 12:03:27 EDT
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.
Comment 4 Jay Turner 2006-08-01 13:57:29 EDT
QE ack.  Bastian, hopefully you can help us out with testing or provide a testcase?
Comment 7 RHEL Product and Program Management 2006-08-18 12:58:39 EDT
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
Comment 10 RHEL Product and Program Management 2007-02-24 12:41:18 EST
Development Management has reviewed and declined this request.  You may appeal
this decision by reopening this request. 

Note You need to log in before you can comment on or make changes to this bug.