Repository navigation
test__xxsubinterpreters: test_already_running() crash randomly on Python built with TraceRefs: invalid object chain #107080
Copy link
Copy link
Closed
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jul 22, 2023 - changed the title
[-]test__xxsubinterpreters: test_already_running() crash randomly on Python built with TraceRefs[/-][+]test__xxsubinterpreters: test_already_running() crash randomly on Python built with TraceRefs: invalid object chain[/+]on Jul 22, 2023 The object chain is invalid:
(gdb) frame #13 0x000000000055e731 in _Py_ForgetReference (op=(None, None, None)) at Objects/object.c:2235 2235 _PyObject_ASSERT_FAILED_MSG(op, "invalid object chain"); (gdb) l 2230 } 2231 2232 if (op == &refchain || 2233 op->_ob_prev->_ob_next != op || op->_ob_next->_ob_prev != op) 2234 { 2235 _PyObject_ASSERT_FAILED_MSG(op, "invalid object chain"); 2236 } 2237 2238 #ifdef SLOW_UNREF_CHECK 2239 PyObject *p; (gdb) p op->_ob_prev->_ob_next != op $14 = 1 (gdb) p op->_ob_next->_ob_prev != op $15 = 1Similar error in test_interpreters.test_create_many_threaded():
$ ./python -m test test_interpreters -m test_create_many_threaded -v (...) test_create_many_threaded (test.test_interpreters.StressTests.test_create_many_threaded) ... Objects/object.c:2235: _Py_ForgetReference: Assertion failed: invalid object chain (...)--with-trace-refsbuilds use a C global variable to store the linked list of objects. The problem is that the variable is used by all interpreters. The solution is to make that variable per-interpreter.- added3.12only security fixesonly security fixes3.13only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)
on Aug 2, 2023 - added a commit that references this issue
on Aug 3, 2023 - added a commit that references this issue
on Aug 3, 2023 - linked a pull request that will close this issue[3.12] gh-107080: Fix Py_TRACE_REFS Crashes Under Isolated Subinterpreters #107751
on Aug 16, 2023 - added a commit that references this issue
on Aug 16, 2023 serhiy-storchaka reopened this Aug 16, 2023
@serhiy-storchaka: Hum, is this issue fixed or not?
I reopened it only because the backport to 3.12 was not merged yet. I linked the backport PR to this issue and thought that merging it will automatically close the issue, but it did not happen.
Reacted by Victor Stinner and Eric Snow
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13only security fixesonly security fixesinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-subinterpreterstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
AMD64 Arch Linux TraceRefs 3.x: https://buildbot.python.org/all/#/builders/484/builds/3721
Assertion error: Objects/object.c:2235: _Py_ForgetReference: Assertion failed: invalid object chain.
Python built with:
Linked PRs