Skip to content

gh-117657: Avoid race in PAUSE_ADAPTIVE_COUNTER in free-threaded build - #122190

Merged
colesbury merged 2 commits into
python:mainfrom
colesbury:gh-117657-pause-adaptive-counter
Jul 30, 2024
Merged

colesbury merged 2 commits into
python:mainfrom
colesbury:gh-117657-pause-adaptive-counter

Conversation

@colesbury

@colesbury colesbury commented Jul 23, 2024 •

Copy link
Copy Markdown
Contributor

The adaptive counter doesn't do anything currently in the free-threaded build and TSan reports a data race due to concurrent modifications to the counter.

…ded build

The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.

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

I was wondering why I never saw this race. Seems like it's only instrumentation that triggers it.

(Verified by looking at bytecodes.c and ceval.c)

@colesbury
colesbury merged commit 2b163aa into python:main Jul 30, 2024
@miss-islington-app

Copy link
Copy Markdown

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

@colesbury
colesbury deleted the gh-117657-pause-adaptive-counter branch July 30, 2024 17:53
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jul 30, 2024
…ded build (pythonGH-122190)

The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.
(cherry picked from commit 2b163aa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@bedevere-app

bedevere-app Bot commented Jul 30, 2024

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Jul 30, 2024
colesbury added a commit that referenced this pull request Jul 30, 2024
…aded build (GH-122190) (#122475)

The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.
(cherry picked from commit 2b163aa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
blhsing pushed a commit to blhsing/cpython that referenced this pull request Aug 22, 2024
…ded build (python#122190)

The adaptive counter doesn't do anything currently in the free-threaded
build and TSan reports a data race due to concurrent modifications to
the counter.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants