threads/1964: Cannot find user-level thread for LWP for i32 applications on x84_64 linux (2.6 kernel)

wwc@lns.mit.edu wwc@lns.mit.edu
Tue Jul 5 15:28:00 GMT 2005


>Number:         1964
>Category:       threads
>Synopsis:       Cannot find user-level thread for LWP for i32 applications on x84_64 linux (2.6 kernel)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 05 15:28:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     wwc@lns.mit.edu
>Release:        6.3 and upward
>Organization:
>Environment:
Linux 2.6.12, x86_64, 32bit application
>Description:
I see several (unanswered) bugs related to this error message in the bug database but this one seems to be a new environment.

On linux 2.6 kernels and AMD x86_64 machines, compile the
following sample program
------------
#include <sys/types.h>
#include <unistd.h>
#include <pwd.h>

int main() {
  struct passwd *pw;
  pw  = getpwuid( getuid() );
}
------------

$ g++ -m32 test.C

$ gdb-6.3 ./a.out
GNU gdb 6.3
Copyright 2004 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run
Starting program: /home/wwc/src/a.out 
[Thread debugging using libthread_db enabled]
[New Thread 1433976960 (LWP 10444)]
Cannot find user-level thread for LWP 10444: generic error


faking the linker kernel version to a 2.4.x kernel 
circumvents the problem:

$ LD_ASSUME_KERNEL=2.4.1 gdb-6.3 ./a.out
GNU gdb 6.3
Copyright 2004 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 "i686-pc-linux-gnu"...Using host libthread_db library "/lib/libthread_db.so.1".

(gdb) run
Starting program: /home/wwc/src/a.out 
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 10470)]

Program exited normally.


Current (i.e. from last week thursday) gdb versions
do not yet resolve the issue.
>How-To-Repeat:

>Fix:

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



More information about the Gdb-prs mailing list