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
static int
force_instrument_lock_held(PyCodeObject *code, PyInterpreterState *interp)
AND
_PyMonitoring_SetEvents(int tool_id, _PyMonitoringEventSet events)
In the above functions, the world is stopped/the runtime lock is acquired. However, the JIT can invalidate executors. If the pending executors list becomes full, executors will be finalized. This in turn means arbitrary code can run which may try to acquire the runtime lock and cause a deadlock.
Bug report
Bug description:
We invalidate executors in the following code:
In the above functions, the world is stopped/the runtime lock is acquired. However, the JIT can invalidate executors. If the pending executors list becomes full, executors will be finalized. This in turn means arbitrary code can run which may try to acquire the runtime lock and cause a deadlock.
I discovered this while working on FT JIT.
CPython versions tested on:
3.15, 3.14, CPython main branch
Operating systems tested on:
No response
Linked PRs