GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GH-142513: Reimplement executor management by markshannon · Pull Request #142931 · python/cpython

Conversation

@markshannon

@markshannon markshannon commented Dec 18, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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
  • Issue: Executor management code lacks proper invariants leading to bugs. #142513

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@markshannon
Reimplement executor management so that invalidating an executor does…
be95cb0
… not cause arbitrary code to run
@markshannon
markshannon requested review from Fidget-Spinner, ZeroIntensity and ericsnowcurrently as code owners December 18, 2025 12:29
@bedevere-app bedevere-app Bot mentioned this pull request Dec 18, 2025
Executor management code lacks proper invariants leading to bugs. #142513
Closed
@bedevere-app bedevere-app Bot added the awaiting core review label Dec 18, 2025
@markshannon markshannon added the skip news label Dec 18, 2025
Fidget-Spinner
Fidget-Spinner approved these changes Dec 18, 2025
View reviewed changes

@Fidget-Spinner Fidget-Spinner left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Dec 18, 2025
@Fidget-Spinner

Fidget-Spinner commented Dec 18, 2025

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

bedevere-bot commented Dec 18, 2025

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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon

markshannon commented Dec 18, 2025

Copy link
Copy Markdown
Member Author

The sole buildbot failure seems unrelated to this PR.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@markshannon
markshannon merged commit e4058d7 into python:main Dec 18, 2025
115 of 120 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label 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
@markshannon @cocolato
pythonGH-142513: Reimplement executor management (pythonGH-142931)
07eee17
* Invalidating an executor does not cause arbitrary code to run
* Executors are only freed at safe points
@sergey-miryanov sergey-miryanov mentioned this pull request Dec 19, 2025
gh-142476: fix memory leak when creating JIT executors #142492
Merged
@maurycy maurycy mentioned this pull request Dec 19, 2025
gh-141658: JIT: lazy executor flush while the world is stopped #142329
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ZeroIntensity ZeroIntensity Awaiting requested review from ZeroIntensity ZeroIntensity is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@markshannon @Fidget-Spinner @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.