victory-gpu: written_pages_are_reported_to_every_asker flaked once in a full workspace run #102

Open
opened 2026-11-26 03:35:47 +00:00 by github-bot · 2 comments
Owner

@⁠dutch2005 on GitHub · 2026-11-25 14:08 UTC · original

Summary

watch::tests::written_pages_are_reported_to_every_asker failed once during a full serial workspace run on Windows 11 / RX 6700 XT:

thread '...' panicked at crates\victory-gpu\src\watch.rs:998:9:
assertion failed: before.is_empty()

Reproduction

  • Full run: cargo test --workspace --locked --exclude xtask -- --test-threads=1 (from a local integration branch based on 71652a2; no local change touches watch.rs).
  • The same test alone: cargo test -p victory-gpu written_pages_are_reported_to_every_asker -- --test-threads=1 — 1 passed.
  • Full crate: cargo test -p victory-gpu --lib -- --test-threads=1 — 111 passed, 0 failed, 4 ignored.

So it is order/state dependent, not deterministic.

Environment

  • Windows 11, AMD Radeon RX 6700 XT (driver 32.0.21045.29003)
  • Rust 1.98.1
  • Base commit 71652a2

Why it matters

A flaky write-watch test can hide a real ordering bug in the guard/watch path; it should be made deterministic or its shared state reset between tests. No fix attempted here.

**@⁠dutch2005** on GitHub · 2026-11-25 14:08 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/102) ## Summary `watch::tests::written_pages_are_reported_to_every_asker` failed once during a full serial workspace run on Windows 11 / RX 6700 XT: ``` thread '...' panicked at crates\victory-gpu\src\watch.rs:998:9: assertion failed: before.is_empty() ``` ## Reproduction - Full run: `cargo test --workspace --locked --exclude xtask -- --test-threads=1` (from a local integration branch based on `71652a2`; no local change touches `watch.rs`). - The same test alone: `cargo test -p victory-gpu written_pages_are_reported_to_every_asker -- --test-threads=1` — 1 passed. - Full crate: `cargo test -p victory-gpu --lib -- --test-threads=1` — 111 passed, 0 failed, 4 ignored. So it is order/state dependent, not deterministic. ## Environment - Windows 11, AMD Radeon RX 6700 XT (driver 32.0.21045.29003) - Rust 1.98.1 - Base commit `71652a2` ## Why it matters A flaky write-watch test can hide a real ordering bug in the guard/watch path; it should be made deterministic or its shared state reset between tests. No fix attempted here.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:47 +00:00
Author
Owner

@⁠adrianmjim on GitHub · 2026-11-25 18:57 UTC · original

Data from an RX 7900 XT (RDNA3), driver 32.0.32029.2010, Windows 11 build 26300, Rust 1.98.1. No game data, title not run. I ran the victory-gpu lib test binary directly. Main 01aadd1 and the PR heads were run interleaved under the same machine load, with another GPU job running at the same time. This adds an RDNA3 card and default-thread runs to the RX 6950 XT numbers on #112 and #115.

written_pages_are_reported_to_every_asker:

  • --test-threads=1: main 23/23 failed (watch.rs:998, before.is_empty()), #132 (does not touch it) 23/23, #115 c866e7a 0/23, #112 a1e531b 0/23.
  • Default test threads: main 4/80, #115 0/40, #112 0/40.
  • #112 and #115 apply on top of each other (git apply --check both ways). With #112 + #115 + #132 together, the test failed 0/15 serial and 0/40 with default threads. #112's remapped_memory_clears_stale_write_journal passed in every run.
  • #154 changes the same assertions in its own way. It applies on top of #112 but not on top of #115 (watch.rs:994).

Neither PR added a failure. Other watch::tests failures that neither PR changes are in #174 (guarded-view tests and pins).

Not tested: the title, other crates.

**@⁠adrianmjim** on GitHub · 2026-11-25 18:57 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/102#issuecomment-7171622767) Data from an RX 7900 XT (RDNA3), driver 32.0.32029.2010, Windows 11 build 26300, Rust 1.98.1. No game data, title not run. I ran the victory-gpu lib test binary directly. Main `01aadd1` and the PR heads were run interleaved under the same machine load, with another GPU job running at the same time. This adds an RDNA3 card and default-thread runs to the RX 6950 XT numbers on #112 and #115. `written_pages_are_reported_to_every_asker`: - `--test-threads=1`: main 23/23 failed (`watch.rs:998`, `before.is_empty()`), #132 (does not touch it) 23/23, #115 `c866e7a` 0/23, #112 `a1e531b` 0/23. - Default test threads: main 4/80, #115 0/40, #112 0/40. - #112 and #115 apply on top of each other (`git apply --check` both ways). With #112 + #115 + #132 together, the test failed 0/15 serial and 0/40 with default threads. #112's `remapped_memory_clears_stale_write_journal` passed in every run. - #154 changes the same assertions in its own way. It applies on top of #112 but not on top of #115 (`watch.rs:994`). Neither PR added a failure. Other `watch::tests` failures that neither PR changes are in #174 (guarded-view tests and pins). Not tested: the title, other crates.
Author
Owner

