Repository navigation
test(fixture): close the writer fd before chmod and shrink launch stress - #1636
Merged
Merged
Conversation
write_executable_fixture now creates, writes, syncs and explicitly drops the descriptor inside the launch lock before chmod, so no later fork can inherit a writable handle on the fixture inode; the shared control drops from 8x250 to 4x50 launches to stay within loaded-runner headroom while still exercising concurrent spawn/write coordination. Addresses the intermittent ETXTBSY-family gate failures tracked in #1625.
Contributor
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing. Next included review available in 47 minutes. View limit details
|
This was referenced Nov 3, 2026
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 #1625 (options B + A from the issue's recommended path, landed together).
Changes
write_executable_fixturereplacesfs::writewithFile::create→write_all→sync_all→ explicitdrop(file)→set_permissions. The writer descriptor is now closed inside the launch write-lock and before chmod, so a child forked after the write cannot inherit a writable handle on the fixture inode, and the chmod sees a fully persisted file.concurrent_children_cannot_inherit_executable_fixture_writersdrops from 8 reader threads × 250 launches to 4 × 50 (barrier 9 → 5). The control still exercises concurrent spawn/write coordination with the 64 KiB script, but stays within headroom observed to be flaky when multiple gate jobs load the runner.The
RwLockwrite-vs-spawn coordination itself is unchanged.Validation
cargo check --locked --target x86_64-unknown-linux-gnu --all-targets— clean (both changed items are unix/Linux-gated, so local Windows lanes don't compile them).