Descriptor tests: a slot copied as bytes is tried again when another round has its page #481
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/readmet3xt-lab--foxhound!481
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-481"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@erdemcisse on GitHub · 2026-12-02 16:05 UTC · original
ci-descriptor-sync-retry→main· +26 −11 · 1 files · 1 commits · closed without mergingcargo test --workspacewent red in CI run 46920076425, on a pull request that changes onlylauncher/Launcher.cs:The same commit passes the whole workspace here, and this test on its own passed 60 times of 60. It is order-dependent, not a fault of the change that run was testing.
Why a round can miss it
The tests of one binary run on threads of one process, and
sync_heaps()walks every heap registered (crates/victory-gpu/src/descriptor.rs:574). A round takes a changed page for itself before it reads it (crate::watch::Tracked::take,crates/victory-gpu/src/watch.rs:1474): after that the page counts as taken. Another test's round can take this heap's page between the copy and this test's own round, and be elsewhere in its pass when the copy lands, so this test's round then finds nothing to read and makes no slot.The file already says so, for
cleared_before_made(crates/victory-gpu/src/descriptor.rs:2785-2787):That test retries.
records_copied_as_bytes_are_made_at_the_next_syncdid not.Reproduced
A scratch test that creates 200 such heaps while a second thread calls
sync_heaps()in a loop left slot 5 unmade by its own round 3 of 200 times, and 2 of 200 in a second run. Two further rounds then made it: the page stays dirty and a later round finds it, so this is timing, not a lost write.Change
The copy and the round are tried again, 2 ms apart, at most 100 times — the shape
cleared_before_madealready uses (crates/victory-gpu/src/descriptor.rs:2787-2800). The first attempt keepsassert!(!host.made(5)), so "a record copied as bytes waits for a round" is still asserted before any sync; later attempts write the same 16 bytes again.Tested here
victory-gputest binary, 5 runscargo clippy -p victory-gpu --all-targets -- -D warningsTest only, one file, no product code changes.
Pull request closed