Bug 1678277 - test_gdb: test_gc() fails on s390x with: Unable to locate python frame
Summary: test_gdb: test_gc() fails on s390x with: Unable to locate python frame
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: python3
Version: 32
Hardware: s390x
OS: Unspecified
low
unspecified
Target Milestone: ---
Assignee: Charalampos Stratakis
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On: 1734327
Blocks: ZedoraTracker
TreeView+ depends on / blocked
 
Reported: 2019-02-18 12:14 UTC by Victor Stinner
Modified: 2020-03-30 18:35 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1712977 (view as bug list)
Environment:
Last Closed: 2020-03-30 18:35:09 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Python 37631 None None None 2019-07-23 13:28:50 UTC

Description Victor Stinner 2019-02-18 12:14:56 UTC
The s390x job of the Fedora CI fails on building python3 package.

test_gdb.test_gc() failed twice on Python compiled in **debug mode** on s390x arch:

FAIL: test_gc (test.test_gdb.PyBtTests)
Verify that "py-bt" indicates if a thread is garbage-collecting
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/Python-3.7.2/Lib/test/test_gdb.py", line 852, in test_gc
    self.assertIn('Garbage-collecting', gdb_output)
AssertionError: 'Garbage-collecting' not found in 'Breakpoint 1 (builtin_id) pending.\n[Thread debugging using libthread_db enabled]\nUsing host libthread_db library "/lib64/libthread_db.so.1".\n\nBreakpoint 1, builtin_id (self=, self@entry=<error reading variable: value has been optimized out>, v=42, v@entry=<error reading variable: value has been optimized out>) at /builddir/build/BUILD/Python-3.7.2/Python/bltinmodule.c:1216\n1216\t    return PyLong_FromVoidPtr(v);\nBreakpoint 2: file /builddir/build/BUILD/Python-3.7.2/Modules/gcmodule.c, line 860.\n[Inferior 1 (process 12917) exited normally]\nUnable to locate python frame\n'

Reformatted gdb catched output:

Breakpoint 1 (builtin_id) pending.
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".

Breakpoint 1, builtin_id (self=, self@entry=<error reading variable: value has been optimized out>, v=42, v@entry=<error reading variable: value has been optimized out>) at /builddir/build/BUILD/Python-3.7.2/Python/bltinmodule.c:1216
1216	    return PyLong_FromVoidPtr(v);
Breakpoint 2: file /builddir/build/BUILD/Python-3.7.2/Modules/gcmodule.c, line 860.
[Inferior 1 (process 12917) exited normally]
Unable to locate python frame

Comment 1 Victor Stinner 2019-02-18 12:20:32 UTC
Related bug reports:

* 2015: https://bugzilla.redhat.com/show_bug.cgi?id=1181034#c0 "test_gdb fails on s390(x)" closed as "EOL" (no fixed)
* 2016: https://bugzilla.redhat.com/show_bug.cgi?id=1333064#c0 "/CoreOS/python/Sanity/gdb test is failing on s390x" closed as ERRATA except that no change has been written :-)
* 2016: https://github.com/python/cpython/commit/0d88c652318c4c5eed77fd2e78e9e955ffa5c8d1 fix test_gdb on s390x (ignore some warnings)
* 2018: https://bugs.python.org/issue34007 "test_gdb fails in s390x SLES buildbots" fixed upstream in Python 3.7.1

Comment 2 Charalampos Stratakis 2019-05-22 14:45:46 UTC
This seems to be the change that triggered the bug for some reason: https://src.fedoraproject.org/rpms/python3/c/8927d3f2671041d33c2682b47d238c7070474d0e?branch=master

Comment 3 Marcel Plch 2019-06-11 11:40:52 UTC
I am currently taking a look at this issue.

Comment 5 Victor Stinner 2019-08-20 13:20:16 UTC
If I understood correctly https://bugs.python.org/issue37631, test_gdb fails on s390x because EXTRA_CFLAGS variable has not the expected priority in Python Makefile/configure. So this issue is blocked by https://bugs.python.org/issue37631.

Comment 6 Miro Hrončok 2019-10-01 13:14:23 UTC
A side note:

https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

-Og
Optimize debugging experience. -Og should be the optimization level of choice for the standard edit-compile-debug cycle, offering a reasonable level of optimization while maintaining fast compilation and a good debugging experience. It is a better choice than -O0 for producing debuggable code because some compiler passes that collect debug information are disabled at -O0.

Like -O0, -Og completely disables a number of optimization passes so that individual options controlling them have no effect. Otherwise -Og enables all -O1 optimization flags except for those that may interfere with debugging:

-fbranch-count-reg  -fdelayed-branch 
-fdse  -fif-conversion  -fif-conversion2  
-finline-functions-called-once 
-fmove-loop-invariants  -fssa-phiopt 
-ftree-bit-ccp  -ftree-dse  -ftree-pta  -ftree-sra

Comment 7 Miro Hrončok 2019-10-01 13:16:25 UTC
Ignore my previous comment, it was posted to a wrong bug.

Comment 8 Miro Hrončok 2019-10-15 13:23:55 UTC
Trying to make the debug build be compiled with -Og:

https://src.fedoraproject.org/rpms/python3/pull-request/137 merged
https://src.fedoraproject.org/rpms/python3/pull-request/141 on review (followup)

Comment 9 Ben Cotton 2019-10-31 18:45:54 UTC
This message is a reminder that Fedora 29 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 29 on 2019-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '29'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 29 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 10 Ben Cotton 2019-11-27 23:33:24 UTC
Fedora 29 changed to end-of-life (EOL) status on 2019-11-26. Fedora 29 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Comment 12 Ben Cotton 2020-02-11 15:39:55 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 32 development cycle.
Changing version to 32.

Comment 13 Charalampos Stratakis 2020-03-30 18:35:09 UTC
This is no longer reproducible, however there are some other failures specific to s390x. Check bug 1818857


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