Skip to content

test_free_threading.test_gc.TestGC.test_get_referrers can segfault #153777

Description

@StanFromIreland

Crash report

What happened?

See this Buildbot run:

test_get_referrers (test.test_free_threading.test_gc.TestGC.test_get_referrers) ... Fatal Python error: Segmentation fault
<Cannot show all threads while the GIL is disabled>
Stack (most recent call first):
  File "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/Lib/test/test_free_threading/test_gc.py", line 50 in gc_thread
  File "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/Lib/threading.py", line 1160 in run
  File "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/Lib/threading.py", line 1218 in _bootstrap_inner
  File "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/Lib/threading.py", line 1180 in _bootstrap
Current thread's C stack trace (most recent call first):
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _Py_DumpStack+0x3c [0x2ae5b7875a]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x32b280 [0x2ae5b92280]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x32b9a2 [0x2ae5b929a2]
  Binary file "linux-vdso.so.1", at __vdso_rt_sigreturn+0x0 [0x3fe789c800]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x1b1a0c [0x2ae5a18a0c]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyType_GetDict+0xc [0x2ae5a1a6b4]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x181a9c [0x2ae59e8a9c]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _Py_LoadAttr_StackRefSteal+0x5a [0x2ae5ac1388]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyEval_EvalFrameDefault+0x100a6 [0x2ae5ad4a5c]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x2780b8 [0x2ae5adf0b8]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x278214 [0x2ae5adf214]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyFunction_Vectorcall+0x48 [0x2ae59847ba]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11da7c [0x2ae5984a7c]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11e388 [0x2ae5985388]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x1203b0 [0x2ae59873b0]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x293470 [0x2ae5afa470]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x293914 [0x2ae5afa914]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyCallMethodDescriptorFastWithKeywords_StackRef+0x54 [0x2ae5ac1aee]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyEval_EvalFrameDefault+0x8262 [0x2ae5accc18]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x2780b8 [0x2ae5adf0b8]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x278214 [0x2ae5adf214]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at _PyFunction_Vectorcall+0x48 [0x2ae59847ba]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11da7c [0x2ae5984a7c]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11e388 [0x2ae5985388]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x1203b0 [0x2ae59873b0]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11ed88 [0x2ae5985d88]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x11f0ac [0x2ae59860ac]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at PyObject_Call+0x1e [0x2ae59860de]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x38e73e [0x2ae5bf573e]
  Binary file "/var/lib/buildbot/workers/rise-riscv64-3/3.x.rise-riscv64-3.nogil/build/python", at +0x30e01e [0x2ae5b7501e]
  Binary file "/lib/riscv64-linux-gnu/libc.so.6", at +0x710da [0x3fe77080da]
  Binary file "/lib/riscv64-linux-gnu/libc.so.6", at +0xc38cc [0x3fe775a8cc]
  <truncated rest of calls>
Extension modules: _testcapi, _testinternalcapi (total: 2)

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Output from running 'python -VV' on the command line:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtopic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dump

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions