Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-117657: Fix race involving immortalizing objects #119927

Merged
merged 4 commits into from
Jun 3, 2024

Conversation

colesbury
Copy link
Contributor

@colesbury colesbury commented Jun 1, 2024

The free-threaded build currently immortalizes objects that use deferred reference counting (see gh-117783). This typically happens once the first non-main thread is created, but the behavior can be suppressed for tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the behavior is suppressed.

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
@colesbury
Copy link
Contributor Author

!buildbot nogil

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @colesbury for commit 45afd9d 🤖

The command will test the builders whose names match following regular expression: nogil

The builders matched are:

  • PPC64LE Fedora Rawhide NoGIL refleaks PR
  • aarch64 Fedora Rawhide NoGIL refleaks PR
  • x86-64 MacOS Intel NoGIL PR
  • aarch64 Fedora Rawhide NoGIL PR
  • AMD64 Fedora Rawhide NoGIL refleaks PR
  • x86-64 MacOS Intel ASAN NoGIL PR
  • AMD64 Ubuntu NoGIL Refleaks PR
  • PPC64LE Fedora Rawhide NoGIL PR
  • ARM64 MacOS M1 Refleaks NoGIL PR
  • AMD64 Fedora Rawhide NoGIL PR
  • ARM64 MacOS M1 NoGIL PR
  • AMD64 Windows Server 2022 NoGIL PR
  • AMD64 Ubuntu NoGIL PR

@colesbury colesbury marked this pull request as ready for review June 2, 2024 15:01
@colesbury colesbury requested review from DinoV and Fidget-Spinner June 2, 2024 15:01
Copy link
Contributor

@DinoV DinoV left a comment

Choose a reason for hiding this comment

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

LGTM!

@colesbury colesbury enabled auto-merge (squash) June 3, 2024 20:55
@colesbury colesbury merged commit 47fb432 into python:main Jun 3, 2024
34 checks passed
@miss-islington-app
Copy link

Thanks @colesbury for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Sorry, @colesbury, I could not cleanly backport this to 3.13 due to a conflict.
Please backport using cherry_picker on command line.

cherry_picker 47fb4327b5c405da6df066dcaa01b7c1aefab313 3.13

colesbury added a commit to colesbury/cpython that referenced this pull request Jun 3, 2024
)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.

(cherry picked from commit 47fb432)
@bedevere-app
Copy link

bedevere-app bot commented Jun 3, 2024

GH-120005 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Jun 3, 2024
@colesbury colesbury deleted the gh-117657-immortalize branch June 3, 2024 22:02
colesbury added a commit that referenced this pull request Jun 3, 2024
#120005)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see gh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.

(cherry picked from commit 47fb432)
mliezun pushed a commit to mliezun/cpython that referenced this pull request Jun 3, 2024
)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
barneygale pushed a commit to barneygale/cpython that referenced this pull request Jun 5, 2024
)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
noahbkim pushed a commit to hudson-trading/cpython that referenced this pull request Jul 11, 2024
)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
estyxx pushed a commit to estyxx/cpython that referenced this pull request Jul 17, 2024
)

The free-threaded build currently immortalizes objects that use deferred
reference counting (see pythongh-117783). This typically happens once the
first non-main thread is created, but the behavior can be suppressed for
tests, in subinterpreters, or during a compile() call.

This fixes a race condition involving the tracking of whether the
behavior is suppressed.
@colesbury colesbury removed their assignment Jul 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants