Repository navigation
Closed
Labels
OS-risc-vtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
Compiling for riscv64 on Fedora 44 new Beta 2 build adds one more failing test, test_c_stack_unwind
1 test failed:
test_c_stack_unwind
475 tests OK.
1:01:50 load avg: 1.14 Re-running 1 failed tests in verbose mode in subprocesses
1:01:50 load avg: 1.14 Run 1 test in parallel using 1 worker process (timeout: 2 hour 15 min, worker timeout: 2 hour 20 min)
1:01:54 load avg: 1.12 [1/1/1] test_c_stack_unwind failed (1 failure)
Re-running test_c_stack_unwind in verbose mode (matching: test_manual_unwind_finds_expected_frames)
test_manual_unwind_finds_expected_frames (test.test_c_stack_unwind.ManualStackUnwindTests.test_manual_unwind_finds_expected_frames) ... #00 0x8000000000000000 -> other
{"length": 1, "python_frames": 0, "jit_frames": 0, "other_frames": 1, "jit_backend": null, "unwinder": "manual_frame_pointer_unwind"}
test_manual_unwind_finds_expected_frames (test.test_c_stack_unwind.ManualStackUnwindTests.test_manual_unwind_finds_expected_frames) (env={'PYTHON_JIT': '0'}) ... FAIL
======================================================================
FAIL: test_manual_unwind_finds_expected_frames (test.test_c_stack_unwind.ManualStackUnwindTests.test_manual_unwind_finds_expected_frames) (env={'PYTHON_JIT': '0'})
----------------------------------------------------------------------
Traceback (most recent call last):
File "/builddir/build/BUILD/python3.15-3.15.0_b2-build/Python-3.15.0b2/Lib/test/test_c_stack_unwind.py", line 285, in test_manual_unwind_finds_expected_frames
self.assertGreaterEqual(
~~~~~~~~~~~~~~~~~~~~~~~^
python_frames,
^^^^^^^^^^^^^^
STACK_DEPTH,
^^^^^^^^^^^^
f"expected to find Python frames on {self.machine} with env {env}",
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
)
^
AssertionError: 0 not greater than or equal to 10 : expected to find Python frames on riscv64 with env {'PYTHON_JIT': '0'}
----------------------------------------------------------------------
Ran 1 test in 1.394s
FAILED (failures=1)
test test_c_stack_unwind failed
1 test failed again:
test_c_stack_unwind
== Tests result: FAILURE then FAILURE ==
Most likely related to failing test_frame_pointer_unwind in Beta 1. See:
#150919
Full failing build information (environment, build logs, etc.):
https://riscv-koji.fedoraproject.org/koji/taskinfo?taskID=224014
CPython versions tested on:
3.15
Operating systems tested on:
Linux
Linked PRs
Reacted by Matěj Cepl
Metadata
Metadata
Assignees
Labels
OS-risc-vtestsTests in the Lib/test dirTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Activity
vstinner commentedon Jun 8, 2026
manual_unwind_from_fp() function in _testinternalcapi should maybe be adapted to support riscv64 ISA. I found this document: https://github.com/riscv-non-isa/riscv-elf-psabi-doc/blob/master/riscv-cc.adoc#frame-pointer-convention. I don't have access to a riscv64 machine.
vstinner commentedon Jun 16, 2026
@furkanonder: Can you please have a look?
vstinner commentedon Jun 16, 2026
The "riscv64 Ubuntu23 3.x" buildbot also fails: https://buildbot.python.org/#/builders/1379/builds/4681
mcepl commentedon Jun 16, 2026
I have the same results even on i586 with openSUSE/Factory.
vstinner commentedon Jun 17, 2026
That's a different architecture. If you care, you should open a separated issue for i586. You pass explicitly
-fomit-frame-pointerwhich goes against PEP 831 (approved in Python 3.15).mcepl commentedon Jun 17, 2026
I will have to ask about it, these are standard openSUSE
CFLAGSI am afraid.Hmm, they are not:
I wonder where it is coming from.
vstinner commentedon Jun 17, 2026
Please open a separated issue for i586. It's unrelated to riscv64.
gh-151040: Fix `test_c_stack_unwind` on RISC-V (#152370)
StanFromIreland commentedon Jul 1, 2026
Thanks all!
[3.15] gh-151040: Fix `test_c_stack_unwind` on RISC-V (GH-152370) (#1…