Skip to content

GH-142513: Reimplement executor management - #142931

Merged
markshannon merged 1 commit into
python:mainfrom
markshannon:fix-executor-management
Dec 18, 2025
Merged

markshannon merged 1 commit into
python:mainfrom
markshannon:fix-executor-management

Conversation

@markshannon

@markshannon markshannon commented Dec 18, 2025 •

Copy link
Copy Markdown
Member

Enforces the following two invariants:

  • Invalidating an executor does not cause arbitrary code to run
  • Executors are only freed at safe points

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok I've given this a quite thorough review. I thought about if it's possible for executors to be ressurected such that their refcnt != 0 anymore, but I don't see how that's possible considering executors are never reused.

@Fidget-Spinner

Copy link
Copy Markdown
Member

Some very strange connection things happening with git at the moment.

@markshannon markshannon added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Dec 18, 2025
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit be95cb0 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F142931%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Dec 18, 2025
@Fidget-Spinner

Fidget-Spinner commented Dec 18, 2025 •

Copy link
Copy Markdown
Member

@markshannon all the refleak buildbots don't run JIT precisely because the current refleak tests can't account for an executor being created in the midst of execution :)

If you want to get refleak + JIT working, you'd need to fix libregrtest

@markshannon

Copy link
Copy Markdown
Member Author

The sole buildbot failure seems unrelated to this PR.

@markshannon
markshannon merged commit e4058d7 into python:main Dec 18, 2025
@markshannon
markshannon deleted the fix-executor-management branch December 18, 2025 16:43
cocolato pushed a commit to cocolato/cpython that referenced this pull request Dec 18, 2025
* Invalidating an executor does not cause arbitrary code to run
* Executors are only freed at safe points
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants