Bug 1613614
| Summary: | py-bt is broken, results in exception | |||
|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | ell1e <el> | |
| Component: | python3 | Assignee: | Charalampos Stratakis <cstratak> | |
| Status: | CLOSED DUPLICATE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | |
| Severity: | unspecified | Docs Contact: | ||
| Priority: | unspecified | |||
| Version: | 28 | CC: | afazekas, bkabrda, cedric.bellegarde, cstratak, dmalcolm, mcyprian, mhroncok, mplch, pviktori, rkuska, shcherbina.iryna, tomspur, torsava, vstinner | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | Unspecified | |||
| OS: | Unspecified | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | If docs needed, set a value | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 1639242 (view as bug list) | Environment: | ||
| Last Closed: | 2018-12-04 16:21:21 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: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 1639242, 1660220 | |||
|
Description
ell1e
2018-08-08 02:10:22 UTC
I reproduced the issue:
$ sudo dnf debuginfo-install python3
$ cat x.py
import time
def dodo():
print("dodo")
time.sleep(3600)
dodo()
vstinner@apu$ gdb -args python3 x.py
GNU gdb (GDB) Fedora 8.1.1-3.fc28
(...)
Reading symbols from python3...Reading symbols from /usr/lib/debug/usr/bin/python3.6-3.6.6-1.fc28.x86_64.debug...done.
done.
Dwarf Error: could not find partial DIE containing offset 0x316 [in module /usr/lib/debug/usr/bin/python3.6-3.6.6-1.fc28.x86_64.debug]
(gdb) run
Starting program: /usr/bin/python3 x.py
(...)
dodo
^C
Program received signal SIGINT, Interrupt.
0x00007ffff6bf2787 in select () from /lib64/libc.so.6
(gdb) py-bt
Traceback (most recent call first):
<unknown at remote 0x7ffff7e5f7e0>
Python Exception <class 'TypeError'> 'FakeRepr' object is not subscriptable:
Error occurred in Python command: 'FakeRepr' object is not subscriptable
The root issue comes from gdb:
"Dwarf Error: could not find partial DIE containing offset 0x316 [in module /usr/lib/debug/usr/bin/python3.6-3.6.6-1.fc28.x86_64.debug]"
I debugged /usr/lib/debug/usr/lib64/libpython3.6m.so.1.0-3.6.6-1.fc28.x86_64.debug-gdb.py : the FakeRepr error indirectly comes from the fact that gdb fails to read debug symbols (the Dwarf Error).
On the Python side, python-gdb.py should be enhanced to better handle such error (exception while computing the line number), but the root issue is in gdb which fails to read debug symbols.
> On the Python side, python-gdb.py should be enhanced to better handle such error (exception while computing the line number) I created https://bugs.python.org/issue34989 and proposed a fix for that. > the root issue is in gdb which fails to read debug symbols I created bug #1639242 to track the gdb issue. Looks issue if fixed on python side, any chance to get the fix in Fedora 29? The Python change is just to get a better error message. The issue needs to be fixed in gdb. gdb has been fixed in Fedora 28 and 29 and I confirm that it fixed the py-bt command: https://bugzilla.redhat.com/show_bug.cgi?id=1639242#c10 *** This bug has been marked as a duplicate of bug 1639242 *** |