Repository navigation
test(node): write the fake runsc from a child, so its exec cannot fail - #425
Merged
Merged
Conversation
a_restore_that_fails_removes_the_container failed on dev and on a PR, with calls "delete " where "restore delete " was expected: runsc never ran. The test wrote the script from this process, and a test forking on another thread keeps the write descriptor until it execs, so exec of the script failed with ETXTBSY. In the same shape on Linux, 176 of 32,000 execs failed. With a child writing the script, none did. The real runsc is not written by the process that runs it, so this is the test's own race. Co-Authored-By: Claude Opus 5.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.
Fixes the
ci / rustfailure ondev(f2300a0), which also failedruston #423.a_restore_that_fails_removes_the_containersawdeletewhere it expectedrestore delete, so the fakerunscnever ran. The test wrote the script from the test process. Another test forking at that moment keeps the write descriptor until it execs, and running the script then fails withETXTBSY. The test added in #411 has this race, and anyrunsctest can hit it. Product code is unaffected.The script is now written by a child process, so the test process never holds a write descriptor for it.
Tested on Linux (2 vCPU):
ETXTBSYbefore, 0 after.node::backend::tests, 8 threads, 40 rounds: all passed.Not fixed here: on that 2 vCPU machine the whole lib still fails, in tests this change does not touch.
node::wake::tests::a_wake_waits_for_a_tier_change_in_progressfailed every round ("4 wakes already waiting to restore, at most 4"), andnode::gatewaytests failed in some rounds at 8 threads.🤖 Generated with Claude Code