Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 78228 - Cannot find user-level thread for LWP 27549: generic error
Summary: Cannot find user-level thread for LWP 27549: generic error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 2.1
Classification: Red Hat
Component: gdb
Version: 2.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnston
QA Contact: Jay Turner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-20 13:34 UTC by Johan Walles
Modified: 2015-01-08 00:01 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-21 19:36:51 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:561 normal SHIPPED_LIVE Updated gdb and libunwind packages 2004-12-21 05:00:00 UTC

Description Johan Walles 2002-11-20 13:34:37 UTC
Sometimes when using gdb-5.2-2 it starts answering...

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

or...

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 08:01:15 UTC
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,
stackSize, PROT_EXEC | PROT_READ | PROT_WRITE, MAP_ANON | MAP_PRIVATE, -1, 0). 
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 10:38:51 UTC
I have seen this on IA32 as well, platform -> All.

Comment 3 Johan Walles 2002-12-05 10:43:05 UTC
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 06:11:31 UTC
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 06:21:50 UTC
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)
libstdc++-2.96-116.7.2
glibc-devel-2.2.4-31.7



Comment 6 Johan Walles 2003-04-14 06:35:46 UTC
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 21:48:55 UTC
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
[jjohnstn@tonic]~/test%

Comment 9 Johan Walles 2003-08-25 09:01:24 UTC
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 20:52:55 UTC
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 19:36:51 UTC
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.

http://rhn.redhat.com/errata/RHBA-2004-561.html



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