Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1765117 - [abrt] gdb-headless: target_ops::shortname(): gdb killed by SIGSEGV
Summary: [abrt] gdb-headless: target_ops::shortname(): gdb killed by SIGSEGV
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Durigan Junior
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:dd01a21f4b48d54b9ee8c6e4b98...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-24 11:56 UTC by Matej Grabovsky
Modified: 2019-11-29 00:54 UTC (History)
6 users (show)

Fixed In Version: gdb-8.3-7.fc30 gdb-8.3.50.20190824-25.fc31
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-26 23:51:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (38.11 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: cgroup (399 bytes, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: core_backtrace (6.02 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: cpuinfo (1.47 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: dso_list (3.74 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: environ (6.99 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: exploitable (82 bytes, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: limits (1.29 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: maps (22.81 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: mountinfo (4.86 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: open_fds (543 bytes, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
File: proc_pid_status (1.32 KB, text/plain)
2019-10-24 11:56 UTC, Matej Grabovsky
no flags Details
Coredump on which gdb crashes (633.20 KB, application/x-core)
2019-10-25 09:06 UTC, Matej Grabovsky
no flags Details

Description Matej Grabovsky 2019-10-24 11:56:06 UTC
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

Comment 1 Matej Grabovsky 2019-10-24 11:56:09 UTC
Created attachment 1628825 [details]
File: backtrace

Comment 2 Matej Grabovsky 2019-10-24 11:56:10 UTC
Created attachment 1628826 [details]
File: cgroup

Comment 3 Matej Grabovsky 2019-10-24 11:56:12 UTC
Created attachment 1628827 [details]
File: core_backtrace

Comment 4 Matej Grabovsky 2019-10-24 11:56:13 UTC
Created attachment 1628828 [details]
File: cpuinfo

Comment 5 Matej Grabovsky 2019-10-24 11:56:14 UTC
Created attachment 1628829 [details]
File: dso_list

Comment 6 Matej Grabovsky 2019-10-24 11:56:15 UTC
Created attachment 1628830 [details]
File: environ

Comment 7 Matej Grabovsky 2019-10-24 11:56:16 UTC
Created attachment 1628831 [details]
File: exploitable

Comment 8 Matej Grabovsky 2019-10-24 11:56:17 UTC
Created attachment 1628832 [details]
File: limits

Comment 9 Matej Grabovsky 2019-10-24 11:56:19 UTC
Created attachment 1628833 [details]
File: maps

Comment 10 Matej Grabovsky 2019-10-24 11:56:20 UTC
Created attachment 1628834 [details]
File: mountinfo

Comment 11 Matej Grabovsky 2019-10-24 11:56:22 UTC
Created attachment 1628835 [details]
File: open_fds

Comment 12 Matej Grabovsky 2019-10-24 11:56:23 UTC
Created attachment 1628836 [details]
File: proc_pid_status

Comment 13 Sergio Durigan Junior 2019-10-24 18:37:29 UTC
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.

Comment 14 Matej Grabovsky 2019-10-25 09:03:46 UTC
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.

Comment 15 Matej Grabovsky 2019-10-25 09:06:11 UTC
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

Comment 16 Sergio Durigan Junior 2019-10-29 01:55:36 UTC
(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.

Comment 17 Sergio Durigan Junior 2019-11-19 00:16:11 UTC
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.

Comment 18 Fedora Update System 2019-11-21 18:24:09 UTC
FEDORA-2019-2143a7fc75 has been submitted as an update to Fedora 30. https://bodhi.fedoraproject.org/updates/FEDORA-2019-2143a7fc75

Comment 19 Fedora Update System 2019-11-21 18:24:25 UTC
FEDORA-2019-119b19bf0e has been submitted as an update to Fedora 31. https://bodhi.fedoraproject.org/updates/FEDORA-2019-119b19bf0e

Comment 20 Fedora Update System 2019-11-22 02:24:52 UTC
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

Comment 21 Fedora Update System 2019-11-22 02:31:47 UTC
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

Comment 22 Fedora Update System 2019-11-26 23:51:54 UTC
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.

Comment 23 Fedora Update System 2019-11-29 00:54:00 UTC
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.


Note You need to log in before you can comment on or make changes to this bug.