Bug 182116 - Cannot find user-level thread for LWP 4256: generic error
Cannot find user-level thread for LWP 4256: generic error
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: gdb (Show other bugs)
4
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Alexandre Oliva
:
Depends On:
Blocks: 130157 202689
  Show dependency treegraph
 
Reported: 2006-02-20 12:17 EST by U. George
Modified: 2007-11-30 17:11 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-09-22 03:37:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description U. George 2006-02-20 12:17:39 EST
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 06:20:31 EDT
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 06:28:04 EDT
Created attachment 130814 [details]
Minimized bug reproducibility test case.
Comment 3 Jan Kratochvil 2006-06-23 10:31:34 EDT
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 07:14:44 EDT
FYI Daniel Jacobowitz committed improved minimized (non-TARGET_WAITKIND_EXECD
fixup only) patch to the upstream CVS:

2006-07-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
            Daniel Jacobowitz  <dan@codesourcery.com>

        * linux-thread-db.c (thread_db_wait): Remove libthread_db
        after exec events.
Comment 5 Jan Kratochvil 2006-08-01 12:04:05 EDT
Created attachment 133410 [details]
Extracted the CVS-committed (exec(2)-non following / minimized) patch
Comment 8 Jan Kratochvil 2006-08-15 16:43:34 EDT
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 03:14:38 EDT
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.