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 — [3.13] gh-126688: Reinit import lock after fork (GH-126692) by miss-islington · Pull Request #126765 · python/cpython

Conversation

@miss-islington

@miss-islington miss-islington commented Nov 12, 2024 •
edited by bedevere-app Bot
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

The PyMutex implementation supports unlocking after fork because we
clear the list of waiters in parking_lot.c. This doesn't work as well
for _PyRecursiveMutex because on some systems, such as SerenityOS, the
thread id is not preserved across fork().
(cherry picked from commit 5610860)

Co-authored-by: Sam Gross [email protected]

  • Issue: CPython should not assume that pthread_self returns the same value in fork parent and child #126688

Sorry, something went wrong.

Uh oh!

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

All reactions
@colesbury @miss-islington
pythongh-126688: Reinit import lock after fork (pythonGH-126692)
6f77b81
The PyMutex implementation supports unlocking after fork because we
clear the list of waiters in parking_lot.c. This doesn't work as well
for _PyRecursiveMutex because on some systems, such as SerenityOS, the
thread id is not preserved across fork().
(cherry picked from commit 5610860)

Co-authored-by: Sam Gross <[email protected]>
@miss-islington
miss-islington requested review from brettcannon, ericsnowcurrently, kumaraditya303, ncoghlan and warsaw as code owners November 12, 2024 21:26
@bedevere-app bedevere-app Bot mentioned this pull request Nov 12, 2024
gh-126688: Reinit import lock after fork #126692
Merged
@bedevere-app bedevere-app Bot added the awaiting review label Nov 12, 2024
@bedevere-app bedevere-app Bot mentioned this pull request Nov 12, 2024
CPython should not assume that pthread_self returns the same value in fork parent and child #126688
Closed
@colesbury
colesbury enabled auto-merge (squash) November 12, 2024 21:38
@colesbury
colesbury merged commit 13fe8f9 into python:3.13 Nov 12, 2024
@bedevere-app bedevere-app Bot removed the awaiting review label Nov 12, 2024
oskar-skog added a commit to oskar-skog/serenity that referenced this pull request Nov 12, 2024
@oskar-skog
Ports/Python: Backport gh-126688: Reinit import lock after fork
eef86c6
python/cpython#126765

Closes SerenityOS#26253
oskar-skog added a commit to oskar-skog/serenity that referenced this pull request Nov 12, 2024
@oskar-skog
Ports/python3: Backport gh-126688: Reinit import lock after fork
8f635d2
python/cpython#126765

Closes SerenityOS#25263

Make sure to revert this commit before updating Python.
@oskar-skog oskar-skog mentioned this pull request Nov 12, 2024
Ports/python3: Backport gh-126688: Reinit import lock after fork SerenityOS/serenity#25377
Merged
nico pushed a commit to SerenityOS/serenity that referenced this pull request Nov 13, 2024
@oskar-skog @nico
Ports/python3: Backport gh-126688: Reinit import lock after fork
a47e63b
python/cpython#126765

Closes #25263

Make sure to revert this commit before updating Python.
@miss-islington
miss-islington deleted the backport-5610860-3.13 branch January 2, 2026 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@kumaraditya303 kumaraditya303 Awaiting requested review from kumaraditya303 kumaraditya303 is a code owner
@brettcannon brettcannon Awaiting requested review from brettcannon brettcannon is a code owner
@ericsnowcurrently ericsnowcurrently Awaiting requested review from ericsnowcurrently ericsnowcurrently is a code owner
@ncoghlan ncoghlan Awaiting requested review from ncoghlan ncoghlan is a code owner
@warsaw warsaw Awaiting requested review from warsaw warsaw is a code owner

Uh oh!

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

Assignees

No one assigned

Labels

None yet

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

@miss-islington @colesbury
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 01402520 — 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.