You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a --with-trace-refs --with-pydebug build of 3.12 and main, even a simple test like test_int triggers an assertion error in the refchain handling. I expect it's caused by @ericsnowcurrently's PR #107567.
cpython-tracerefs % ../../cpython/configure -C --with-trace-refs --with-pydebug
[...]
cpython-tracerefs % make
[...]
cpython-tracerefs % ./python -m test test_int
0:00:00 load avg: 2.79 Run tests sequentially
0:00:00 load avg: 2.79 [1/1] test_int
== Tests result: SUCCESS ==
1 test OK.
Total duration: 477 ms
Tests result: SUCCESS
../../cpython/Objects/object.c:2234: _Py_ForgetReference: Assertion failed: invalid object chain
Enable tracemalloc to get the memory block allocation traceback
object address : 0x7ff86d998050
object refcount : 0
object type : 0x55fbc49aba60
object type name: dict
object repr : <refcnt 0 at 0x7ff86d998050>
Fatal Python error: _PyObject_AssertFailed: _PyObject_AssertFailed
Python runtime state: finalizing (tstate=0x000055fbc4b27e88)
Current thread 0x00007ff86daec740 (most recent call first):
<no Python frame>
Aborted
FWIW, if the fix for this is too involved or too complicated, I'd rather roll back #107567 and leave tracerefs broken when using isolated subinterpreters than leaving tracerefs broken for everything.
I'm okay with a revert on 3.12. You're right that the previous state of affairs was better.
FWIW, there's an object leaking between interpreters somewhere and tracking that down is a big pain. I don't know how long it will take, so reverting now makes sense. I would like to un-revert once I've tracked down the culprit though.
Activity
Yhg1s commentedon Aug 4, 2023
FWIW, if the fix for this is too involved or too complicated, I'd rather roll back #107567 and leave tracerefs broken when using isolated subinterpreters than leaving tracerefs broken for everything.
ericsnowcurrently commentedon Aug 4, 2023
I'm okay with a revert on 3.12. You're right that the previous state of affairs was better.
FWIW, there's an object leaking between interpreters somewhere and tracking that down is a big pain. I don't know how long it will take, so reverting now makes sense. I would like to un-revert once I've tracked down the culprit though.
[3.12] gh-107630: Revert "[3.12] gh-107080: Fix Py_TRACE_REFS Crashes…
sunmy2019 commentedon Aug 6, 2023
Confirmed it is fixed on the 3.12 branch. The issue would remain open for the main branch.
gh-107630: Initialize Each Interpreter's refchain Properly (gh-107733)
gh-107630: Fix Remaining Subinterpreters Crashes on Py_TRACE_REFS Bui…
ericsnowcurrently commentedon Aug 8, 2023
Once gh-107751 lands, this can be closed.