Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

JIT executor invalidation is called in unsafe ways which may deadlock #141658

Closed
Assignees
Fidget-Spinner
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or error
@Fidget-Spinner

Description

@Fidget-Spinner

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

Linked PRs

Metadata

Metadata

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2026 Movatter.jp