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
Bug 1425561 - gdb crashes with SIGSEGV on tab completion when certain debuginfo is installed
Summary: gdb crashes with SIGSEGV on tab completion when certain debuginfo is installed
Alias: None
Product: Red Hat Developer Toolset
Classification: Red Hat
Component: gdb
Version: DTS 6.1 RHEL 7
Hardware: x86_64
OS: Linux
Target Milestone: alpha
: 6.1
Assignee: Jan Kratochvil
QA Contact: Arjun Shankar
Depends On: 1398387
TreeView+ depends on / blocked
Reported: 2017-02-21 17:44 UTC by Jan Kratochvil
Modified: 2023-09-12 01:14 UTC (History)
12 users (show)

Fixed In Version: devtoolset-6-gdb-7.12.1-46.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1398387
Last Closed: 2017-04-26 10:11:46 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1151 0 normal SHIPPED_LIVE devtoolset-6-gdb bug fix update 2017-04-26 13:47:03 UTC

Description Jan Kratochvil 2017-02-21 17:44:41 UTC
+++ This bug was initially created as a clone of Bug #1398387 +++
 - a clone requested by Arjun Shankar

Description of problem:
When debugging with gdb and using tab completion, gdb can crash with SIGSEGV.

I have tracked it down a bit with gdb itself (running gdb in gdb)

Version-Release number of selected component (if applicable):

How reproducible:
I can, for example, reproduce it with the tool "pidof":

Steps to Reproduce:
1. sudo dnf install systemd-debuginfo pcre-debuginfo (with debug repos enabled)
2. gdb pidof
3. on gdb shell:
 * break main
 * run
4. when it breaks:
 * enter "p si" and press <tab>

Actual results:
gdb crashes with sigsegv

Expected results:
do not crash

Additional info:
If I uninstall the debuginfo packages installed above, it does not crash. I also had to deinstall libselinux-debuginfo, which also caused the problem

To figure out the file which causes the crash, I ran gdb in gdb:

1. gdb --args gdb pidof
2. on gdb shell
 * run
3. now on inner gbb shell
 * break main
 * run
4. when it breaks:
 * enter "p si" and press <tab>
5. SIGSEGV catched by outer gdb,
 * frame 2
 * p objfile.original_name

The crash depends on the pattern entered for the print command, some do not crash, some do crash. For me it is crashing with "si" and "so", but not for example for "sx".

crash dump is here:

--- Additional comment from Nicholas Miell on 2017-01-09 21:23:27 CET ---

I'm also seeing a crash in add_symtab_completions when attempting to tab complete xcb_ symbols.

--- Additional comment from Jan Kratochvil on 2017-01-09 22:10:27 CET ---

e11c72c7e4879894b9711b5c0b8247c20c6050f6 is the first bad commit
commit e11c72c7e4879894b9711b5c0b8247c20c6050f6
Author: Gary Benson <gbenson>
Date:   Sat Jan 31 14:48:29 2015 -0800
    Build list of completions as symbol tables are expanded.

--- Additional comment from Gary Benson on 2017-02-01 18:30:31 CET ---

This seems really sensitive to what debuginfo you have installed.  I finally reproduced this by:

  1. Install F25
  2. dnf debuginfo-install systemd-debuginfo pcre-debuginfo
  3. dnf update gdb # to gdb-7.12.1-41.fc25.x86_64
  4. dnf debuginfo-install procps-ng-3.3.10-11.fc24.x86_64

Interestingly the final debuginfo-install downgraded pcre-debuginfo and systemd-debuginfo.  The final list of debuginfo packages I have is:


--- Additional comment from Gary Benson on 2017-02-09 16:40:37 CET ---

Fix committed upstream:

Comment 2 Jan Kratochvil 2017-02-21 17:59:25 UTC
QA: There is currently no testcase except for the Fedora reproducer described by Gary Benson above.

Comment 10 errata-xmlrpc 2017-04-26 10:11:46 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

Comment 11 Red Hat Bugzilla 2023-09-12 01:14:08 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days

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