Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
Closed
Description
Bug report
Bug description:
We invalidate executors in the following code:
static intforce_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.
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