Bug 78228 - Cannot find user-level thread for LWP 27549: generic error
Cannot find user-level thread for LWP 27549: generic error
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gdb (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnston
Jay Turner
Depends On:
  Show dependency treegraph
Reported: 2002-11-20 08:34 EST by Johan Walles
Modified: 2015-01-07 19:01 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-21 14:36:51 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 Johan Walles 2002-11-20 08:34:37 EST
Sometimes when using gdb-5.2-2 it starts answering...

Cannot find user-level thread for LWP 27549: generic error


Cannot find new threads: generic error

... anytime I try to give it any command (except help, maybe others).  No
commands never do anything but printing the error message.  Notably, even "quit"
doesn't work, so I have to kill it to get rid of it.

Unforturnately I cannot give you any steps to re-produce this (because I can't
send you the code I'm trying to debug :-(), so I don't really expect you to fix
this soon, but you should be aware of that it's happening.  I think this *is*
provokable though, since I tend to run into it again and again once I've managed
to trigger it once.
Comment 1 Johan Walles 2002-11-21 03:01:15 EST
Some unusual stuff we are doing (that may or may not be related to this) is
using alternative signal stacks (man sigaltstack), installing signal handlers
for SIGSEGV and SIGILL, creating new pthreads with stacks allocated using mmap(NULL,
If you need any additional information that you think I may actually be able to
provide, please ask.
Comment 2 Johan Walles 2002-12-05 05:38:51 EST
I have seen this on IA32 as well, platform -> All.
Comment 3 Johan Walles 2002-12-05 05:43:05 EST
Just discovered that the gdb version on my RHAS2.1/ia32 install is 5.1-1 and not
5.2.  The gdb version on RHAS2.1/ia64 with this problem is still 5.2-2.
Comment 4 Phillip Sessions 2003-04-14 02:11:31 EDT
I have the same issue on IA32.  I have discovered that it will happen if you
link any program against the pthread library even if it doesn't use threads.

To test this I created a very small hello world program. If I build using

cc -g -o tst -lstdc++ tst.cc

I can run the program from gdb.  If I build using 

cc -g -o tst -lstdc++ -lpthread tst.cc

The debugger generates following the messages;

Error while reading shared library symbols:
Cannot find new threads: generic error
Cannot find user-level thread for LWP 25301: no LWP to satisfy query
Comment 5 Phillip Sessions 2003-04-14 02:21:50 EDT
Sorry I forgot the software versions the above example was compiled using;

gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-116.7.2)

Comment 6 Johan Walles 2003-04-14 02:35:46 EDT
Phillip: I think what you are seeing is bug 82640.  You should be able to work
around it by downgrading glibc (more info at bug 82640).
Comment 8 Jeff Johnston 2003-08-21 17:48:55 EDT
Problem 458 is fixed in the current RAWHIDE release.  Could
you try latest RAWHIDE and see if problem persists.

[jjohnstn@tonic]~/test% gdb -nx ./a.out
GNU gdb Red Hat Linux (5.3.90-0.20030710.19rh)
Copyright 2003 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 "ia64-redhat-linux-gnu"...Using host libthread_db
library "/lib/tls/libthread_db.so.1".

(gdb) run argument
Starting program: /home/jjohnstn/test/a.out argument
[Thread debugging using libthread_db enabled]
[New Thread 2305843009213874432 (LWP 9718)]
Argc: 2
[New Thread 2305843009222047936 (LWP 9719)]
exec()ing thread started

Program exited normally.
(gdb) quit
Comment 9 Johan Walles 2003-08-25 05:01:24 EDT
It now works for me using your rawhide gdb on RH9 / i686.  Building that gdb on
a Debian Testing box (glibc 2.3.1 + linuxthreads) however it still shows the
same problem.

This still needs to be verified on RHAS.
Comment 10 Jeff Johnston 2004-09-30 16:52:55 EDT
Never heard back from you regarding verifying RHAS.  I'm afraid we
can't help you with Debian.  This should be fixed in current releases.
Comment 11 John Flanagan 2004-12-21 14:36:51 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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