Repository navigation
fix(sandbox): bound every wsl.exe call with a timeout - #205
Merged
Merged
Conversation
wsl.exe produces no output and never exits when the LXSS service or a distro is wedged (pending first-run prompt, Windows update mid-flight), which would hang the sandbox flows forever — the same lesson the desktop's wsl/runtime.ts already encodes. runWsl now defaults to a 20s ceiling and kills the child on expiry; --import gets 15min (it unpacks a multi-hundred-MB rootfs into a fresh vhdx) and --unregister 5min (disk deletion scales with sandbox writes). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
The sandbox package's
runWslhad no timeout, unlike the desktop'swsl/runtime.ts, which learned the hard way that wsl.exe produces no output and never exits when the LXSS service or a distro is wedged (pending first-run prompt, Windows update mid-flight). Any such wedge would have hung sandbox create/start/availability flows forever.runWslnow defaults to a 20s ceiling, kills the child on expiry, and rejects with the command line and timeout in the message--importoverrides to 15min — it unpacks a multi-hundred-MB rootfs into a fresh vhdx--unregisteroverrides to 5min — disk deletion scales with how much the sandbox wrotestartTimeoutMs+ health pollingFork-only files, so no DIVERGENCES row. Two new tests (hung child killed and rejected; fast exit clears the timer); package suite 73 pass / 2 skip.
🤖 Generated with Claude Code