Description of problem: I was debugging a cat coredump and suddenly gdb crashed. Version-Release number of selected component: gdb-headless-8.3-6.fc30 Additional info: reporter: libreport-2.11.2 backtrace_rating: 4 cmdline: gdb -q /usr/bin/cat cat_cpu_2019-10-24_12:59:34.9421 crash_function: target_ops::shortname executable: /usr/libexec/gdb journald_cursor: s=cedd7e988fdc453bb576b68846def5b2;i=10c0;b=b80e57815ed243aab415bdbc15e5dbcc;m=25b39464f;t=595a676bab12f;x=2ec67f817efb420 kernel: 5.3.6-200.fc30.x86_64 rootdir: / runlevel: N 5 type: CCpp uid: 1000 Truncated backtrace: Thread no. 1 (10 frames) #0 target_ops::shortname at ../../gdb/target.h:452 #1 tui_make_status_line at ../../gdb/tui/tui-stack.c:80 #2 tui_show_locator_content at ../../gdb/tui/tui-stack.c:255 #3 tui_set_key_mode at ../../gdb/tui/tui.c:323 #4 tui_inferior_exit at ../../gdb/tui/tui-hooks.c:179 #5 std::function<void (inferior*)>::operator()(inferior*) const at /usr/include/c++/9/bits/std_function.h:685 #6 gdb::observers::observable<inferior*>::notify at ../../gdb/common/observable.h:106 #7 exit_inferior_1 at ../../gdb/inferior.c:191 #8 exit_inferior_silent at ../../gdb/inferior.c:230 #9 core_target::close at ../../gdb/corelow.c:268
Created attachment 1628825 [details] File: backtrace
Created attachment 1628826 [details] File: cgroup
Created attachment 1628827 [details] File: core_backtrace
Created attachment 1628828 [details] File: cpuinfo
Created attachment 1628829 [details] File: dso_list
Created attachment 1628830 [details] File: environ
Created attachment 1628831 [details] File: exploitable
Created attachment 1628832 [details] File: limits
Created attachment 1628833 [details] File: maps
Created attachment 1628834 [details] File: mountinfo
Created attachment 1628835 [details] File: open_fds
Created attachment 1628836 [details] File: proc_pid_status
Thanks for the report. Can you provide more details, please? How did you invoke GDB? I see you were using TUI; did you issue any TUI-specific commands? Any other GDB commands? Thanks.
The invocation was $ gdb -q /usr/bin/cat cat_cpu_2019-10-24_12:59:34.9421 where the coredump was created by ProcDump for Linux. If I recall correctly, I went into the TUI right away with C-x C-a and then did some sequence of (possibly repeated) `up`, `bt`, `bt full` and perhaps `i th`. I think it crashed right after one of the ups, though I can't guarantee that. I'll see if I can reproduce the crash.
Created attachment 1629062 [details] Coredump on which gdb crashes OK, I have a reproducer. With the same invocation as above and the attached coredump, gdb crashes after the sequence of commands 1. C-x a 2. run
(In reply to Matej Grabovsky from comment #15) > Created attachment 1629062 [details] > Coredump on which gdb crashes > > OK, I have a reproducer. With the same invocation as above and the attached > coredump, gdb crashes after the sequence of commands > 1. C-x a > 2. run Thanks, I was able to reproduce the bug. I will investigate it this week.
A fix has been proposed and pushed upstream. https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/483 commit 494409bb8a043b259435ad5034c66aa3fee15f52 (HEAD -> master, origin/master, origin/HEAD) Author: Sergio Durigan Junior <sergiodj> Date: Wed Oct 30 13:58:29 2019 -0400 Fix crash with core + TUI + run I can backport this to Fedora 30 GDB. I'll see if I can do this tomorrow.
FEDORA-2019-2143a7fc75 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2143a7fc75
FEDORA-2019-119b19bf0e has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-119b19bf0e
gdb-8.3-7.fc30 has been pushed to the Fedora 30 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-2143a7fc75
gdb-8.3.50.20190824-25.fc31 has been pushed to the Fedora 31 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2019-119b19bf0e
gdb-8.3-7.fc30 has been pushed to the Fedora 30 stable repository. If problems still persist, please make note of it in this bug report.
gdb-8.3.50.20190824-25.fc31 has been pushed to the Fedora 31 stable repository. If problems still persist, please make note of it in this bug report.