Timeline test: a contended lock's waits are counted together (failed 1 run in 10 under load) #598
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/trustno1-coder--VIctory-NVIDIA!598
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-598"
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?
@kibagami-nc on GitHub · 2026-11-28 01:43 UTC · original
kibagami-nc:fix/timeline-test-second-thread-waits→main· +20 −6 · 1 files · 1 commits · openThe problem
timeline::report::tests::real_waits_are_recorded_with_who_ended_themsometimes fails under load. It is only built with thediagnosticsfeature (cargo test -p victory-gpu --all-features), so CI never runs it. The failing check is its last one:No wait of the second thread lasting 10 ms or more had a waker. With eight test processes at once (each running this test 15 times) it failed in 13 of 120 runs. I found two causes.
The 20 ms hold was counted from the spawn. The test holds the lock for 20 ms counted from the spawn of the second thread. On a busy processor that thread began late and found the lock nearly free.
One lock wait came out as several.
WaitOnAddressreturns now and then with no wake, and std's lock waits again. A failing run, printed with a temporary log:It happened when the test ran beside
watch::many_askers_tests::no_write_is_lost_when_faults_take_no_lockin one process, as it does incargo test.The change
Only the test changes, in
crates/victory-gpu/src/timeline/report.rs:The recorder and the report are unchanged. A follow-up could join a thread's back-to-back waits on one object in the report itself, so the chains show one wait.
Tests
watchtest above.cargo test -p victory-gpu --all-features --locked --lib: 487 passed. The 2 failures are the indirect tests that fail onmain, fixed in #578.cargo clippy -p victory-gpu --all-targets --all-features -- -D warningsfinds nothing in this file. It still stops on the lintsmainhas.No game files, dumps or extracted data are included.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.