-
Notifications
You must be signed in to change notification settings - Fork 51
Use Python spawned threads for worker event loop creation #626
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
+119
−2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This pull request was exported from Phabricator. Differential Revision: D78745022 |
51ad358
to
09c4bdb
Compare
benjipelletier
added a commit
to benjipelletier/monarch-1
that referenced
this pull request
Jul 24, 2025
…bs#626) Summary: Seeing the following error when running paft at large scale: ``` Fatal Python error: PyGILState_Release: thread state 0x7f7271468000 must be current when releasing ``` Seems to be an issue with interpreter shutdown due to the main thread (actor_paft.py) ending before messages are done being handled in background actors. The interpreter begins shutdown because it is not aware of our raw rust thread created to host py actor event loops. * Make the thread needed to handle py actors a Python Thread * Create the asyncio runtime for py actors in python as well * Grab the asyncio runtime to use for task locals through a global Reviewed By: dulinriley Differential Revision: D78745022
This pull request was exported from Phabricator. Differential Revision: D78745022 |
benjipelletier
added a commit
to benjipelletier/monarch-1
that referenced
this pull request
Jul 24, 2025
…bs#626) Summary: Seeing the following error when running paft at large scale: ``` Fatal Python error: PyGILState_Release: thread state 0x7f7271468000 must be current when releasing ``` Seems to be an issue with interpreter shutdown due to the main thread (actor_paft.py) ending before messages are done being handled in background actors. The interpreter begins shutdown because it is not aware of our raw rust thread created to host py actor event loops. * Make the thread needed to handle py actors a Python Thread * Create the asyncio runtime for py actors in python as well * Grab the asyncio runtime to use for task locals through a global Reviewed By: dulinriley Differential Revision: D78745022
09c4bdb
to
e6e78a4
Compare
This pull request was exported from Phabricator. Differential Revision: D78745022 |
…bs#626) Summary: Seeing the following error when running paft at large scale: ``` Fatal Python error: PyGILState_Release: thread state 0x7f7271468000 must be current when releasing ``` Seems to be an issue with interpreter shutdown due to the main thread (actor_paft.py) ending before messages are done being handled in background actors. The interpreter begins shutdown because it is not aware of our raw rust thread created to host py actor event loops. * Make the thread needed to handle py actors a Python Thread * Create the asyncio runtime for py actors in python as well * Grab the asyncio runtime to use for task locals through a global Reviewed By: dulinriley Differential Revision: D78745022
e6e78a4
to
9a0ff91
Compare
This pull request was exported from Phabricator. Differential Revision: D78745022 |
This pull request has been merged in 973411e. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Summary:
Seeing the following error when running paft at large scale:
Seems to be an issue with interpreter shutdown due to the main thread (actor_paft.py) ending before messages are done being handled in background actors. The interpreter begins shutdown because it is not aware of our raw rust thread created to host py actor event loops.
Reviewed By: dulinriley
Differential Revision: D78745022