Tests bindless::heap_views_* fail intermittently in a full workspace run #2252
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#2252
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@MamaLeVrai on GitHub · 2026-11-25 08:52 UTC · original
bindless::tests::heap_views_*invictory-gpufail now and then in a fullcargo test --workspace --lockedonmain, and pass whencargo test -p victory-gpu --libis run on its own.What I saw (Windows 11, RX 6950 XT, Rust 1.98.1,
main940d32f): the same assertion failed in 3 of 36 full runs, once onmainalone (inbindless::tests::heap_views_are_current) and twice onmainplus an unrelated open PR (#2175 and #2187, inbindless::tests::heap_views_follow_writes_through_another_mapping).mainalone passed its other 3 full runs, and 6 runs ofcargo test -p victory-gpu --libon one of the failing trees all passed (144 each).The failing line is the same in both tests, round 0, dword 0: the value read back is 0 where the test expects 1064. I have not found the cause. A guess, not checked: these tests use the host GPU together with the other GPU tests running at the same time in one process.
This is the second test of
mainthat fails like this in full runs: see #1882 (emit::memory_tests::title_memory_is_read_and_written_at_computed_addresses). No game data is involved.AI-assisted (Claude Code); no game data.
@Ingenioeren on GitHub · 2026-11-25 09:13 UTC · original
Does not reproduce on
main940d32fon an RX 6750 XT (RDNA2): 0 failures in 336 runs of the two tests.Windows 11, Rust MSVC toolchain, default features.
heap_views_*failurescargo test --workspace --locked --no-fail-fastvictory-gpulib test binary on its ownvictory-gpulib test binary at the same time (to share the GPU across processes)The only failures in the workspace runs were
emit::rect::tests::rectangles_get_their_fourth_cornerandemit::tests::elements_sharing_a_row_keep_their_order. They fail every run on this PC because the localdxil.dllrejects them, so they are not related.Things I read and ruled out (code reading only, not proven):
descriptor::sync_heapscannot rewrite the test's slots, because the test heap is allocated by us and has nowrittentracker.diagnosticsfeature is not on in a workspace test build, since nothing enables it by default. So the workspace build ofvictory-gpumatches the per-crate one.A value of 0 at round 0, dword 0 means either the dispatch's write never reached the output's host copy, or
srcand the texture both read zero (if only one of them read zero, the result would be 64 or 1000, not 0). So I still have no cause.AI assistance: prepared with Claude Code, reviewed by Ingenioeren.
@andrewpozdnakov7-jpg on GitHub · 2026-11-25 09:18 UTC · original
I reproduced the reported 0 instead of 1064 on WARP at main
940d32f69b. On the failing runs the bindless heap tracked no viewed buffer ranges, although the title's view records were present. The placed-heap fixture was leaving a stale heap registration behind when it dropped its descriptor memory.The fix and regression are in d183e7c, opened as #2262. With deterministic address reuse, the same test fails on the base because the new heap receives no descriptor write and passes with the fixture cleanup. Full victory-gpu WARP run after the fix: 146 passed, 0 failed, 2 ignored.
If you use this change or its test, please keep the Git author. If you fold either into your own commit, please add:
Co-authored-by: andrewpozdnakov7-jpg [email protected]
AI-assisted. Synthetic tests only.
@Calvix2k on GitHub · 2026-11-25 09:39 UTC · original
Reproduction attempt on this machine (Windows 10 19045, RX 7800 XT,
main940d32f): 8 runs ofcargo test -p victory-gpu --features diagnostics --lib— the bindless tests passed every time. The one failure in each run is the knowndraw::tests::a_texture_written_in_one_format_reads_in_another_through_a_placed_viewon a Windows 10 runtime withoutID3D12Device10(#1999), not this.So I could not reproduce the flake here, and I would rather not commit a serialisation lock that might hide a real ordering bug. Can you add:
left == right failed:is cut in the issue), and--test-threads=1avoids it — that separates shared-state interference from a timing bug inexecute's upload/copy-back path.If it is the parallel case, my first suspect is the bindless upload list built in
Host::execute: the heap'sViewedranges are snapshotted there under thesubmittedlock, so a lock per test would only paper over it. With the message and a failing log I can tell which of the two it is; aVICTORY_LOG=debugrun of the full workspace would also show the descriptor sync/upload lines around the bad round.@andrewpozdnakov7-jpg on GitHub · 2026-11-25 09:55 UTC · original
The full assertion from my failing heap_views_follow_writes_through_another_mapping run was:
I reran the clean
940d32fGPU test binary with forced WARP and --test-threads=1. All 36 full victory-gpu runs passed (146 passed, 2 ignored each). In the earlier 16-thread WARP runs with observation enabled, the same bindless assertion failed 3 of 63 times. Those three runs showed zero viewed ranges even though the two title-side view records were still present.The deterministic check in #2262 explains how those ranges can go missing. The placed-heap test left its first heap registered when it released the backing memory. A later heap at the same address took no descriptor writes because the registry still matched the original heap first. Recreating a heap at the same address in the fixture fails before the cleanup and passes with d183e7c. This change releases the fixture handles. The patched binary also passed 85 full 16-thread WARP runs.
If you reuse the fixture or its cleanup, please preserve the Git author. If you fold either into another commit, please add:
Co-authored-by: andrewpozdnakov7-jpg [email protected]
AI-assisted. Synthetic tests only.
@Marvisak on GitHub · 2026-11-25 15:51 UTC · original
Automated triage for the maintainers.
The mechanism found in the thread is still on main (
da82e44):placed_heaps_start_at_the_title_memoryincrates/victory-gpu/src/descriptor.rs(tests) creates a heap placed in a localVecand never releases it. When theVec's memory is freed, the heap stays registered at that address. A later test heap that gets the same address then misses its descriptor writes, which explains the intermittent0vs1064inbindless::tests::heap_views_*in full parallel runs. Open PR #2262 releases the fixture's heaps and adds a reuse check.Generated by Claude Code