Skip to content

test_manual_unwind_respects_frame_pointers fails on x86_64 Fedora Linux with enabled JIT (yes-off) #144741

@befeleme

Description

@befeleme

Bug report

Bug description:

We build Python on x86_64 and aarch64 with --enable-experimental-jit=yes-off . The newly added test passes for aarch64 but doesn't for x86_64, with the following traceback.
For completeness, the CFLAGS we build with are:

CFLAGS=' -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer  '

I am unable to reproduce this outside of the rpm build context yet, but I'm happy to test any ideas.

Full traceback:

Re-running test_frame_pointer_unwind in verbose mode (matching: test_manual_unwind_respects_frame_pointers)
test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) ... #00 0x7f8763378fda -> other
#01 0x7f87632eeac7 -> other
#02 0x7f87632efb77 -> other
#03 0x7f87634ddd3c -> other
#04 0x7f87634e6604 -> other
#05 0x7f87634da121 -> other
#06 0x7f876351552d -> other
#07 0x7f87632eff85 -> other
#08 0x7f87632eeac7 -> other
#09 0x7f87632efb77 -> other
#10 0x7f8763852186 -> other
#11 0x7f87634de1f1 -> other
#12 0x7f87634e8cdc -> other
#13 0x7f87634da121 -> other
#14 0x7f876351552d -> other
#15 0x7f87632eff85 -> other
#16 0x7f87632eeac7 -> other
#17 0x7f87632efb77 -> other
#18 0x7f8763852186 -> other
#19 0x7f87634de1f1 -> other
#20 0x7f87634e8cdc -> other
#21 0x7f87634da121 -> other
#22 0x7f876351552d -> other
#23 0x7f87632eff85 -> other
#24 0x7f87632eeac7 -> other
#25 0x7f87632efb77 -> other
#26 0x7f8763852186 -> other
#27 0x7f87634de1f1 -> other
#28 0x7f87634e8cdc -> other
#29 0x7f87634da121 -> other
#30 0x7f876351552d -> other
#31 0x7f87632eff85 -> other
#32 0x7f87632eeac7 -> other
#33 0x7f87632efb77 -> other
#34 0x7f8763852186 -> other
#35 0x7f87634de1f1 -> other
#36 0x7f87634e8cdc -> other
#37 0x7f87634da121 -> other
#38 0x7f876351552d -> other
#39 0x7f87632eff85 -> other
#40 0x7f87632eeac7 -> other
#41 0x7f87632efb77 -> other
#42 0x7f8763852186 -> other
#43 0x7f87634de1f1 -> other
#44 0x7f87634e8cdc -> other
#45 0x7f87634da121 -> other
#46 0x7f876351552d -> other
#47 0x7f87632eff85 -> other
#48 0x7f87632eeac7 -> other
#49 0x7f87632efb77 -> other
#50 0x7f8763852186 -> other
#51 0x7f87634de1f1 -> other
#52 0x7f87634e8cdc -> other
#53 0x7f87634da121 -> other
#54 0x7f876351552d -> other
#55 0x7f87632eff85 -> other
#56 0x7f87632eeac7 -> other
#57 0x7f87632efb77 -> other
#58 0x7f8763852186 -> other
#59 0x7f87634de1f1 -> other
#60 0x7f87634e8cdc -> other
#61 0x7f87634da121 -> other
#62 0x7f876351552d -> other
#63 0x7f87632eff85 -> other
#64 0x7f87632eeac7 -> other
#65 0x7f87632efb77 -> other
#66 0x7f8763852186 -> other
#67 0x7f87634de1f1 -> other
#68 0x7f87634e8cdc -> other
#69 0x7f87634da121 -> other
#70 0x7f876351552d -> other
#71 0x7f87632eff85 -> other
#72 0x7f87632eeac7 -> other
#73 0x7f87632efb77 -> other
#74 0x7f8763852186 -> other
#75 0x7f87634de1f1 -> other
#76 0x7f87634e8cdc -> other
#77 0x7f87634da121 -> other
#78 0x7f876351552d -> other
#79 0x7f87632eff85 -> other
#80 0x7f87632eeac7 -> other
#81 0x7f87632efb77 -> other
#82 0x7f8763852186 -> other
#83 0x7f8763378e09 -> other
#84 0x7f87632eeac7 -> other
#85 0x7f87632efb77 -> other
#86 0x7f87634ddd3c -> other
#87 0x7f87634e6604 -> other
#88 0x7f87634da121 -> other
#89 0x7f876351552d -> other
#90 0x7f87634dd758 -> other
#91 0x7f876374d7ed -> other
#92 0x7f876374dc58 -> other
#93 0x7f876374d40e -> other
#94 0x7f876374b98d -> other
#95 0x7f876378b0fd -> other
#96 0x7f876378c121 -> other
#97 0x7f876378c2f3 -> other
#98 0x7f876378c3c9 -> other
#99 0x7f876378c491 -> other
#100 0x55f0d60984bd -> python
#101 0x7f8763008681 -> other
#102 0x7f8763008798 -> other
#103 0x55f0d60983d5 -> python
{"length": 104, "python_frames": 2, "jit_frames": 0, "other_frames": 102, "jit_backend": "jit"}
JIT ranges:
  0x7fb224624000-0x7fb224647000
#00 0x7fb233378fda -> other
#01 0x7fb2332eeac7 -> other
#02 0x7fb2332efb77 -> other
#03 0x7fb2334ddd3c -> other
#04 0x7fb2334e6604 -> other
#05 0x7fb2334da121 -> other
#06 0x7fb23351552d -> other
#07 0x7fb2332eff85 -> other
#08 0x7fb2332eeac7 -> other
#09 0x7fb2332efb77 -> other
#10 0x7fb233852186 -> other
#11 0x7fb2334de1f1 -> other
#12 0x7fb22462f00f -> jit
{"length": 13, "python_frames": 0, "jit_frames": 1, "other_frames": 12, "jit_backend": "jit"}
  test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '1'}) ... FAIL
======================================================================
FAIL: test_manual_unwind_respects_frame_pointers (test.test_frame_pointer_unwind.FramePointerUnwindTests.test_manual_unwind_respects_frame_pointers) (env={'PYTHON_JIT': '1'})
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/python3.15-3.15.0_a6-build/Python-3.15.0a6/Lib/test/test_frame_pointer_unwind.py", line 182, in test_manual_unwind_respects_frame_pointers
    self.assertGreater(
    ~~~~~~~~~~~~~~~~~~^
        python_frames,
        ^^^^^^^^^^^^^^
        0,
        ^^
        f"expected to find Python frames on {self.machine} with env {env}",
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: 0 not greater than 0 : expected to find Python frames on x86_64 with env {'PYTHON_JIT': '1'}

CPython versions tested on:

3.15

Operating systems tested on:

Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-JITtype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions