Tests: a tick between the origin polls' zero-time-out asks is asked again #3080
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3080
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-3080"
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?
@kotekompotek on GitHub · 2026-11-26 06:53 UTC · original
kotekompotek:tests/origin-poll-tick-boundary→main· +17 −7 · 1 files · 1 commits · openSummary
CI on #2810 failed
frame::tests::waits_end_on_ticks_and_count_framesatframe.rs:235(left: S_OK, right: TIMEOUT) — a flake, not that PR's change (it only toucheshost.rscopy ordering; this test passed at its previous head).The test polls the origin with a zero time-out twice in a row (lines 231 and 235). A wait only times out while the next tick is not due, and the interval here is 2 ms — a host that wakes the thread a whole tick late between the two asks makes the second one return
S_OK. Probability per run is the inter-ask gap over the interval, which a loaded CI runner can hit.early == second + 1becomesearly > second: a boundary hit takes a frame token too, so a retry may have bumpedearly/secondfurther. The consecutive-token invariant (next == early + 1) and the timeout-token semantics are preserved.The second half of the test (50 ms flip ticks, unbounded waits) is unaffected.
Test plan
cargo test -p victory-gpu frame::— both frame tests passcargo clippy -p victory-gpu --all-targets -D warningscleanGenerated with Devin
@oni-swr on GitHub · 2026-11-26 08:16 UTC · original
Independent verification for my claim #1633. Test report only; no source review. Disclosure: checks run by Claude Code (Claude Sonnet 5.5), coordinated by Codex (gpt-6.2-sol).
Tested: PR head
5a4f4697d18376d8004c91061d4b01706e4ce6e9, parent63bcca43c6a00a758510398fa43096ce7e4f7df0(currentmain). Windows 11 x64 (16 logical CPUs), Rust 1.98.1,cargo -j 4 --locked. CPU only; no GPU or device used. Both revisions were run from separately builtvictory-gpulib test binaries,frame::filter (2 tests:waits_begun_together_take_different_ticks,waits_end_on_ticks_and_count_frames), each run capped at 60 s, parent and head interleaved.Failure sites:
waits_end_on_ticks_and_count_framesat theframe.rszero-time-out assertion (left: 0, right: 1). That is the assertion the PR rewrites. Under moderate load this was 13 of 15 failures, the other 2 being the 10 ms bound at line 271.before.elapsed() < 10 msassertion (parent line 271, head line 281). It is an existing assertion this PR does not touch, and it fails at the parent in the same runs. No failure at the changed lines.ten zero-time-out waits each met a due tickpanic. 9 are the 10 ms assertion at line 281. At 2x oversubscription ten consecutive asks all met a due tick, so the retry loop does not make the test immune there.Conclusion: reproducible, not a one-off flake. The parent's zero-time-out assertion fails often under CPU contention, and the head removes most of it (moderate load: 25/40 to 37/40; heavy load: 1/60 to 20/60). Idle runs were clean in both. The remaining head failures under load come from the PR's retry bound (heavy load only) and from the separate 10 ms elapsed-time assertion, which also fails at the parent. They are timing-sensitive tests under artificial contention, not evidence of a logic regression. I did not test CI-like conditions. Scratch worktree, binaries and cargo target directory were removed afterwards.
@Marvisak on GitHub · 2026-11-26 08:22 UTC · original
Automated triage for the maintainers.
Merge candidate. Test-only fix for a real flake in
frame::tests::waits_end_on_ticks_and_count_frames. With a 2 ms interval,next_tickreturnsS_OKfor a zero-time-out wait once more than a tick has passed since the last one taken, so a thread that wakes late on a loaded runner fails theTIMEOUTassertion. The bounded retry takes the due tick and then times out on the next one. Relaxingearly == second + 1toearly > secondis correct because each origin hit also bumpsFRAME, andnext == early + 1still checks that tokens are consecutive. No change outside the test. CI: passing.Generated by Claude Code
@Dukestar69 on GitHub · 2026-11-26 08:31 UTC · original · approved these changes
Verified against
origin/main(63bcca4):cargo test -p victory-gpu --lib frame:: -- --test-threads=1: 2/2 passed (waits_begun_together_take_different_ticksandwaits_end_on_ticks_and_count_frames).cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly removes the timing flake when a tick lands between zero-timeout origin polls.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
@fuzeofficlal on GitHub · 2026-11-26 08:56 UTC · original · requested changes
Verified
5a4f4697locally on Windows 11 x64:cargo clippy --all-targets --locked -- -D warnings: clean (3.38s).cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed, 0 failed (0.34s).cargo test -p victory-gpu --lib --locked frame::: 2 passed, 0 failed (0.31s), plus20/20consecutive runs (6.92s) and40/40across 8 concurrent workers on the compiled test binary. Production code (frame.rs:1-215) is unchanged.One test-assertion gap in
timed_out(TOKEN_ON_TIMEOUT, &mut early)(crates/victory-gpu/src/frame.rs:236-251): passing the same&mut earlyacross retries can mask a timeout-token regression. Becausewaitalso writes*tokenonS_OK(frame.rs:156-162), if an earlier retry hits a due tick (S_OK) and updatesearly, and the next call returnsTIMEOUTwithout writing*token,earlykeeps theS_OKvalue and the subsequentearly > second && next == early + 1assertions still pass.Please reset
*token = 0(or recordcurrent()before each attempt) so the test directly asserts that the specificTIMEOUTcall itself wrote the incremented frame token (and that theflags == 0TIMEOUTleft*tokenuntouched).@futurepro62 on GitHub · 2026-11-26 10:41 UTC · original
NVIDIA full-suite run, to go with the reports above by Dukestar69, fuzeofficlal, oni-swr, since none of them names a GPU run. Tested exact head
5a4f469(on its base63bcca4).Tested
dxil.dllfrom Windows SDK 10.0.26100 (the loader's default), debug.cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 866 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main63bcca4on this card too, not because of this PR:heap_direct_texture_reads_mark_their_heap_indexends thevictory-shadertest process with0xc0000005(#2571), so without the skip the rest of that crate never reports;dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsand the twostride_testshit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317);gathers_at_a_level_match_the_hardwarefails on lane 0 (#1744).Not tested
AI use
@jaschinski97-ops on GitHub · 2026-11-26 15:41 UTC · original
Fresh Windows MSVC CI evidence for the zero-timeout origin poll: on main
63bcca43plus the save-only #2675,frame::tests::waits_end_on_ticks_and_count_framesfailed at frame.rs231, observed S_OK(0), expected TIMEOUT(1). The same frame.rs is unchanged in that PR. Current #2677 on the same main passed CI.Failing job: https://github.com/Marvisak/VIctory/actions/runs/45850563859/job/140015510444 . App tests and both Clippy configurations passed before the workspace stopped at this frame test (230 GPU tests passed, 1 failed, 1 ignored).
This appears to be the same live-clock zero-poll assumption addressed here, rather than a save migration failure. Reporting the existing CI result only; no duplicate implementation or new GPU test run. AI-assisted triage with Codex.
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.