Skip to content

gh-139759: Add test_unclosed_interpreter_on_fork#145545

Open
aurelwildfellner wants to merge 1 commit intopython:mainfrom
aurelwildfellner:issue_139759_test_unclosed_interpreter_on_fork
Open

gh-139759: Add test_unclosed_interpreter_on_fork#145545
aurelwildfellner wants to merge 1 commit intopython:mainfrom
aurelwildfellner:issue_139759_test_unclosed_interpreter_on_fork

Conversation

@aurelwildfellner
Copy link

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
Copy link

python-cla-bot bot commented Mar 5, 2026

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
Copy link

bedevere-app bot commented Mar 5, 2026

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.

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

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant