Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 1656088

Summary: gdb-8.2-3 fails to read Python debug symbols
Product: Red Hat Enterprise Linux 8 Reporter: Victor Stinner <vstinner>
Component: gdbAssignee: Keith Seitz <keiths>
Status: CLOSED CURRENTRELEASE QA Contact: Michal Kolar <mkolar>
Severity: unspecified Docs Contact: Vladimír Slávik <vslavik>
Priority: unspecified    
Version: 8.0CC: dsmith, gdb-bugs, jwboyer, mcermak, mkolar, ohudlick, sergiodj, vslavik
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-06-14 00:53: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:
Embargoed:

Description Victor Stinner 2018-12-04 16:30:25 UTC
gdb-8.2-3 fails to read Python debug symbols:

# dnf install gdb -y
# dnf debuginfo-install platform-python
$ cat x.py
import time
def func(): time.sleep(60)
func()

$ gdb -args python3 x.py
...
Reading symbols from python3...Reading symbols from /usr/lib/debug/usr/libexec/platform-python3.6m-3.6.7-2.el8.x86_64.debug...done.
done.
Dwarf Error: could not find partial DIE containing offset 0x344 [in module /usr/lib/debug/usr/libexec/platform-python3.6m-3.6.7-2.el8.x86_64.debug]

(gdb) p main
Dwarf Error: could not find partial DIE containing offset 0x344 [in module /usr/lib/debug/usr/libexec/platform-python3.6m-3.6.7-2.el8.x86_64.debug]

$ rpm -q gdb
gdb-8.2-3.el8.x86_64

--

Related bugs:

* bz#1638798 (Fedora rawhide, gdb 8.2.50, OPEN)
* bz#1639242 (Fedora 29, FIXED in gdb-8.2-5)

Comment 1 Victor Stinner 2018-12-04 16:32:43 UTC
Context: "py-bt" command in gdb fails when debugging Python, see bz#1641686.

Comment 2 Sergio Durigan Junior 2018-12-18 15:37:39 UTC
As discussed with Victor on IRC, the fix for this bug has already been pushed upstream:

commit 81fbbaf96216ed88973a069e4ed25379d7421ec8 (HEAD -> master, origin/master, origin/HEAD)
Author: Sergio Durigan Junior <sergiodj>
Date:   Wed Nov 28 17:22:08 2018 -0500

    Fix dwarf2read.c:dwarf2_find_containing_comp_unit's binary search

And has also been backported to F29 GDB, as can be checked on Bug 1639242.  Therefore, the only thing needed to fix this issue is to backport the patch to RHEL8 GDB.

I know Keith has been working on a patch to synchronize RHEL8 GDB with F29 GDB, and he was just testing things to see if nothing breaks.  Once this patch is pushed and a new RHEL8 GDB is built using it, the bug should be fixed.

Comment 3 Victor Stinner 2019-01-07 11:57:44 UTC
Happy new year ;-)

"(...) the only thing needed to fix this issue is to backport the patch to RHEL8 GDB. (...) Once this patch is pushed and a new RHEL8 GDB is built using it, the bug should be fixed."

Good! Any update on that?

Comment 4 Victor Stinner 2019-01-21 09:00:11 UTC
"gdb python3" and "gdb gdb" no longer crash. gdb is able to resolve symbols, put breakpoints, where works as expected, etc.

Does gdb-8.2-5.el8.x86_64 contain the fix? Maybe just close the issue as fixed in the current release?

Comment 5 Martin Cermak 2019-01-31 20:05:40 UTC
Flipping to Modified in order to be able to attach it to the erratum.

Comment 9 Michal Kolar 2019-02-06 08:50:06 UTC
Reproduced against gdb-8.2-3.el8 and verified against gdb-8.2-5.el8 with python3-debuginfo-3.6.8-1.el8.