Timeline test: a contended lock's waits are counted together (failed 1 run in 10 under load) #598
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
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 · merged 2026-11-29 08:16 UTCThe 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 were the indirect tests that then failed onmain;mainhas fixed them since (9b712a6).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.