Package: gdb
Version: 6.4.90.dfsg-1
Severity: grave
Justification: renders package unusable

Any program linked with "-lpthread" will make GDB unusable with the following
error:

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

Here's an example:

  $ cat simple.c
  int main(void) {
    return 0;
  }
  $ gcc -O0 -g simple.c -o simple -lpthread
  $ gdb ./simple
  GNU gdb 6.4.90-debian
  Copyright (C) 2006 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 "i486-linux-gnu"...Using host libthread_db library 
"/lib/tls/i686/cmov/libthread_db.so.1".

  (gdb) break simple.c:2
  Breakpoint 1 at 0x8048372: file simple.c, line 2.
  (gdb) run
  Starting program: /home/nicholas/simple 
  warning: Lowest section in system-supplied DSO at 0xffffe000 is .hash at 
ffffe0b4
  [Thread debugging using libthread_db enabled]
  Error while reading shared library symbols:
  Cannot find new threads: generic error
  Cannot find user-level thread for LWP 29015: generic error
  (gdb) bt
  #0  0xf7f92010 in _dl_debug_state () from /lib/ld-linux.so.2
  #1  0xffdd2530 in ?? ()
  #2  0xf7f88c35 in dl_main () from /lib/ld-linux.so.2
  #3  0xf7f953e8 in _dl_sysdep_start () from /lib/ld-linux.so.2
  #4  0xf7f86b46 in _dl_start () from /lib/ld-linux.so.2
  #5  0xf7f867b7 in _start () from /lib/ld-linux.so.2
  (gdb) c
  Continuing.
  Cannot find user-level thread for LWP 29015: generic error
  (gdb) c
  Continuing.
  Cannot find user-level thread for LWP 29015: generic error
  (gdb) bt
  #0  0xf7f92010 in _dl_debug_state () from /lib/ld-linux.so.2
  #1  0xffdd2530 in ?? ()
  #2  0xf7f88c35 in dl_main () from /lib/ld-linux.so.2
  #3  0xf7f953e8 in _dl_sysdep_start () from /lib/ld-linux.so.2
  #4  0xf7f86b46 in _dl_start () from /lib/ld-linux.so.2
  #5  0xf7f867b7 in _start () from /lib/ld-linux.so.2

This is especially annoying as the actual program, despite linking with
pthread is single-threaded. It works fine if you remove "-lpthread" from the
compile line. I tried two gcc versions:

  gcc version 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)

and

  gcc version 4.0.4 20060904 (prerelease) (Debian 4.0.3-7)

both are affected, leading me to think that this is an error in gdb (or
possibly libpthread.)

Nick Lewycky

-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (1, 'experimental')
Architecture: i386 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18.1
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)

Versions of packages gdb depends on:
ii  libc6                        2.3.6.ds1-7 GNU C Library: Shared libraries
ii  libncurses5                  5.5-5       Shared libraries for terminal hand
ii  libreadline5                 5.2-1       GNU readline and history libraries

gdb recommends no packages.

-- debconf-show failed


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to