_PyEval_SetTrace() fails with RuntimeError: Cannot install a trace function while another trace function is being installed #98257
Labels
type-bug
An unexpected behavior, bug, or error
8000
The test_concurrency() of test_import fails randomly on sys.settrace(). Example:
The problem is that the _PyEval_SetTrace() function fails with RuntimeError("Cannot install a trace function while another trace function is being installed") on
Py_XDECREF(traceobj);
indirectly callssys.settrace()
.IMO
Py_XDECREF(traceobj);
should be called afterreentrant = 0;
, at the end of the function.The text was updated successfully, but these errors were encountered: