gdb crashes when debugging firefox after an exec

Bug #319418 reported by Dima Ryazanov
4
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("/usr/bin/firefox", "firefox", NULL);
    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://gnu.org/licenses/gpl.html>
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/firefox-3.0.5/firefox
(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/firefox-3.0.5/firefox
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.

Revision history for this message
Dima Ryazanov (dima-gmail) wrote :
Download full text (3.4 KiB)

Here's the gdb stacktrace:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7fe2fe2046e0 (LWP 28459)]
0x000000000046b557 in clear_lwpid_callback (thread=0x497a010, dummy=0x0) at /build/buildd/gdb-6.8/gdb/linux-thread-db.c:795
795 /build/buildd/gdb-6.8/gdb/linux-thread-db.c: No such file or directory.
        in /build/buildd/gdb-6.8/gdb/linux-thread-db.c
(gdb) bt
#0 0x000000000046b557 in clear_lwpid_callback (thread=0x497a010, dummy=0x0) at /build/buildd/gdb-6.8/gdb/linux-thread-db.c:795
#1 0x00000000004f0433 in iterate_over_threads (callback=0x46b550 <clear_lwpid_callback>, data=0x0) at /build/buildd/gdb-6.8/gdb/thread.c:212
#2 0x000000000046d423 in thread_db_resume (ptid={pid = 28464, lwp = 28464, tid = 0}, step=1, signo=TARGET_SIGNAL_0)
    at /build/buildd/gdb-6.8/gdb/linux-thread-db.c:812
#3 0x00000000004e7d2a in resume (step=1, sig=TARGET_SIGNAL_0) at /build/buildd/gdb-6.8/gdb/infrun.c:651
#4 0x00000000004e7ff0 in keep_going (ecs=0x7fff06224d20) at /build/buildd/gdb-6.8/gdb/infrun.c:2975
#5 0x00000000004e8d98 in handle_inferior_event (ecs=0x7fff06224d20) at /build/buildd/gdb-6.8/gdb/infrun.c:2228
#6 0x00000000004eab6a in wait_for_inferior (treat_exec_as_sigtrap=0) at /build/buildd/gdb-6.8/gdb/infrun.c:1042
#7 0x00000000004eaeb7 in proceed (addr=<value optimized out>, siggnal=TARGET_SIGNAL_0, step=0) at /build/buildd/gdb-6.8/gdb/infrun.c:844
#8 0x00000000004e4f7e in run_command_1 (args=0x0, from_tty=1, tbreak_at_main=<value optimized out>) at /build/buildd/gdb-6.8/gdb/infcmd.c:563
#9 0x000000000044e28a in execute_command (p=0x26841a1 "", from_tty=1) at /build/buildd/gdb-6.8/gdb/top.c:449
#10 0x00000000004f650b in command_handler (command=0x26841a0 "") at /build/buildd/gdb-6.8/gdb/event-top.c:518
#11 0x00000000004f73dc in command_line_handler (rl=<value optimized out>) at /build/buildd/gdb-6.8/gdb/event-top.c:804
#12 0x00007fe2fddf0ea7 in rl_callback_read_char () from /lib/libreadline.so.5
#13 0x00000000004f6829 in rl_callback_read_char_wrapper (client_data=0x497a010) at /build/buildd/gdb-6.8/gdb/event-top.c:177
#14 0x00000000004f512d in process_event () at /build/buildd/gdb-6.8/gdb/event-loop.c:341
#15 0x00000000004f5ae6 in gdb_do_one_event (data=<value optimized out>) at /build/buildd/gdb-6.8/gdb/event-loop.c:378
#16 0x00000000004f2634 in catch_errors (func=0x4f58e0 <gdb_do_one_event>, func_args=0x0, errstring=0x64a577 "", mask=<value optimized out>)
    at /build/buildd/gdb-6.8/gdb/exceptions.c:513
#17 0x0000000000497940 in tui_command_loop (data=<value optimized out>) at /build/buildd/gdb-6.8/gdb/tui/tui-interp.c:153
#18 0x0000000000446169 in captured_command_loop (data=0x497a010) at /build/buildd/gdb-6.8/gdb/main.c:99
#19 0x00000000004f2634 in catch_errors (func=0x446160 <captured_command_loop>, func_args=0x0, errstring=0x64a577 "", mask=<value optimized out>)
    at /build/buildd/gdb-6.8/gdb/exceptions.c:513
#20 0x0000000000446c7e in captured_main (data=<value optimized out>) at /build/buildd/gdb-6.8/gdb/main.c:883
#21 0x00000000004f2634 in catch_errors (func=0x4461a0 <captured_main>, func_args=0x7fff06225430, errstring=0x64a577 "", mask=<value optimized out>)
    at /build/buildd/gdb-6.8/gd...

Read more...

Revision history for this message
skierpage (skierpage) wrote :

Happens to me too in Kubuntu 9.04, my stacktrace is similar.

This sounds like bug # 258758 : gdb crashed with SIGSEGV in iterate_over_threads() [when running Firefox] , if you agree maybe you should add this as a duplicate.

Revision history for this message
skierpage (skierpage) wrote :

Sorry, sorry, wrong bug #; sounds like a dupe of bug #258578 .

Revision history for this message
Matthias Klose (doko) wrote :

closing this rather old issue. sorry for not addressing this earlier. Please could you recheck with the recent 14.04 LTS or 14.10 releases and reopen the issue if the problem persists?

Changed in gdb (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.