Skip to content

Conversation

@zdevito
Copy link
Contributor

@zdevito zdevito commented Oct 29, 2025

Stack from ghstack (oldest at bottom):

Holding the GIL during shutdown of tokio means that any other tokio thread currently waiting on the GIL will never shutdown, which leads to a bad exit later in the shutdown when the TLS state for the python interpreter is gone.

Differential Revision: D85812337

NOTE FOR REVIEWERS: This PR has internal Meta-specific changes or comments, please review them on Phabricator!

Holding the GIL during shutdown of tokio means that any other tokio thread currently waiting on the GIL will never shutdown, which leads to a bad exit later in the shutdown when the TLS state for the python interpreter is gone.

Differential Revision: [D85812337](https://our.internmc.facebook.com/intern/diff/D85812337/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D85812337/)!

[ghstack-poisoned]
zdevito added a commit that referenced this pull request Oct 29, 2025
Holding the GIL during shutdown of tokio means that any other tokio thread currently waiting on the GIL will never shutdown, which leads to a bad exit later in the shutdown when the TLS state for the python interpreter is gone.

Differential Revision: [D85812337](https://our.internmc.facebook.com/intern/diff/D85812337/)

**NOTE FOR REVIEWERS**: This PR has internal Meta-specific changes or comments, please review them on [Phabricator](https://our.internmc.facebook.com/intern/diff/D85812337/)!

ghstack-source-id: 319656538
Pull Request resolved: #1696
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 29, 2025
@meta-codesync meta-codesync bot closed this in 6265464 Oct 30, 2025
@meta-codesync
Copy link

meta-codesync bot commented Oct 30, 2025

This pull request has been merged in 6265464.

AlirezaShamsoshoara pushed a commit to AlirezaShamsoshoara/monarch that referenced this pull request Oct 30, 2025
Summary:
Pull Request resolved: meta-pytorch#1696

Holding the GIL during shutdown of tokio means that any other tokio thread currently waiting on the GIL will never shutdown, which leads to a bad exit later in the shutdown when the TLS state for the python interpreter is gone.
ghstack-source-id: 319656538
exported-using-ghexport

Reviewed By: samlurye, mariusae

Differential Revision: D85812337

fbshipit-source-id: 4421d5ad47339acb5bb66272e4c5d16595064427
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants