Skip to content

test_free_threading.test_str flaky #162265

Open

Description

@encukou

test_free_threading.test_str sometimes fails with an assertion error in _PyDict_NotifyEvent.
Buildbot failure: https://buildbot.python.org/#/builders/1368/builds/6097

To reproduce sometimes):

$ ./python -m test test_free_threading.test_str -R:1000
[...]
X41.. ....................................................................
.....................python: ./Include/internal/pycore_dict.h:332: _PyDict_NotifyEvent: Assertion `Py_REFCNT((PyObject*)mp) > 0' failed.
Fatal Python error: Aborted

<Cannot show all threads while the GIL is disabled>
Stack (most recent call first):
  File "/home/encukou/dev/cpython/Lib/test/test_free_threading/test_str.py", line 100 in work
  File "/home/encukou/dev/cpython/Lib/test/support/threading_helper.py", line 279 in wrapper_func
  File "/home/encukou/dev/cpython/Lib/threading.py", line 1161 in run
  File "/home/encukou/dev/cpython/Lib/threading.py", line 1219 in _bootstrap_inner
  File "/home/encukou/dev/cpython/Lib/threading.py", line 1181 in _bootstrap

Current thread's C stack trace (most recent call first):
  Binary file "./python", at _Py_DumpStack+0x33 [0x688f24]
  Binary file "./python" [0x6a551a]
  Binary file "./python" [0x6a5d76]
  Binary file "/lib64/libc.so.6", at +0x19fb0 [0x7fdefd884fb0]
  Binary file "/lib64/libc.so.6", at +0x74d0c [0x7fdefd8dfd0c]
  Binary file "/lib64/libc.so.6", at gsignal+0x1e [0x7fdefd884e8e]
  Binary file "/lib64/libc.so.6", at abort+0x26 [0x7fdefd86c7b3]
  Binary file "/lib64/libc.so.6", at +0x2804 [0x7fdefd86d804]
  Binary file "/lib64/libc.so.6", at __assert_fail+0xb5 [0x7fdefd87cd45]
  Binary file "./python" [0x4f2f55]
  Binary file "./python" [0x4f5718]
  Binary file "./python" [0x4f58aa]
  Binary file "./python", at PyDict_Pop+0x46 [0x4f5917]
  Binary file "./python" [0x4f59c2]
  Binary file "./python" [0x4f5a03]
  Binary file "./python" [0x4f5a3c]
  Binary file "./python", at _PyCallMethodDescriptorFast_StackRef+0x59 [0x5cc032]
  Binary file "./python", at _PyEval_EvalFrameDefault+0x8704 [0x5d7571]
  Binary file "./python" [0x5eabb2]
  Binary file "./python" [0x5ead25]
  Binary file "./python", at _PyFunction_Vectorcall+0x51 [0x4a14f1]
  Binary file "./python" [0x4a1805]
  Binary file "./python" [0x4a1dba]
  Binary file "./python" [0x4a4518]
  Binary file "./python" [0x60c8b3]
  Binary file "./python" [0x60d2c3]
  Binary file "./python", at _PyCallMethodDescriptorFastWithKeywords_StackRef+0x5e [0x5cc104]
  Binary file "./python", at _PyEval_EvalFrameDefault+0x8b11 [0x5d797e]
  Binary file "./python" [0x5eabb2]
  Binary file "./python" [0x5ead25]
  Binary file "./python", at _PyFunction_Vectorcall+0x51 [0x4a14f1]
  Binary file "./python" [0x4a1805]
  <truncated rest of calls>

Extension modules: _testcapi (total: 1)
Aborted                    (core dumped) ./python -m test test_free_threading.test_str -R:1000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dump

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions