Bug 182116 - Cannot find user-level thread for LWP 4256: generic error
Summary: Cannot find user-level thread for LWP 4256: generic error
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 4
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Alexandre Oliva
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 130157 202689
TreeView+ depends on / blocked
 
Reported: 2006-02-20 17:17 UTC by U. George
Modified: 2007-11-30 22:11 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-22 07:37:06 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch for i386 GDB as of CVS 2006-06-14 (7.35 KB, patch)
2006-06-14 10:20 UTC, Jan Kratochvil
no flags Details | Diff
Minimized bug reproducibility test case. (1.13 KB, text/plain)
2006-06-14 10:28 UTC, Jan Kratochvil
no flags Details
Patch for i386 GDB as of CVS 2006-06-14 [rewritten] (5.04 KB, patch)
2006-06-23 14:31 UTC, Jan Kratochvil
no flags Details | Diff
Extracted the CVS-committed (exec(2)-non following / minimized) patch (892 bytes, patch)
2006-08-01 16:04 UTC, Jan Kratochvil
no flags Details | Diff

Description U. George 2006-02-20 17:17:39 UTC
Description of problem:
Cannot find user-level thread for LWP 4256: generic error


Version-Release number of selected component (if applicable):
GNU gdb Red Hat Linux (6.3.0.0-1.84rh)

How reproducible:
3+ years reproducible

Steps to Reproduce:
1.download a sun jdk ( www.javasoft.com ). It appears that any java jdk
(1.4/1.5/1.6 ) shows this problem
2. gdb /home/gat/JAVA/JDK15/jdk1.5.0_05/bin/javac
3. r
  
Actual results:
This GDB was configured as "i386-redhat-linux-gnu"...
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/libthread_db.so.1".

(gdb) r
Starting program: /home/gat/JAVA/JDK15/jdk1.5.0_05/bin/javac
Reading symbols from shared object read from target memory...(no debugging
symbols found)...done.
Loaded system supplied DSO at 0x742000
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 8029888 (LWP 4256)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Cannot find user-level thread for LWP 4256: generic error
(gdb)


Expected results:
[gat@MyLaptop ~]$ /home/gat/JAVA/JDK15/jdk1.5.0_05/bin/javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files
  -cp <path>                 Specify where to find user class files
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -d <directory>             Specify where to place generated class files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
 -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system

[gat@MyLaptop ~]$


Additional info:
The javac thread did not die. it appears to be in a "T" state. 
from google, it appears that this bug has been around for a couple of years.

Comment 1 Jan Kratochvil 2006-06-14 10:20:31 UTC
Created attachment 130812 [details]
Patch for i386 GDB as of CVS 2006-06-14

It is only a heuristic as execve(2) destroys %gs and gdb(1) fails to find the
no longer existing threads through TLS. Patch will warn and turn off the gdb(1)
threads support if it finds out %gs==0.

Comment 2 Jan Kratochvil 2006-06-14 10:28:04 UTC
Created attachment 130814 [details]
Minimized bug reproducibility test case.

Comment 3 Jan Kratochvil 2006-06-23 14:31:34 UTC
Created attachment 131435 [details]
Patch for i386 GDB as of CVS 2006-06-14 [rewritten]

TARGET_WAITKIND_EXECD suggested by Daniel Jacobowitz.

Comment 4 Jan Kratochvil 2006-07-25 11:14:44 UTC
FYI Daniel Jacobowitz committed improved minimized (non-TARGET_WAITKIND_EXECD
fixup only) patch to the upstream CVS:

2006-07-24  Jan Kratochvil  <jan.kratochvil>
            Daniel Jacobowitz  <dan>

        * linux-thread-db.c (thread_db_wait): Remove libthread_db
        after exec events.


Comment 5 Jan Kratochvil 2006-08-01 16:04:05 UTC
Created attachment 133410 [details]
Extracted the CVS-committed (exec(2)-non following / minimized) patch

Comment 8 Jan Kratochvil 2006-08-15 20:43:34 UTC
Comment on attachment 131435 [details]
Patch for i386 GDB as of CVS 2006-06-14 [rewritten]

Obsoleted as the patch has been reposted several times to the mailinst list,
last time as:
http://sourceware.org/ml/gdb/2006-08/msg00115.html

Comment 10 Alexandre Oliva 2006-08-24 07:14:38 UTC
The fix should hit today's rawhide in gdb-6.5-5.


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