git-review-rebase: use fork method when starting multiprocessing manager#25
Open
casasnovas wants to merge 1 commit into
Open
git-review-rebase: use fork method when starting multiprocessing manager#25casasnovas wants to merge 1 commit into
casasnovas wants to merge 1 commit into
Conversation
…ger. Yann ran into an issue where the python 3.14 multiprocessing Manager seems to refuse to start with a rather cryptic: ValueError: bad value(s) in fds_to_keep Claude thinks this is because on python-3.14 the default method for manager is "forkserver", which doesn't work in the context of an asyncio.thread. A potential fix is to explicitly request the use of the "fork" method. Reported-by: Yann Sionneau <yann.sionneau@vates.tech> Signed-off-by: Quentin Casasnovas <quentin.casasnovas@vates.tech>
36d737c to
98bd169
Compare
fallen
reviewed
May 12, 2026
| with multiprocessing.Manager() as manager: | ||
| # Use 'fork' explicitly: forkserver (Python 3.14+ default) fails with -1 fds | ||
| # when Manager() is called from within asyncio.to_thread(). | ||
| ctx = multiprocessing.get_context("fork") |
There was a problem hiding this comment.
I can only say that documentation seems to warn a bit on using context "fork" in a multi threaded code
see https://docs.python.org/3/library/multiprocessing.html#multiprocessing-start-methods
dinhngtu
approved these changes
May 26, 2026
Member
dinhngtu
left a comment
There was a problem hiding this comment.
I had the same issue and it was fixed by this PR as well.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Yann ran into an issue where the python 3.14 multiprocessing Manager seems to refuse to start with a rather cryptic:
ValueError: bad value(s) in fds_to_keep
Claude thinks this is because on python-3.14 the default method for manager is "forkserver", which doesn't work in the context of an asyncio.thread. The fix is to explicitly request the use of the "fork" method.
Reported-by: Yann Sionneau yann.sionneau@vates.tech