GPU tests: two tests CI runners failed hold on a loaded host #2861
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!2861
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2861"
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?
@0xkn0wh3r3 on GitHub · 2026-11-25 22:36 UTC · original
0xkn0wh3r3:tests/flaky-gpu-tests-on-loaded-runners→main· +17 −10 · 2 files · 1 commits · openProblem
Two GPU tests fail on CI runners now and then, on changes that don't touch them:
frame::tests::waits_end_on_ticks_and_count_frames(frame.rs:231, failed on #2085's run). Its first part runs 2 ms ticks and expects a wait with a zero time-out to time out right after a wait returned on a tick. A runner woken a little late finds the next tick has already passed and getsS_OK.descriptor::host::tests::views_bound_while_another_slot_gets_its_texture_do_not_wait(descriptor/host.rs:2011, failed on #2051's run). It anda_slot_rewritten_while_its_view_is_prepared_views_the_new_recordhand the next view prepared some work throughWHILE_PREPARING, a static every test shares. Another test preparing a view of its own at the same time takes the work, so the test's own view is made without it.Change
WHILE_PREPARINGis per thread (thread_local!). Both tests callmirroron their own thread, which is whereprepareruns the work, and the thread each one spawns can't take it.Tests only; no runtime code changes.
Testing
On an RTX 5070 Ti:
cargo test -p victory-gpu --lib8 times in a row, plus the three tests alone 10 times. None of them failed. The only failures weredynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, which fail onmainon NVIDIA (#1835's heap cap). Clippy, with and withoutdiagnostics, andcargo xtask policyare clean.@0xkn0wh3r3 on GitHub · 2026-11-25 23:52 UTC · original
@fuzeofficlal thanks for the five rounds on both adapters. Agreed on #2877: if its virtual clock lands first, the
frame.rspart here is superseded and I'll drop it, keeping only the per-threadWHILE_PREPARING, which is independent.@futurepro62 on GitHub · 2026-11-26 00:04 UTC · original
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head
b670296(on its basef3578e3).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: 863 passed, 0 failed, 10 ignored.#[test]functions in the diff.--skipleaves out tests that fail on main842b0cbon 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
@Marvisak on GitHub · 2026-11-26 04:25 UTC · original · edited 2026-11-26 07:23 UTC
Automated triage for the maintainers.
Thanks. Nothing has changed since the last review (same head). It stays a merge candidate, and the
frame.rshalf drops out if #2877 lands first.Generated by Claude Code
@0xkn0wh3r3 on GitHub · 2026-11-26 04:34 UTC · original
Thanks for the runs. On the overlap with #2877: its virtual clock is the better fix for
waits_end_on_ticks_and_count_frames. If #2877 lands first I'll drop theframe.rschange from this PR and keep only thethread_local!hook indescriptor/host.rs, which fixes the other flake (views_bound_while_another_slot_gets_its_texture_do_not_wait) on its own.@kotekompotek on GitHub · 2026-11-25 22:50 UTC · original · reviewed
Right fix for the CI flake: WHILE_PREPARING as a global Mutex meant whichever parallel test hit prepare first consumed the injected work — a test preparing its own view ran another's closure and both misbehaved. thread_local makes the hook per-test-thread, matching how cargo test parallelizes. LGTM.
@fuzeofficlal on GitHub · 2026-11-25 23:44 UTC · original · reviewed
Verified head
b6702963cleanly merged ontoorigin/main(63bcca43) on Windows 11 x64 (NVIDIA GeForce RTX 5090 + D3D12 WARP +VICTORY_D3D12_DEBUG=1).Code Review & Cross-PR Note
crates/victory-gpu/src/descriptor/host.rs: Moving the test hookWHILE_PREPARINGfrom a process-wideMutex<Option<Work>>tothread_local! { RefCell<Option<Work>> }eliminates a genuine cross-test concurrency race when parallel GPU tests invokeHostHeap::mirror.crates/victory-gpu/src/frame.rsoverlap with#2877: Widening the2 ms/50 mstolerances to50 ms/250 mstouches the same test that#2877refactors onto a deterministic virtual clock (struct Pacer). If#2877lands first, theframe.rsportion here is superseded, while thedescriptor/host.rsthread_local!fix remains independently valuable.Local Verification (
VICTORY_D3D12_DEBUG=1, 5 consecutive rounds)descriptor::host::tests(skipping pre-existing 1M cap baselinedynamic_slots_are_held_until_released) 14/14 x 5 rounds,frame::tests2/2 x 5 rounds.descriptor::host::tests15/15 x 5 rounds,frame::tests2/2 x 5 rounds.cargo clippy --locked -p victory-gpu --all-targets -- -D warnings(default and--features diagnostics) &cargo xtask policy(191 files ok): clean.@Dukestar69 on GitHub · 2026-11-26 10:10 UTC · original · approved these changes
Verified on RTX 5090 against
origin/main(63bcca4):cargo test -p victory-gpu --lib descriptor::host::tests::views_ -- --test-threads=1: 2/2 passed.cargo test -p victory-gpu --lib frame:: -- --test-threads=1: 2/2 passed.cargo clippy -p victory-gpu --all-targets -- -D warnings: clean.cargo xtask policy: 191 files ok.Cleanly hardens both timing-sensitive CI tests against loaded host scheduling jitter.
Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
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.