list test: the memory its waits read is atomics (it failed in every release run) #210
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/Belobug--VIctory-Belobug-AMD!210
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-210"
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 23:24 UTC · original
MamaLeVrai:list-test-atomics→main· +8 −10 · 1 files · 1 commits · openlist::tests::lists_are_cut_at_waits_that_follow_workfails in every release run onmain(4f62c2a) on my machine: 150 of 150 runs of the wholevictory_gputest binary (cargo test --release -p victory-gpu --lib), and every run of the test alone. It was the only test that failed in those runs. The test needs a host GPU (it returns early without one), so it runs here.Why. With a print before that line: the first of the two loop rounds passes (
unmet0 and 1), and the second fails withunmet0 and 0. The second wait, atmemory[1], then reads as met: it still sees the 4 the first round wrote.memoryis a plainlet memory = [0u64; 2], notmut. The test writes it through raw pointers made from shared references (&raw const memory[i]cast to*mut). That is undefined behaviour, and in a release build the zeroing at the start of the second round does not reach what the wait reads.The change. Only the test changes:
memoryis twoAtomicU64, and the test writes and reads them withstoreandload. The addresses it gives the lists come fromAtomicU64::as_ptr, which may be written through.Checks (RX 6950 XT, Windows 11 build 26300, Rust 1.98.1, release):
mainvictory_gpubinary, 150 runsThe 5 runs that still fail are other tests that fail now and then, or the binary dying without a result line:
watch::tests::written_pages_are_reported_to_every_askeronce,query::tests::occlusion_queries_around_draws_not_run_stay_visibleonce, and three runs without a failing test named. I have not looked at those yet. I did not run a debug build.harness machine: rx6950xt-w11 | AMD Radeon RX 6950 XT (RDNA2), driver 32.0.21045.29003 | 32 GB RAM | Windows 11 build 26300
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code
@copilot-pull-request-reviewer[bot] on GitHub · 2026-11-25 23:24 UTC · original · reviewed
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
@adrianmjim on GitHub · 2026-11-26 19:50 UTC · original
Tested natively on a different GPU generation, with a debug build as well.
Setup: RX 7900 XT (RDNA3), driver 32.0.32029.2010, Windows 11 build 26300, Rust 1.98.1, default D3D12 hardware adapter. Head
11bc2d4, base4f62c2a. I ran base and PR binaries interleaved, in release and debug. Other heavy jobs were running on the machine at the same time.list::tests::lists_are_cut_at_waits_that_follow_workalone, 30 runs each:Whole
victory_gpulib binary, 50 runs each:So on this machine the failure only happens in release, and RDNA3 shows the same result as RDNA2. A debug build of base passes, which fits the UB explanation in the PR.
Runs that failed on some other test: base release 15/50, PR release 11/50, base debug 4/50, PR debug 9/50. The tests involved:
watch::tests,pipeline::library::tests::concurrent_atomic_writes_publish_one_complete_file,queue::tests::present_runs_after_a_queues_waitquery::tests::host_queries_count_what_draws_did(2),frame::tests::waits_end_on_ticks_and_count_frames(1)resource::tests::copy_texture_region_reads_back_into_title_buffer(1, release). This PR does not touch that code. Run alone, it passed 10/10 on both base and PR release.Not tested: WARP, Linux/Wine.
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.