test_frame does crash randomly on Linux (x86-64, ppc64le, s390x) #133261
Copy link
Copy link
Closed
Labels
release-blockertestsTests in the Lib/test dirTests in the Lib/test dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Description
Crash report
Example: https://buildbot.python.org/#/builders/64/builds/9301
test_repr_deep (test.test_frame.FrameLocalsProxyMappingTests.test_repr_deep) ...
Fatal Python error: Segmentation fault
Current thread 0x00007f2ed21d5400 [python] (most recent call first):
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 247 in handle
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 813 in assertRaises
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/test/mapping_tests.py", line 634 in test_repr_deep
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 615 in _callTestMethod
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 669 in run
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/case.py", line 725 in __call__
File "/home/buildbot/buildarea/3.x.cstratak-RHEL8-x86_64.lto/build/Lib/unittest/suite.py", line 122 in run
...
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
release-blockertestsTests in the Lib/test dirTests in the Lib/test dirtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump
Projects
- StatusShow more project fieldsDone
Activity
vstinner commentedon May 1, 2025
The crash might be related to the recent trashcan change: 44e4c47
vstinner commentedon May 1, 2025
Extract of the gdb backtrace:
pythongh-133261: Use __builtin_frame_address() on GCC 9 and older
ambv commentedon May 1, 2025
Also happened randomly on my Windows 11 buildbot:
https://buildbot.python.org/#/builders/1088/builds/722/steps/5/logs/stdio
vstinner commentedon May 1, 2025
Oh strange. This bug looks more like #133199 : assertion failure in _PyObject_GC_UNTRACK().
gh-133261: Use __builtin_frame_address() on GCC 9 and older (#133269)
vstinner commentedon May 1, 2025
@ambv: Would you mind to open a separated issue for the Windows failure? It's a different root cause related to _PyObject_GC_UNTRACK().
encukou commentedon May 2, 2025
Since the PR was merged, the s390x RHEL8 buildbot started failing: https://buildbot.python.org/#/builders/442/builds/9249
StanFromIreland commentedon May 4, 2025
Can also reproduce (~25% of the time) on my machine, x86-64 Fedora 42.
vstinner commentedon May 4, 2025
The crash or the GC untrack assertion error?
StanFromIreland commentedon May 4, 2025
The assertion error, apologies, I should have specified.
vstinner commentedon May 4, 2025
Can you please open a new issue for the assertion error?
vstinner commentedon May 4, 2025
I can reproduce the crash ("Fatal Python error: Segmentation fault") on x86-64 Fedora 42:
Output:
14 remaining items
markshannon commentedon May 5, 2025
It appears that
_PyTrash_thread_destroy_chain()is being called correctly, during later handling of the overflow.GH-133261: Make sure that the GC doesn't untrack objects in trashcan (G…
vstinner commentedon May 5, 2025
Fixed by #133431. Thanks @markshannon.
vstinner commentedon May 5, 2025
I reopen the issue, sadly an assertion fails on x86 (32-bit): #133431 (comment)
GH-133261: Make sure trashcan pointers look mortal -- 32 bit (GH-133450)
hugovk commentedon May 6, 2025
Has the merge of #133450 fixed this?
markshannon commentedon May 6, 2025
I believe so, yes.
pythonGH-133261: Make sure that the GC doesn't untrack objects in tra…
pythonGH-133261: Make sure trashcan pointers look mortal -- 32 bit (p…