gdb crashes when debugging firefox after an exec
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
gdb (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: gdb
Create a simple program, gdbcrash.c, that runs firefox:
#include <unistd.h>
int main(int argc, char* argv[]) {
execl(
return 1;
}
Compile it, and run it in gdb. Make sure firefox is not already running, or change the program so it starts firefox with a different profile.
Here's what I get:
$ gdb ./gdbcrash
GNU gdb 6.8-debian
Copyright (C) 2008 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
(gdb) run
Starting program: /home/dima/gdbcrash
Executing new program: /bin/dash
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Executing new program: /usr/lib/
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb7c646c0 (LWP 24972)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[New Thread 0xb5c5cb90 (LWP 24975)]
[New Thread 0xb5319b90 (LWP 24976)]
[New Thread 0xb4b18b90 (LWP 24977)]
[Thread 0xb5c5cb90 (LWP 24975) exited]
[Thread 0xb4b18b90 (LWP 24977) exited]
[Thread 0xb5319b90 (LWP 24976) exited]
[New process 24972]
Executing new program: /usr/lib/
warning: Cannot initialize thread debugging library: generic error
warning: Cannot initialize thread debugging library: generic error
(no debugging symbols found)
[New process 24972]
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
Segmentation fault
This happens in Ubuntu 8.04 and 8.10.
Here's the gdb stacktrace:
Program received signal SIGSEGV, Segmentation fault. callback (thread=0x497a010, dummy=0x0) at /build/ buildd/ gdb-6.8/ gdb/linux- thread- db.c:795 buildd/ gdb-6.8/ gdb/linux- thread- db.c: No such file or directory. buildd/ gdb-6.8/ gdb/linux- thread- db.c callback (thread=0x497a010, dummy=0x0) at /build/ buildd/ gdb-6.8/ gdb/linux- thread- db.c:795 over_threads (callback=0x46b550 <clear_ lwpid_callback> , data=0x0) at /build/ buildd/ gdb-6.8/ gdb/thread. c:212 SIGNAL_ 0) buildd/ gdb-6.8/ gdb/linux- thread- db.c:812 SIGNAL_ 0) at /build/ buildd/ gdb-6.8/ gdb/infrun. c:651 4d20) at /build/ buildd/ gdb-6.8/ gdb/infrun. c:2975 inferior_ event (ecs=0x7fff0622 4d20) at /build/ buildd/ gdb-6.8/ gdb/infrun. c:2228 exec_as_ sigtrap= 0) at /build/ buildd/ gdb-6.8/ gdb/infrun. c:1042 TARGET_ SIGNAL_ 0, step=0) at /build/ buildd/ gdb-6.8/ gdb/infrun. c:844 at_main= <value optimized out>) at /build/ buildd/ gdb-6.8/ gdb/infcmd. c:563 buildd/ gdb-6.8/ gdb/top. c:449 buildd/ gdb-6.8/ gdb/event- top.c:518 line_handler (rl=<value optimized out>) at /build/ buildd/ gdb-6.8/ gdb/event- top.c:804 read_char () from /lib/libreadlin e.so.5 read_char_ wrapper (client_ data=0x497a010) at /build/ buildd/ gdb-6.8/ gdb/event- top.c:177 buildd/ gdb-6.8/ gdb/event- loop.c: 341 buildd/ gdb-6.8/ gdb/event- loop.c: 378 buildd/ gdb-6.8/ gdb/exceptions. c:513 buildd/ gdb-6.8/ gdb/tui/ tui-interp. c:153 command_ loop (data=0x497a010) at /build/ buildd/ gdb-6.8/ gdb/main. c:99 command_ loop>, func_args=0x0, errstring=0x64a577 "", mask=<value optimized out>) buildd/ gdb-6.8/ gdb/exceptions. c:513 buildd/ gdb-6.8/ gdb/main. c:883 0x7fff06225430, errstring=0x64a577 "", mask=<value optimized out>) buildd/ gdb-6.8/ gd...
[Switching to Thread 0x7fe2fe2046e0 (LWP 28459)]
0x000000000046b557 in clear_lwpid_
795 /build/
in /build/
(gdb) bt
#0 0x000000000046b557 in clear_lwpid_
#1 0x00000000004f0433 in iterate_
#2 0x000000000046d423 in thread_db_resume (ptid={pid = 28464, lwp = 28464, tid = 0}, step=1, signo=TARGET_
at /build/
#3 0x00000000004e7d2a in resume (step=1, sig=TARGET_
#4 0x00000000004e7ff0 in keep_going (ecs=0x7fff0622
#5 0x00000000004e8d98 in handle_
#6 0x00000000004eab6a in wait_for_inferior (treat_
#7 0x00000000004eaeb7 in proceed (addr=<value optimized out>, siggnal=
#8 0x00000000004e4f7e in run_command_1 (args=0x0, from_tty=1, tbreak_
#9 0x000000000044e28a in execute_command (p=0x26841a1 "", from_tty=1) at /build/
#10 0x00000000004f650b in command_handler (command=0x26841a0 "") at /build/
#11 0x00000000004f73dc in command_
#12 0x00007fe2fddf0ea7 in rl_callback_
#13 0x00000000004f6829 in rl_callback_
#14 0x00000000004f512d in process_event () at /build/
#15 0x00000000004f5ae6 in gdb_do_one_event (data=<value optimized out>) at /build/
#16 0x00000000004f2634 in catch_errors (func=0x4f58e0 <gdb_do_one_event>, func_args=0x0, errstring=0x64a577 "", mask=<value optimized out>)
at /build/
#17 0x0000000000497940 in tui_command_loop (data=<value optimized out>) at /build/
#18 0x0000000000446169 in captured_
#19 0x00000000004f2634 in catch_errors (func=0x446160 <captured_
at /build/
#20 0x0000000000446c7e in captured_main (data=<value optimized out>) at /build/
#21 0x00000000004f2634 in catch_errors (func=0x4461a0 <captured_main>, func_args=
at /build/