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 1398387

Summary: gdb crashes with SIGSEGV on tab completion when certain debuginfo is installed
Product: [Fedora] Fedora Reporter: Georg Müller <georgmueller>
Component: gdbAssignee: Jan Kratochvil <jan.kratochvil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 25CC:, dkholia, fedora, gbenson, georgmueller, jan.kratochvil, jjelen, nmiell, palves, pmuldoon, sergiodj, tom
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Fixed In Version: gdb-7.12.1-46.fc25 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1425561 (view as bug list) Environment:
Last Closed: 2017-02-18 18:20:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 1425561    

Description Georg Müller 2016-11-24 16:11:24 UTC
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:

Comment 1 Nicholas Miell 2017-01-09 20:23:27 UTC
I'm also seeing a crash in add_symtab_completions when attempting to tab complete xcb_ symbols.

Comment 2 Jan Kratochvil 2017-01-09 21:10:27 UTC
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.

Comment 3 Jan Kratochvil 2017-01-13 21:45:25 UTC
*** Bug 1412621 has been marked as a duplicate of this bug. ***

Comment 4 Jan Kratochvil 2017-01-29 20:52:00 UTC
*** Bug 1417369 has been marked as a duplicate of this bug. ***

Comment 5 Gary Benson 2017-02-01 17:30:31 UTC
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:


Comment 6 Gary Benson 2017-02-09 15:40:37 UTC
Fix committed upstream:

Comment 7 Jan Kratochvil 2017-02-10 18:51:51 UTC
*** Bug 1421256 has been marked as a duplicate of this bug. ***

Comment 8 Fedora Update System 2017-02-15 17:01:00 UTC
gdb-7.12.1-46.fc25 has been submitted as an update to Fedora 25.

Comment 9 Fedora Update System 2017-02-17 15:26:15 UTC
gdb-7.12.1-46.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See for
instructions on how to install test updates.
You can provide feedback for this update here:

Comment 10 Fedora Update System 2017-02-18 18:20:50 UTC
gdb-7.12.1-46.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.