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 850398 - python backtrace "py-bt" gdb command doesn't work on x86_64
Summary: python backtrace "py-bt" gdb command doesn't work on x86_64
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: python
Version: 7.0
Hardware: x86_64
OS: Unspecified
medium
low
Target Milestone: rc
: ---
Assignee: Python Maintainers
QA Contact: Branislav Náter
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-21 14:22 UTC by Branislav Náter
Modified: 2014-06-13 12:43 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:43:36 UTC
Target Upstream Version:
Embargoed:
bnater: needinfo-


Attachments (Terms of Use)

Description Branislav Náter 2012-08-21 14:22:38 UTC
Description of problem:
Looks like there is regression in printing feature on x86_64 architecture. Feature does work correctly on ppc64 and s390x.

Version-Release number of selected component (if applicable):
python-2.7.3-7.el7.x86_64
python-debuginfo-2.7.3-7.el7.x86_64
gdb-7.4.50.20120120-46.el7.x86_64

How reproducible:
Output from automated test:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6e84ebf in __strlen_sse42 () from /lib64/libc.so.6
#10 Frame 0x6e3180, for file /usr/lib64/python2.7/ctypes/__init__.py, line 504, in string_at (ptr=3735928559, size=-1)
    return _string_at(ptr, size)
#14 (frame information optimized out)
#17 Frame 0x6d93a0, for file test.py, line 13, in <module> ()
    f.bar()
A debugging session is active.

	Inferior 1 [process 3947] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
:: [   PASS   ] :: Running gdb
:: [   PASS   ] :: File 'output' should not contain 'Error occurred in Python command'
:: [   PASS   ] :: File 'output' should contain 'file .*ctypes.*in.*string_at'
:: [   FAIL   ] :: File 'output' should contain 'file.*test.py.*in.*bar' 
:: [   PASS   ] :: File 'output' should contain 'file.*test.py.*in.*module'

=============================================================================
Additional info:
Pretty output from s390x architecture:

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: Test
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
PyString_FromString (str=0xdeadbeef <Address 0xdeadbeef out of bounds>) at /usr/src/debug/Python-2.7.3/Objects/stringobject.c:121
121	    size = strlen(str);
#9 Frame 0x800e4038, for file /usr/lib64/python2.7/ctypes/__init__.py, line 504, in string_at (ptr=3735928559, size=-1)
    return _string_at(ptr, size)
#13 Frame 0x800da598, for file test.py, line 4, in bar (self=<Foo(someattr=42, someotherattr={'three': [(), (None,), (None, None)], 'two': 2L, 'one': 1}) at remote 0x3fffda40048>, string_at=<function at remote 0x3fffda3fba8>)
    string_at(0xDEADBEEF) # this code will cause Python to segfault
#16 Frame 0x800d9f08, for file test.py, line 13, in <module> ()
    f.bar()
A debugging session is active.

	Inferior 1 [process 4978] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
:: [   PASS   ] :: Running gdb
:: [   PASS   ] :: File 'output' should not contain 'Error occurred in Python command'
:: [   PASS   ] :: File 'output' should contain 'file .*ctypes.*in.*string_at'
:: [   PASS   ] :: File 'output' should contain 'file test.py, line 4, in bar.*someattr=42'
:: [   PASS   ] :: File 'output' should contain 'file test.py, line 13, in <module>'

Comment 4 Petr Šplíchal 2013-02-22 11:15:57 UTC
I guess broken functionality on x86_64 is caused by bug 556975.
However, on RHEL6 we get at least something rather than just
"frame information optimized out", here's the RHEL6 output:

Program received signal SIGSEGV, Segmentation fault.
__strlen_sse2 () at ../sysdeps/x86_64/strlen.S:32
32		movdqu	(%rdi), %xmm1
#10 file '/usr/lib64/python2.6/ctypes/__init__.py', in 'string_at'
#14 file 'test.py', in 'bar'
#17 file 'test.py', in '<module>'
A debugging session is active.

Dave, could we get the same on RHEL7 until bug 556975 is fixed?

Comment 6 Bohuslav "Slavek" Kabrda 2013-07-24 09:58:18 UTC
There is a chance that this may be fixed by fixing https://bugzilla.redhat.com/show_bug.cgi?id=835053, let's wait till that is fixed and then rerun the tests using new build.

Comment 7 Branislav Náter 2013-07-31 13:53:46 UTC
Issue si fixed in python-debug-2.7.5-1.el7

<snip>
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6d6e631 in __strlen_sse2 () from /lib64/libc.so.6
#10 Frame 0x86c2d0, for file /usr/lib64/python2.7/ctypes/__init__.py, line 504, in string_at (ptr=3735928559, size=-1)
    return _string_at(ptr, size)
#14 Frame 0x686140, for file test.py, line 5, in bar (self=<Foo(someattr=42, someotherattr={'three': [(), (None,), (None, None)], 'two': 2L, 'one': 1}) at remote 0x823600>, string_at=<function at remote 0x884450>)
    string_at(0xDEADBEEF) # this code will cause Python to segfault
#17 Frame 0x85d2b0, for file test.py, line 16, in <module> ()
    f.bar()
A debugging session is active.

	Inferior 1 [process 1476] will be killed.

Quit anyway? (y or n) [answered Y; input not from terminal]
:: [   PASS   ] :: Running gdb
:: [   PASS   ] :: File 'output' should not contain 'Error occurred in Python command'
:: [   PASS   ] :: File 'output' should contain '[fF]ile .*ctypes.*in.*string_at'
:: [   PASS   ] :: File 'output' should contain '[fF]ile.*test.py.*in.*bar'
:: [   PASS   ] :: File 'output' should contain '[fF]ile.*test.py.*in.*module'
</snip>

Comment 8 Ludek Smid 2014-06-13 12:43:36 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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