diff --git a/Objects/object.c b/Objects/object.c index c9bcc0c7b09e63..1f10c2531fead1 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -3292,6 +3292,7 @@ int PyRefTracer_SetTracer(PyRefTracer tracer, void *data) { if (_PyRuntime.ref_tracer.tracer_func != NULL) { _PyReftracerTrack(NULL, PyRefTracer_TRACKER_REMOVED); if (PyErr_Occurred()) { + _PyEval_StartTheWorldAll(&_PyRuntime); return -1; } }