Skip to content

[3.14] gh-128639: Don't assume one thread in subinterpreter finalization (gh-128640) #134254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 19, 2025

Incidentally, this also fixed the warning not showing up if a subinterpreter wasn't
cleaned up via _interpreters.destroy. I had to update some of the tests as a result.
(cherry picked from commit 9859791)

Co-authored-by: Peter Bierma [email protected]

…on (pythongh-128640)

Incidentally, this also fixed the warning not showing up if a subinterpreter wasn't
cleaned up via _interpreters.destroy. I had to update some of the tests as a result.
(cherry picked from commit 9859791)

Co-authored-by: Peter Bierma <[email protected]>
@hugovk
Copy link
Member

hugovk commented May 19, 2025

Let's check the buildbot failure before merging this: #128640 (comment)

@ZeroIntensity
Copy link
Member

That failure looks related, but I have absolutely no idea how.

@vstinner
Copy link
Member

I suppose that this change should not be merged, since you proposed a revert for the same change in the main branch: #134256

@ZeroIntensity
Copy link
Member

!buildbot iOS

@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @ZeroIntensity for commit 76bcc46 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F134254%2Fmerge

The command will test the builders whose names match following regular expression: iOS

The builders matched are:

  • iOS ARM64 Simulator PR

@ZeroIntensity
Copy link
Member

I'm going to run the buildbots to see if the crash is somehow related to something else on 3.15. I'm still pretty lost on what could be the cause. I can only see two possibilities:

  • We revealed an existing bug with _PyThreadState_DeleteList and/or _PyThreadState_RemoveExcept.
  • The embedding test revealed a bug with the implementation, but I'm not sure what. Maybe I broke destroying interpreters with only one thread state?

@mhsmith
Copy link
Member

mhsmith commented May 21, 2025

I'm not sure if it's related, but the iOS buildbot has also been experiencing another intermittent subinterpreters failure: #127108. The most recent instance was in #125962 (comment).

@ZeroIntensity
Copy link
Member

In this specific case, the change was related. It's reverted on main. I haven't had time to look into those other failures yet.

@ZeroIntensity
Copy link
Member

Closing in favor of #134606. We'll backport that one instead.

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

Successfully merging this pull request may close these issues.

6 participants