Your message dated Tue, 30 Jan 2007 16:32:04 +0000
with message-id <[EMAIL PROTECTED]>
and subject line Bug#408402: fixed in gdb 6.6.dfsg-1
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gdb
Version: 6.4.90-debian

The patches that debian-etch adds to gdb-6.4.90 make it SEGV if
thread_db.so doesn't contain all of the expected symbols (td_init,
td_ta_new, td_ta_map_id2thr, td_ta_map_lwp2thr etc).

Using a debug build of gdb-6.4.90-debian (built with `apt-get -b
source gdb') gives a core dump with the following backtrace:

    #0  0x08093765 in check_for_thread_db () at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/linux-thread-db.c:676
    676           printf_unfiltered (_("Using host libthread_db library 
\"%s\".\n"),
    (gdb) bt
    #0  0x08093765 in check_for_thread_db () at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/linux-thread-db.c:676
    #1  0x081a327b in inf_ptrace_him (pid=2684) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/inf-ptrace.c:126
    #2  0x081a3af9 in fork_inferior (
        exec_file_arg=0x82fe030 ..., allargs=0x8334c68 "", env=0x82df708, 
traceme_fun=0x81a2920 <inf_ptrace_me>, init_trace_fun=0x81a3220 
<inf_ptrace_him>, pre_trace_fun=0, 
        shell_file_arg=0x0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/fork-child.c:396
    #3  0x081a321d in inf_ptrace_create_inferior (
        exec_file=0x82fe030 "...", allargs=0x8334c68 "", env=0x82df708, 
from_tty=1) at /home/gregjules/gdb-6.4.90.dfsg/gdb/inf-ptrace.c:138
    #4  0x0810c3ff in run_command_1 (args=0x0, from_tty=1, 
tbreak_at_main=<value optimized out>) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/infcmd.c:546
    #5  0x0807f133 in execute_command (p=0x82be245 "", from_tty=1) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/top.c:452
    #6  0x0811ca1b in command_handler (command=0x82be240 "") at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-top.c:512
    #7  0x0811d759 in command_line_handler (rl=0x830e858 "") at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-top.c:797
    #8  0xb7f421a0 in rl_callback_read_char () from /lib/libreadline.so.5
    #9  0x0811cbdb in rl_callback_read_char_wrapper (client_data=0x0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-top.c:178
    #10 0x0811c552 in handle_file_event (event_file_desc=0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-loop.c:730
    #11 0x0811b9fd in process_event () at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-loop.c:343
    #12 0x0811c1c5 in gdb_do_one_event (data=0x0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/event-loop.c:380
    #13 0x08118f3b in catch_errors (func=0x811c0b0 <gdb_do_one_event>, 
func_args=0x0, errstring=0x8227c00 "", mask=6)
        at /home/gregjules/gdb-6.4.90.dfsg/gdb/exceptions.c:515
    #14 0x080c19d4 in tui_command_loop (data=0x0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/tui/tui-interp.c:151
    #15 0x0811956f in current_interp_command_loop () at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/interps.c:278
    #16 0x0807825b in captured_command_loop (data=0x0) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/main.c:101
    #17 0x08118f3b in catch_errors (func=0x8078250 <captured_command_loop>, 
func_args=0x0, errstring=0x8227c00 "", mask=6)
        at /home/gregjules/gdb-6.4.90.dfsg/gdb/exceptions.c:515
    #18 0x08078a64 in captured_main (data=0xbf8cf4a4) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/main.c:834
    #19 0x08118f3b in catch_errors (func=0x8078290 <captured_main>, 
func_args=0xbf8cf4a4, errstring=0x8227c00 "", mask=6)
        at /home/gregjules/gdb-6.4.90.dfsg/gdb/exceptions.c:515
    #20 0x08078243 in gdb_main (args=0xbf8cf4a4) at 
/home/gregjules/gdb-6.4.90.dfsg/gdb/main.c:843
    #21 0x08078205 in main (argc=Cannot access memory at address 0x0
    ) at /home/gregjules/gdb-6.4.90.dfsg/gdb/gdb.c:35
    (gdb) p all_pointers
    $1 = (struct thread_db_pointers *) 0x0
    (gdb) p using_thread_db
    $2 = 0
    (gdb) 

The SEGV occurs in linux-thread-db.c:check_for_thread_db():

    void
    check_for_thread_db (void)
    {
      static int already_loaded;

      /* First time through, report that libthread_db was successfuly
         loaded.  Can't print this in in thread_db_load as, at that stage,
         the interpreter and it's console haven't started.  */

      if (!already_loaded)
        {
          printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
                             all_pointers->filename);
          already_loaded = 1;
        }
      ...

When <already_loaded> is 0, the above call to printf_unfiltered()
dereferences <all_pointers>, but <all_pointers> can be NULL if, earlier
on, thread_db_load() returned 0 due to verbose_dlsym() returning NULL
for one of the expected thread_db functions.

The segv doesn't occur with gdb-6.4.90 without the debian patches.

The obvious fix makes things work ok:

    void
    check_for_thread_db (void)
    {
      static int already_loaded;

      /* First time through, report that libthread_db was successfuly
         loaded.  Can't print this in in thread_db_load as, at that stage,
         the interpreter and it's console haven't started.  */

      if (!already_loaded)
        {
          if (all_pointers)
            printf_unfiltered (_("Using host libthread_db library \"%s\".\n"),
                             all_pointers->filename);
          already_loaded = 1;
        }
      ...

Here are some details of my system:

    uname -a:
        Linux pc1-debian-etch 2.6.18-3-k7 #1 SMP Mon Dec 4 17:23:11 UTC 2006 
i686 GNU/Linux
    ls -l /lib/libc.so.6:
        lrwxrwxrwx 1 root root 13 2007-01-23 16:48 /lib/libc.so.6 -> 
libc-2.3.6.so

I hope that all makes sense.
    
- Julian

-- 
http://op59.net/



--- End Message ---
--- Begin Message ---
Source: gdb
Source-Version: 6.6.dfsg-1

We believe that the bug you reported is fixed in the latest version of
gdb, which is due to be installed in the Debian FTP archive:

gdb_6.6.dfsg-1.diff.gz
  to pool/main/g/gdb/gdb_6.6.dfsg-1.diff.gz
gdb_6.6.dfsg-1.dsc
  to pool/main/g/gdb/gdb_6.6.dfsg-1.dsc
gdb_6.6.dfsg-1_amd64.deb
  to pool/main/g/gdb/gdb_6.6.dfsg-1_amd64.deb
gdb_6.6.dfsg.orig.tar.gz
  to pool/main/g/gdb/gdb_6.6.dfsg.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [EMAIL PROTECTED],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Daniel Jacobowitz <[EMAIL PROTECTED]> (supplier of updated gdb package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [EMAIL PROTECTED])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 27 Jan 2007 21:59:06 -0500
Source: gdb
Binary: gdb
Architecture: source amd64
Version: 6.6.dfsg-1
Distribution: unstable
Urgency: low
Maintainer: Daniel Jacobowitz <[EMAIL PROTECTED]>
Changed-By: Daniel Jacobowitz <[EMAIL PROTECTED]>
Description: 
 gdb        - The GNU Debugger
Closes: 233467 313340 343419 373927 405116 408402
Changes: 
 gdb (6.6.dfsg-1) unstable; urgency=low
 .
   [ Matthias Klose ]
   * New upstream version.
     - Prints a newline after EOF (Closes: #233467).
   * sim-destdir.patch, gdbinit-ownership.patch, bfd-get-mtime-less.patch,
     pie-support.patch, thread-db-multiple-libraries.patch: Update.
   * thread-db-live-threads.patch, fork-context-switch.patch: Remove,
     applied upstream.
 .
   [ Daniel Jacobowitz ]
   * Merge changes from Matthias Klose (thanks).
   * Refresh all patches.
   * Fix "corrupted DWARF expression" error (Closes: #405116).
   * Do not crash if loading libthread_db failed (Closes: #408402).
   * Initial support for building cross-GDB packages, based on the work of
     Raphael Bossek and Kazuhiro Inaoka (Closes: #313340, #343419, #373927).
   * Change priority to optional (since ftpmaster did).
Files: 
 1a5e68a02a8d64c4133eb5e2e478daf9 1350 devel optional gdb_6.6.dfsg-1.dsc
 3c5f8de25ae53ffb4b949454c5e7ddaf 18114725 devel optional 
gdb_6.6.dfsg.orig.tar.gz
 a17539878db5cf03eb57d0b87783022e 35376 devel optional gdb_6.6.dfsg-1.diff.gz
 a9a2cb4110cf5eb3b113e1997bd1923c 2732174 devel optional 
gdb_6.6.dfsg-1_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFFv265bgOPXuCjg3cRAg81AJ42WgFpO+h4Vz4a8bQFXyMil5VcPgCfTtDz
yiNBZqltFGnbkDqDAMXtQC8=
=nsIg
-----END PGP SIGNATURE-----


--- End Message ---

Reply via email to