Description of problem: GDB crash while running invoked by DDD during 'thread apply all backtrace' during debugging firefox; DDD displays 'DDD: No source' dialog at the time of the crash. https://bugzilla.redhat.com/show_bug.cgi?id=458657 Debug session was started with: firefox -g --sync GDB Crash repeatedly (2 out of 2 debug sessions) occurs when 'thread apply all backtrace' command is entered. A dialog box titled "DDD: No Source" immediately precedes the crashes. Version-Release number of selected component (if applicable): ddd-3.3.11-18.fc9.x86_64 gdb-6.8-21.fc9.x86_64 How reproducible: 2 out of 2. Steps to Reproduce: 1. install lots of debuginfos, maybe not every single one(?) 2. firefox -g --sync 3. run, interrupt, breakpoint gdk_x_error, run until crash, 'thread apply all backtrace' -- crash GDB. Actual results: GDB crashes and core dumps after 'DDD: No source' dialog appears. Expected results: Not to crash / core dump. Additional info: https://bugzilla.redhat.com/show_bug.cgi?id=458657 https://bugzilla.redhat.com/attachment.cgi?id=316652 https://bugzilla.redhat.com/attachment.cgi?id=316398
Created attachment 316654 [details] Screenshot 2
Created attachment 316655 [details] Screenshot 1
This morning it crashed under essentially identical circumstances (debugging firefox with DDD/GDB in the exact manner described previously) except this time using the "Status->Threads" menu in DDD preceded the crash; q.v.: https://bugzilla.redhat.com/attachment.cgi?id=316688 https://bugzilla.redhat.com/show_bug.cgi?id=458657 2008-09-14-12-30 textual information relating to crash (24.69 KB, text/plain) 2008-09-14 04:10 EDT, c. h. Details 2008-09-14-12-30 images of debugger information relating to crash Screenshot-A (138.49 KB, image/png) 2008-09-14 04:56 EDT, c. h. Details 2008-09-14-12-30 images of debugger information relating to crash Screenshot-B (70.65 KB, image/png) 2008-09-14 04:57 EDT, c. h. Details 2008-09-14-12-30 images of debugger information relating to crash Screenshot-C (71.19 KB, image/png) 2008-09-14 04:57 EDT, c. h. Details 2008-09-14-12-30 images of debugger information relating to crash Screenshot-D (61.14 KB, image/png) 2008-09-14 04:58 EDT, c. h.
While once (at the beginning) it really crashed for me so I can confirm somewhere is some bug I am no longer able to reproduce it. Could you please try this GDB binary: http://people.redhat.com/jkratoch/gdb-6.8-22-bz462164.fc9.bz2 (`bzip -d' it, please) This way: ulimit -c unlimited firefox -g --sync -d /path/to/gdb-6.8-22-bz462164.fc9 and send me the core file? This binary has a hook there to crash on any zero-LWP thread it sees - it should never happen but apparently in your case such thread was inlisted which caused the bug. If there would be more of them I need the GDB one (not the Firefox one), you can check which executable was the core file generated for by: gdb -c ./core.XXX Thanks.
Created attachment 316854 [details] 2008-09-16-01-48 ddd/gdb dumps made from the commended special test debugger version with the lwp assert checking Thank you for your investigation of this problem and for providing the advice and extra debug special version of the debugger. Accordingly I have used your provided modified gdb binary and running it in the suggested manner very quickly (within the first several seconds of running) generated core dumps of gdb with the listed fault of the lwp null check you expected to find. Apparently the system here does not accept the upload after waiting several hours for it to upload only to have it report the fact. It might be better if it actually told of its limitations in advance.... The file you are trying to attach is 187187 kilobytes (KB) in size. Non-patch attachments cannot be more than 20000 KB. We recommend that you store your attachment elsewhere and then specify the URL to this file on the attachment creation page in the AttachURL field. Alternately, if your attachment is an image, you could convert it to a compressible format like JPG or PNG and try again. $ gdb -c 08_09_15_19_05_01.debug/core.25922 GNU gdb Fedora (6.8-22-bz462164.fc9) 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 "x86_64-redhat-linux-gnu". Missing separate debuginfo for the main executable file Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/06/8073253f5ac2dea4b312753dd872abf988b5ea (no debugging symbols found) Core was generated by `gdb -x /tmp/mozargs.o8ofwy -q -fullname /usr/lib64/firefox-3.0.1/firefox'. Program terminated with signal 6, Aborted. ../../gdb/thread.c:124: internal-error: add_thread_silent: Assertion `ptid.lwp != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y ../../gdb/thread.c:124: internal-error: add_thread_silent: Assertion `ptid.lwp != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) n $ gdb -c 08_09_15_20_00_32.debug/core.26079 GNU gdb Fedora (6.8-22-bz462164.fc9) 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 "x86_64-redhat-linux-gnu". Missing separate debuginfo for the main executable file Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/06/8073253f5ac2dea4b312753dd872abf988b5ea (no debugging symbols found) Core was generated by `gdb -x /tmp/mozargs.6qIvVT -q -fullname /usr/lib64/firefox-3.0.1/firefox'. Program terminated with signal 6, Aborted. ../../gdb/thread.c:124: internal-error: add_thread_silent: Assertion `ptid.lwp != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Quit this debugging session? (y or n) y ../../gdb/thread.c:124: internal-error: add_thread_silent: Assertion `ptid.lwp != 0' failed. A problem internal to GDB has been detected, further debugging may prove unreliable. Create a core file of GDB? (y or n) n
Created attachment 316889 [details] 2008-09-16-01-48 ddd/gdb dumps made from the commended special test debugger version with the lwp assert checking -- link to download site. Here is the link to the first two generated core files in an archive. After very quickly generating the first core I repeated the experiment to see if the fast result would be repeatable; it again tripped the assert very quickly and generated the second core dump. http://www.sendspace.com/file/xao6qo
With the build http://koji.fedoraproject.org/scratch/jkratoch/task_844732/ containing the patch http://people.redhat.com/jkratoch/exec-debug.patch could you please run the program firefox/evolution and: First check if the problem happens already on the first inferior exec, it should produce some lines like: pid=29230,lwp=(pid=29230,lwp=29230) And if it happens, produce the _gdb_ core file, please: ulimit -c unlimited; CRASH=1 ./gdb ... Thanks.
To be reopened if a reproducer gets available.