RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 981154 - gdb gives highly misleading error when debuginfo pkg is present, but not corresponding binary pkg
Summary: gdb gives highly misleading error when debuginfo pkg is present, but not corr...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gdb
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: ---
Assignee: Sergio Durigan Junior
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: 554152
TreeView+ depends on / blocked
 
Reported: 2013-07-04 06:47 UTC by David Gibson
Modified: 2014-10-14 07:28 UTC (History)
3 users (show)

Fixed In Version: gdb-7.2-68.el6, gdb-7.2-69.el6
Doc Type: Bug Fix
Doc Text:
Cause: GDB was not handling symbolic links for build-id files in the proper way. Consequence: The user could see misleading error messages when trying to debug a program whose debuginfo file was installed, but the binary file was not. GDB was instructing the user to issue wrong commands to install the binary file. Fix: GDB now correctly identifies and handles the symbolic links related to build-id files. Result: The message displayed to the user is now correct and, if followed, causes the binary file to be installed on the system.
Clone Of:
Environment:
Last Closed: 2014-10-14 07:28:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1534 0 normal SHIPPED_LIVE gdb bug fix and enhancement update 2014-10-14 01:21:50 UTC

Description David Gibson 2013-07-04 06:47:23 UTC
Description of problem:

If analyzing a core dump on a different machine from the one on which it was generated, it may be necessary to install a number of debuginfo packages corresponding to binary packages on the machine where the core was generated.

gdb helpfully suggests yum commands to find the right debuginfo packages by build-id.  However installing *just* the debuginfo package, and not the package containing the actual executable or library binary, causes gdb to print an extremely misleading suggestion.

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

gdb-7.2-60.el6_4.1.x86_64

Steps to Reproduce:
1. Obtain a core file from a binary in package foo
2. Move that core file to another (RHEL6) machine which does not have package foo installed.
3. Attempt gdb -c core on the new machine.  This will give a message something like:

Missing separate debuginfo for 
Try: yum --disablerepo='*' --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d6/c129cc385340a2e2c512f3c6c189704197e3ab

4. Run the suggested command, which will install a -debuginfo package, but *not* the corresponding package containing the actual binary.  Or, install the package binary but in a different version (i.e. build-id) from the debuginfo.

5. Attempt gdb -c core again.  This will now give a message something like:

Missing separate debuginfo for 
Try: yum --disablerepo='*' --enablerepo='*-debug*' install /usr/lib/debug/.build-id/d6/c129cc385340a2e2c512f3c6c189704197e3ab.1

(Same as previous message but with added ".1")

6. The suggested command will not help.

Additional info:

After step (4) above, /usr/lib/debug/.build-id/d6/c129cc385340a2e2c512f3c6c189704197e3ab exists as a broken link.  gdb correctly looks for this file based on the build-id in the core.  It appears to lstat() this file, then readlink() it, and attempt to open the target.  When this fails, it unhelpfully falls back to the adding the ".1" to the build-id based location.

Comment 3 Jan Kratochvil 2013-07-17 03:16:33 UTC
GDB should:
(a) not apparent the .%d suffix if none of the existing symlinks point
    to a valid file.
(b) It should request installing the symlink-target file if the symlink itself
    is already present.

Comment 4 David Gibson 2013-07-17 03:54:32 UTC
@Jan, yes that sounds like a good summary of what needs to change.

Comment 5 Jan Kratochvil 2013-07-17 04:22:59 UTC
In Fedora Rawhide as: gdb-7.6-33.fc20
https://koji.fedoraproject.org/koji/buildinfo?buildID=434152
Thanks for the bugreport.

Missing separate debuginfo for the main executable file
Try: yum --disablerepo='*' --enablerepo='*debug*' install /usr/lib/debug/.build-id/bd/../../../../bin/gtkperf

(Its backport to RHEL is up to Sergio.)

Comment 6 Sergio Durigan Junior 2013-07-17 04:49:20 UTC
Thanks, Jan.  If GDB is marked to be updated for 6.5, I will backport this.

Comment 7 Jan Kratochvil 2013-07-17 18:10:09 UTC
gdb-7.6-34.fc20
http://koji.fedoraproject.org/koji/taskinfo?taskID=5622216

Obviously one has to also remove the --disablerepo='*' part.

Comment 11 Sergio Durigan Junior 2014-04-24 20:40:29 UTC
gdb-7.7-5.fc21
http://koji.fedoraproject.org/koji/taskinfo?taskID=6775844

Fixing it on F21 since this part got rewritten there (and had a bug).

Comment 12 Sergio Durigan Junior 2014-04-24 22:59:36 UTC
gdb-7.7-5.fc21
http://koji.fedoraproject.org/koji/taskinfo?taskID=6776156

Please disconsider the last Koji build, it failed because of some incompatibilities with GCC 4.9.  Fixed by this version.

Comment 17 errata-xmlrpc 2014-10-14 07:28:00 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.

http://rhn.redhat.com/errata/RHBA-2014-1534.html


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