This is the mail archive of the gdb-prs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

threads/2243: Cannot find user-level thread for LWP during live debug


>Number:         2243
>Category:       threads
>Synopsis:       Cannot find user-level thread for LWP during live debug
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Mar 28 06:28:01 BST 2007
>Closed-Date:
>Last-Modified:
>Originator:     david@mantara.com
>Release:        gdb 6.6-debian
>Organization:
>Environment:
Debian/Unstable, i386 userland running on x86-64 kernel
>Description:
A threaded C++ program, linked against NPTL, cannot be debugged live.  Debugging from a core file is ok.


> ldd BaseLib/UnitTests/.libs/lt-baselibtest 
        linux-gate.so.1 =>  (0xffffe000)
        libbase.so.0 => /home/d/work/ems/Backend/BaseLib/.libs/libbase.so.0 (0xf7fa0000)
        libcppunit-1.12.so.0 => /usr/lib/libcppunit-1.12.so.0 (0xf7f41000)
        libdl.so.2 => /lib/tls/i686/cmov/libdl.so.2 (0xf7f3d000)
        libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf7e58000)
        libm.so.6 => /lib/tls/i686/cmov/libm.so.6 (0xf7e33000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xf7e28000)
        libpthread.so.0 => /lib/tls/i686/cmov/libpthread.so.0 (0xf7e16000)
        libc.so.6 => /lib/tls/i686/cmov/libc.so.6 (0xf7ce4000)
        /lib/ld-linux.so.2 (0xf7fb2000)


The program has a (now) known fault, accessing a stray pointer.  But attempting to run it under gdb produces:


 > libtool gdb BaseLib/UnitTests/baselibtest     
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /home/d/work/ems/Backend/BaseLib/UnitTests/.libs/lt-baselibtest 
warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4
[Thread debugging using libthread_db enabled]
Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find user-level thread for LWP 23249: generic error
(gdb) 


However, from a core file, it succeeds:

 > libtool gdb BaseLib/UnitTests/baselibtest core
*** Warning: inferring the mode of operation is deprecated.
*** Future versions of Libtool will require --mode=MODE be specified.
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /home/d/work/ems/Backend/BaseLib/.libs/libbase.so.0...done.
Loaded symbols for /home/d/work/ems/Backend/BaseLib/.libs/libbase.so.0
Reading symbols from /usr/lib/libcppunit-1.12.so.0...done.
Loaded symbols for /usr/lib/libcppunit-1.12.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /usr/lib/libstdc++.so.6...done.
Loaded symbols for /usr/lib/libstdc++.so.6
Reading symbols from /lib/tls/i686/cmov/libm.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /lib/libgcc_s.so.1...done.
Loaded symbols for /lib/libgcc_s.so.1
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libc.so.6...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...done.
Loaded symbols for /lib/ld-linux.so.2

warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at ffffe0b4
Core was generated by `/home/d/work/ems/Backend/BaseLib/UnitTests/.libs/lt-baselibtest'.
Program terminated with signal 11, Segmentation fault.
#0  0xf7faae30 in Queue::EnqueuePrelocked (this=0x8063620, Data=0x805cee8, 
    Size=2) at Queue.cpp:156
156         Element->_Data = Data;
(gdb) 
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]