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-157841: Synchronize functools.partial state access by mpage · Pull Request #160480 · python/cpython

Conversation

@mpage

@mpage mpage commented Oct 23, 2026 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Acquire coherent strong-reference snapshots under the partial object lock for calls, repr, reduce, and nested-partial construction. Publish replacement state atomically, release displaced references after publication, and retire replaced instance dictionaries through QSBR. Keep free-threaded vectorcall dispatch immutable after construction.

Add concurrent state/coherence coverage, placeholder-aware flattening tests, and regressions for reentrant keyword merging and finalizers.

Authored with AI and reviewed by me.

  • Issue: Free-threaded CPython 3.14: concurrent functools.partial.__setstate__ crashes with repr(), calls, or another __setstate__ #157841

Sorry, something went wrong.

Uh oh!

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

All reactions
@mpage
pythongh-157841: Synchronize functools.partial state access
cae9916
Acquire coherent strong-reference snapshots under the partial object lock for
calls, repr, reduce, and nested-partial construction. Publish replacement state
atomically, release displaced references after publication, and retire replaced
instance dictionaries through QSBR. Keep free-threaded vectorcall dispatch
immutable after construction.

Add concurrent state/coherence coverage, placeholder-aware flattening tests, and
regressions for reentrant keyword merging and finalizers.
@bedevere-app bedevere-app Bot mentioned this pull request Oct 23, 2026
Free-threaded CPython 3.14: concurrent functools.partial.__setstate__ crashes with repr(), calls, or another __setstate__ #157841
Open
@mpage mpage added the skip news label Oct 23, 2026
espressolee
espressolee reviewed Oct 25, 2026
View reviewed changes

@espressolee espressolee left a comment

Copy link
Copy Markdown
Contributor

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.

Ran the reproducer from the issue against this PR (cae9916) and its parent (738d055). macOS arm64, --disable-gil builds, 4 s per run.

Release builds, PYTHONMALLOC=debug, 10 runs per mode:

mode   738d055        cae9916
ro     10/10 ok       10/10 ok
rw     0/10 (segv)    10/10 ok
ww     0/10 (segv)    10/10 ok
cw     0/10 (segv)    10/10 ok

TSan builds (--with-thread-sanitizer, in-tree FT suppressions file which has no active entries, halt_on_error=0), 3 runs per mode:

mode   738d055               cae9916
ro     no reports            no reports
rw     reports in 3/3 runs   no reports
ww     reports in 3/3 runs   no reports
cw     reports in 3/3 runs   no reports

The parent had 6-21 data race warnings per rw/ww/cw run, with top frames in partial_setstate and partial_setvectorcall; those runs ended in SIGABRT, SIGKILL or a 300 s timeout. All 12 PR TSan runs exited 0 with no warnings. No crashes or TSan reports with the PR in these runs.

Sorry, something went wrong.

Uh oh!

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

All reactions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@rhettinger rhettinger Awaiting requested review from rhettinger rhettinger will be requested when the pull request is marked ready for review rhettinger is a code owner
1 more reviewer
@espressolee espressolee espressolee left review comments
Reviewers whose approvals may not affect merge requirements

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.

2 participants

@mpage @espressolee
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.