Skip to content

executor: bind /dev/zero, /dev/random and /dev/urandom into action chroots - #64

Open
snuderl wants to merge 1 commit into
hermeticbuild:mainfrom
snuderl:dev-nodes
Open

snuderl wants to merge 1 commit into
hermeticbuild:mainfrom
snuderl:dev-nodes

Conversation

@snuderl

@snuderl snuderl commented Nov 16, 2026

Copy link
Copy Markdown

Action chroots only had /dev/null. Without /dev/random, the JDK's SecureRandom seeding falls back to ThreadedSeedGenerator, which stalls every JVM action for about 8 seconds; other runtimes reading /dev/urandom fail outright. This binds the same host device nodes the guest already has via devtmpfs (/dev/zero, /dev/random, /dev/urandom, plus /dev/kvm when the executor allows it and the node exists), next to the existing /dev/null mount.

Measured on a clean 1,657-action Kotlin/JVM Bazel build in darwin-actiond serve-vm: the 8 s per-JVM stall disappears (598 s → 248 s for that build before other changes).

Validation: bazel test //src:unit_tests on this branch (212 passed); the chroot device test asserts the four nodes and their placeholders. Used daily in a VM worker on macOS; tools/e2e.sh vm was not run for this PR.

🤖 Generated with Claude Code

…roots

Action chroots only had /dev/null. Without /dev/random, the JDK's
SecureRandom seeding falls back to ThreadedSeedGenerator, which stalls every
JVM action for about 8 seconds; other runtimes reading /dev/urandom fail
outright. Bind the same host device nodes the guest already has via devtmpfs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant