Skip to content

3.15.0b2, Fedora 44, riscv64: failing test: test_c_stack_unwind #151040

Closed

Description

@davidlt

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

Activity

  1. added
    type-bugAn unexpected behavior, bug, or error
    on Jun 7, 2026
  2. vstinner commented on Jun 8, 2026

    @vstinner
    Member

    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.

  3. vstinner commented on Jun 16, 2026

    @vstinner
    Member

    @furkanonder: Can you please have a look?

  4. vstinner commented on Jun 16, 2026

    @vstinner
    Member

    The "riscv64 Ubuntu23 3.x" buildbot also fails: https://buildbot.python.org/#/builders/1379/builds/4681

  5. mcepl commented on Jun 16, 2026

    @mcepl
    Contributor

    I have the same results even on i586 with openSUSE/Factory.

  6. vstinner commented on Jun 17, 2026

    @vstinner
    Member

    I have the same results even on i586 with openSUSE/Factory.

    That's a different architecture. If you care, you should open a separated issue for i586. You pass explicitly -fomit-frame-pointer which goes against PEP 831 (approved in Python 3.15).

  7. mcepl commented on Jun 17, 2026

    @mcepl
    Contributor

    I have the same results even on i586 with openSUSE/Factory.

    That's a different architecture. If you care, you should open a separated issue for i586. You pass explicitly -fomit-frame-pointer which goes against PEP 831 (approved in Python 3.15).

    I will have to ask about it, these are standard openSUSE CFLAGS I am afraid.

    Hmm, they are not:

    mitmanek~/b/i/python315 (git: factory)$ rpm -E '%{optflags}'
    -O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables
    mitmanek~/b/i/python315 (git: factory)$ 
    

    I wonder where it is coming from.

  8. vstinner commented on Jun 17, 2026

    @vstinner
    Member

    Please open a separated issue for i586. It's unrelated to riscv64.

  9. added a commit that references this issue on Jun 29, 2026
  10. StanFromIreland commented on Jul 1, 2026

    @StanFromIreland
    Member

    Thanks all!

  11. added a commit that references this issue on Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    OS-risc-vtestsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions