Skip to content

gh-117657: Acquire a critical section around SemLock.__{enter,exit}__ - #118812

Merged
colesbury merged 1 commit into
python:mainfrom
mpage:gh-117657-multiprocessing-semaphore
May 9, 2024
Merged

gh-117657: Acquire a critical section around SemLock.__{enter,exit}__#118812
colesbury merged 1 commit into
python:mainfrom
mpage:gh-117657-multiprocessing-semaphore

Conversation

@mpage

@mpagempage commented May 9, 2024

Copy link
Copy Markdown
Contributor

These methods are purely wrappers around Semlock.{acquire,release}, which expect a critical section to be held.

Sample race reported by TSAN.

These methods are purely wrappers around `Semlock.{acquire,release}`,
which expect a critical section to be held.
@mpage
mpage requested a review from colesburyMay 9, 2024 00:08
@mpage
mpage marked this pull request as ready for review May 9, 2024 00:48
@mpage
mpage requested a review from gpshead as a code ownerMay 9, 2024 00:48
@colesburycolesbury added the needs backport to 3.13 bugs and security fixes label May 9, 2024
@colesbury
colesbury merged commit c30d8e5 into python:mainMay 9, 2024
@miss-islington-app

Copy link
Copy Markdown

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

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2024
…exit}__` (pythonGH-118812)
These methods are purely wrappers around `Semlock.{acquire,release}`,
which expect a critical section to be held.
(cherry picked from commit c30d8e5)
Co-authored-by: mpage <mpage@meta.com>
@bedevere-app

Copy link
Copy Markdown

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

@bedevere-appbedevere-appBot removed the needs backport to 3.13 bugs and security fixes label May 9, 2024
colesbury pushed a commit that referenced this pull request May 9, 2024
…,exit}__` (GH-118812) (#118856)
These methods are purely wrappers around `Semlock.{acquire,release}`,
which expect a critical section to be held.
(cherry picked from commit c30d8e5)
Co-authored-by: mpage <mpage@meta.com>
SonicField pushed a commit to SonicField/cpython that referenced this pull request May 10, 2024
…exit}__` (python#118812)
These methods are purely wrappers around `Semlock.{acquire,release}`,
which expect a critical section to be held.
@JelleZijlstraJelleZijlstra mentioned this pull request May 28, 2024
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@mpage@colesbury