Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions scripts/setup-nyx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,19 @@ docker rm "$CONTAINER_ID" > /dev/null
echo "Copying packer binaries..."
cp "$BINARIES_PATH"/* "$SHAREDIR/"

# Generate Nyx config
# Generate Nyx config.
#
# Python 3.14 changed the default multiprocessing start method to 'forkserver',
# which breaks the packer's common/debug.py. We force 'fork' via a
# sitecustomize.py injected on PYTHONPATH to restore the pre-3.14 behavior.
echo "Generating Nyx config..."
(cd "$PACKER_PATH" && python3 nyx_config_gen.py "$SHAREDIR" Kernel -m 4096)
FORCE_FORK_DIR="$(mktemp -d)"
trap 'rm -rf "$FORCE_FORK_DIR"' EXIT
cat > "$FORCE_FORK_DIR/sitecustomize.py" <<'EOF'
import multiprocessing
multiprocessing.set_start_method("fork", force=True)
EOF
(cd "$PACKER_PATH" && PYTHONPATH="$FORCE_FORK_DIR${PYTHONPATH:+:$PYTHONPATH}" ./nyx_config_gen.py "$SHAREDIR" Kernel -m 4096)

# Create fuzz_no_pt.sh script
echo "Creating fuzz_no_pt.sh..."
Expand Down