scripts: force 'fork' multiprocessing when creating sharedir#84
Open
morehouse wants to merge 2 commits into
Open
scripts: force 'fork' multiprocessing when creating sharedir#84morehouse wants to merge 2 commits into
morehouse wants to merge 2 commits into
Conversation
Python 3.14 switched the default to 'forkserver' multiprocessing, which is incompatible with the packer's python scripts.
ekzyis
approved these changes
May 20, 2026
Contributor
ekzyis
left a comment
There was a problem hiding this comment.
LGTM, tested it with python 3.13.12. Encountered no issues when fuzzing.
Since due to my NixOS setup, I can't run python3 nyx_config_gen.py but need to run ./nyx_config_gen.py, I patched it like this:
diff --git a/packer/nyx_config_gen.py b/packer/nyx_config_gen.py
index 1ad5b28..23d505b 100755
--- a/packer/nyx_config_gen.py
+++ b/packer/nyx_config_gen.py
@@ -8,6 +8,9 @@ from common.util import ask_for_permission
from common.info import show_banner
import glob, shutil
+import multiprocessing
+multiprocessing.set_start_method('fork', force=True)
+
template_kernel_default = \
"""
#![enable(implicit_some)]I don't think this changed the behavior under test.
Rather than executing a wrapper script that sets the start method to 'fork', we can load a sitecustomize.py file to do it instead. This may work better on NixOS where script shebangs get rewritten.
Owner
Author
|
@ekzyis I changed the approach to set the start method in a |
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.
Python 3.14 switched the default to 'forkserver' multiprocessing, which causes an error when running
scripts/setup-nyx.sh:python 3.14 setup-nyx.sh log
This PR forces the older 'fork' multiprocessing mode which fixes the issue on python 3.14. It should also work with older pythons, but someone with an older python should verify that before we merge this.