Skip to content

gh-139759: Add test_unclosed_interpreter_on_fork - #145545

Draft
aurelwildfellner wants to merge 2 commits into
python:mainfrom
aurelwildfellner:issue_139759_test_unclosed_interpreter_on_fork
Draft

aurelwildfellner wants to merge 2 commits into
python:mainfrom
aurelwildfellner:issue_139759_test_unclosed_interpreter_on_fork

Conversation

@aurelwildfellner

Copy link
Copy Markdown

This is a unit test which covers the issue raced in gh-139759 - forking when a subinterpreter is not properly closed creates a segfault in the child process.

Note, currently this test will fail. I provide it to emphasize the existing issue and as something to add to the testsuite once there is a proper fix.

The thread state handling is a bit intriguing to me, so I will propably not work on an actual fix. But maybe it is useful to someone actually picking up the issue.

@python-cla-bot

python-cla-bot Bot commented Mar 5, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app bedevere-app Bot added the tests Tests in the Lib/test dir label Mar 5, 2026
@bedevere-app

bedevere-app Bot commented Mar 5, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@github-actions

github-actions Bot commented May 8, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 8, 2026
@aurelwildfellner
aurelwildfellner force-pushed the issue_139759_test_unclosed_interpreter_on_fork branch from 9a3078b to 7cfab1a Compare October 23, 2026 09:48
@bedevere-app

bedevere-app Bot commented Oct 23, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@bedevere-app

bedevere-app Bot commented Oct 23, 2026

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@aurelwildfellner

Copy link
Copy Markdown
Author

Rebased to main. And added a @warnings_helper.ignore_fork_in_thread_deprecation_warnings()

The test still fails as expected.

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

Labels

stale Stale PR or inactive for long period of time. tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant