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-123923: Defer refcounting for `f_executable` in `_PyInterpreterFrame` by colesbury · Pull Request #123924 · python/cpython

Conversation

@colesbury

@colesbury colesbury commented Sep 10, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Use a _PyStackRef and defer the reference to f_executable when possible. This avoids some reference count contention in the common case of executing the same code object from multiple threads concurrently in the free-threaded build.

  • Issue: Use deferred reference counting in some _PyInterpreterFrame fields #123923

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury
pythongh-123923: Defer refcounting for f_executable in `_PyInterpre…
24e9b4b
…terFrame`

Use a `_PyStackRef` and defer the reference to `f_executable` when
possible. This avoids some reference count contention in the common case
of executing the same code object from multiple threads concurrently in
the free-threaded build.
@colesbury colesbury added the topic-free-threading label Sep 10, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Sep 10, 2024
Use deferred reference counting in some _PyInterpreterFrame fields #123923
Closed
@colesbury
Fix compile error in executor_cases.c.h
9e7691a
graingert
graingert reviewed Sep 10, 2024
View reviewed changes
Comment thread Lib/test/test_generators.py Resolved

Uh oh!

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

@colesbury
colesbury marked this pull request as ready for review September 10, 2024 23:34
@colesbury
colesbury requested review from Fidget-Spinner and markshannon as code owners September 10, 2024 23:34
@bedevere-app bedevere-app Bot added the awaiting core review label Sep 10, 2024
Fidget-Spinner
Fidget-Spinner reviewed Sep 11, 2024
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.

I trust that you've run this with refleak tests? When I attempted this, there were a ton of refleaks.

Also one question. The rest looks good to me!

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Objects/frameobject.c Resolved

Uh oh!

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

@colesbury colesbury added the 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section label Sep 11, 2024
@bedevere-bot

bedevere-bot commented Sep 11, 2024

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @colesbury for commit 9e7691a 🤖

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 Sep 11, 2024
@colesbury
colesbury requested a review from Fidget-Spinner September 11, 2024 16:01
Fidget-Spinner
Fidget-Spinner approved these changes Sep 11, 2024
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.

I think this makes sense now. Just one comment.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread Modules/_testexternalinspection.c Resolved

Uh oh!

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

@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Sep 11, 2024
@colesbury
Use Py_TAG_BITS instead of 1
471a757
@colesbury
colesbury merged commit b2afe2a into python:main Sep 12, 2024
@colesbury
colesbury deleted the gh-123923-frame-executable branch September 12, 2024 16:37
@bedevere-app bedevere-app Bot removed the awaiting merge label Sep 12, 2024
@nascheme nascheme mentioned this pull request Jan 2, 2025
Crash when using _Py_DumpTracebackThreads #128400
Closed
@sergey-miryanov sergey-miryanov mentioned this pull request Feb 21, 2025
gh-130052: Fix some exceptions on error paths in _testexternalinspection #130053
Merged
@colesbury colesbury mentioned this pull request Oct 22, 2025
Segfault in gc_free_threading.c after PR #140262 with ASAN build and free-threading tests #140431
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@graingert graingert graingert left review comments
@Fidget-Spinner Fidget-Spinner Fidget-Spinner approved these changes
@markshannon markshannon Awaiting requested review from markshannon markshannon is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

topic-free-threading

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.

4 participants

@colesbury @bedevere-bot @graingert @Fidget-Spinner
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.