@⁠qtLkz on GitHub · 2026-11-26 15:43 UTC · original

NVIDIA data for this flake, and for #112 as its fix. Setup: RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro 26300, Rust 1.98.1. main was at 4f62c2a, #112 at a1e531b and #153 at 0f373ac. Both PRs merge cleanly on main and on each other. No game data, title not run.

Cause (as identified on #112 and #153): watch::JOURNAL.written is process-global. texture::tests::warp_write_watched_texture_uploads_only_when_written frees its write-watched page without telling the journal. When VirtualAlloc later hands that address to written_pages_are_reported_to_every_asker, the first writes() already returns the stale page, and assert!(before.is_empty()) fails. #112 clears the journal for fully covered pages in title_memory_remapped, and calls it from both tests before VirtualFree.

Two-test reproduction:

cargo test -p victory-gpu --lib --locked -- --exact --test-threads=1 texture::tests::warp_write_watched_texture_uploads_only_when_written watch::tests::written_pages_are_reported_to_every_asker
Tree Pair, 10 runs: watch test failed Full victory-gpu --lib, --test-threads=1, 2 runs
main 9/10 111 passed, 2 failed: the watch test + dynamic_slots_are_held_until_released
main + #112 0/10 113 passed, 1 failed: dynamic_slots_are_held_until_released only
main + #153 7/10 112 passed, 1 failed: the watch test
main + #153 + #112 0/10 114 passed, 0 failed (both runs)

dynamic_slots_are_held_until_released is the NVIDIA 1M view-heap cap from #74, which #153 fixes. #112's own remapped_memory_clears_stale_write_journal passed in every run. The texture test passed in every run on all four trees.

So on NVIDIA, #112 removes the flake with or without #153, and main + #153 + #112 is fully green for victory-gpu on this card.

AI-assisted (Claude).

**@⁠qtLkz** on GitHub · 2026-11-26 15:43 UTC · [original](https://github.com/Belobug/VIctory-Belobug-AMD/issues/102#issuecomment-7196653720) NVIDIA data for this flake, and for #112 as its fix. Setup: RTX 4070 Ti (Ada), driver 621.01, Windows 11 Pro 26300, Rust 1.98.1. `main` was at `4f62c2a`, #112 at `a1e531b` and #153 at `0f373ac`. Both PRs merge cleanly on `main` and on each other. No game data, title not run. **Cause** (as identified on #112 and #153): `watch::JOURNAL.written` is process-global. `texture::tests::warp_write_watched_texture_uploads_only_when_written` frees its write-watched page without telling the journal. When `VirtualAlloc` later hands that address to `written_pages_are_reported_to_every_asker`, the first `writes()` already returns the stale page, and `assert!(before.is_empty())` fails. #112 clears the journal for fully covered pages in `title_memory_remapped`, and calls it from both tests before `VirtualFree`. **Two-test reproduction:** ``` cargo test -p victory-gpu --lib --locked -- --exact --test-threads=1 texture::tests::warp_write_watched_texture_uploads_only_when_written watch::tests::written_pages_are_reported_to_every_asker ``` | Tree | Pair, 10 runs: watch test failed | Full `victory-gpu --lib`, `--test-threads=1`, 2 runs | |---|---:|---| | `main` | 9/10 | 111 passed, 2 failed: the watch test + `dynamic_slots_are_held_until_released` | | `main` + #112 | **0/10** | 113 passed, 1 failed: `dynamic_slots_are_held_until_released` only | | `main` + #153 | 7/10 | 112 passed, 1 failed: the watch test | | `main` + #153 + #112 | **0/10** | **114 passed, 0 failed** (both runs) | `dynamic_slots_are_held_until_released` is the NVIDIA 1M view-heap cap from #74, which #153 fixes. #112's own `remapped_memory_clears_stale_write_journal` passed in every run. The texture test passed in every run on all four trees. So on NVIDIA, #112 removes the flake with or without #153, and `main` + #153 + #112 is fully green for `victory-gpu` on this card. AI-assisted (Claude).
This discussion has been locked. Commenting is limited to contributors.
No description provided.