Flaky: victory-gpu a_texture_rewritten_whole_is_read_whole_only_now_and_then (probe deadline vs other tests' hot textures) #307

Closed
opened 2026-11-27 10:51:24 +00:00 by m0rff · 4 comments
m0rff commented 2026-11-27 10:51:24 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T10:51:24Z.


victory-gpu native::tests::texture_tests::a_texture_rewritten_whole_is_read_whole_only_now_and_then fails now and then:

panicked at crates/victory-gpu/src/native/texture_tests.rs:210:9:
assertion `left == right` failed: a whole rewrite is seen by the samples at once
  left: 3
 right: 4

It also fails at line 219 ("and the next one at the next submission").

Reproduction. Native arm64, origin/main c1b9587, with the victory-gpu lib test binary run with --test-threads=8 while a cargo build -j6 of other crates loops alongside:

  • The test alone (--exact): 0 failures in 300 runs.
  • The whole victory-gpu suite: this test failed in 16 of 200 runs (4 at line 210, 12 at line 219). a_texture_uploaded_blank_is_probed_at_each_submission failed in 3 of the same 200 runs, at line 163 ("the next at the next submission").

Cause, from a trace in probe_round. The texture tests share one Title. Hot textures stay hot for HOT submissions after the test that made them ends; the 200 of a_hot_texture_is_probed_at_each_submission_among_hundreds keep doing so after it releases AGING. In a failing run hot_keys held about 215 textures. On the failing submission, PROBE_BUDGET (2 ms) stopped the round after 61 probes (MIN_SYNC_HOT is 32), with 154 not visited, and this test's texture was one of them. So the write is seen a submission or more later. The deadline behaves as its doc comment says it should (a documented shortcut); the problem is that these asserts expect the probe to reach their texture at every submission.

Holding AGING longer would not help, since the textures stay hot after the lock is released. #252 changes how hot textures cool down, but it keeps the deadline, so it would not fix this.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6644959317 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/307). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T10:51:24Z. --- `victory-gpu` `native::tests::texture_tests::a_texture_rewritten_whole_is_read_whole_only_now_and_then` fails now and then: ``` panicked at crates/victory-gpu/src/native/texture_tests.rs:210:9: assertion `left == right` failed: a whole rewrite is seen by the samples at once left: 3 right: 4 ``` It also fails at line 219 ("and the next one at the next submission"). **Reproduction.** Native arm64, origin/main c1b9587, with the victory-gpu lib test binary run with `--test-threads=8` while a `cargo build -j6` of other crates loops alongside: - The test alone (`--exact`): 0 failures in 300 runs. - The whole victory-gpu suite: this test failed in 16 of 200 runs (4 at line 210, 12 at line 219). `a_texture_uploaded_blank_is_probed_at_each_submission` failed in 3 of the same 200 runs, at line 163 ("the next at the next submission"). **Cause, from a trace in `probe_round`.** The texture tests share one `Title`. Hot textures stay hot for `HOT` submissions after the test that made them ends; the 200 of `a_hot_texture_is_probed_at_each_submission_among_hundreds` keep doing so after it releases `AGING`. In a failing run `hot_keys` held about 215 textures. On the failing submission, `PROBE_BUDGET` (2 ms) stopped the round after 61 probes (`MIN_SYNC_HOT` is 32), with 154 not visited, and this test's texture was one of them. So the write is seen a submission or more later. The deadline behaves as its doc comment says it should (a documented shortcut); the problem is that these asserts expect the probe to reach their texture at every submission. Holding `AGING` longer would not help, since the textures stay hot after the lock is released. #252 changes how hot textures cool down, but it keeps the deadline, so it would not fix this.
m0rff commented 2026-11-27 10:51:37 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T10:51:37Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216391698 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/307#issuecomment-7216391698). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T10:51:37Z. --- /claim
github-actions[bot] commented 2026-11-27 10:51:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-27T10:51:48Z.


Claimed by @m0rff. Open a draft pull request with Refs #307 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216395239 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/307#issuecomment-7216395239). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-27T10:51:48Z. --- Claimed by @m0rff. Open a draft pull request with `Refs #307` in its description within 24 hours, or the claim expires.
m0rff commented 2026-11-27 11:07:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T11:07:11Z.


A second cause, found after the first fix (no probe deadline) still let a_texture_uploaded_blank_is_probed_at_each_submission fail at its last assert ("the next at the next submission"). The fix was 2 failures in a partial 500-run loop.

Traced: other tests' submissions run between this test's own with_title calls, and they probe its texture too. One of them uploaded the write the samples missed (upload 3), which set sampled_sees_writes = false. The test's next submission then did the follow-up whole read and found nothing new, so it went back to WHOLE_EVERY. Only then did the test see uploads == 3 and make its next write, which then waited up to 8 probes. That upload never showed in the test's own captured output, because it happened in another test's sync.

So both tests now also hold the title lock from their first write to their last assert. a_texture_rewritten_whole_is_read_whole_only_now_and_then has the same structure (its line-219 failures fit either cause).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7216700943 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/307#issuecomment-7216700943). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T11:07:11Z. --- A second cause, found after the first fix (no probe deadline) still let `a_texture_uploaded_blank_is_probed_at_each_submission` fail at its last assert ("the next at the next submission"). The fix was 2 failures in a partial 500-run loop. Traced: other tests' submissions run between this test's own `with_title` calls, and they probe its texture too. One of them uploaded the write the samples missed (upload 3), which set `sampled_sees_writes = false`. The test's next submission then did the follow-up whole read and found nothing new, so it went back to `WHOLE_EVERY`. Only then did the test see `uploads == 3` and make its next write, which then waited up to 8 probes. That upload never showed in the test's own captured output, because it happened in another test's sync. So both tests now also hold the title lock from their first write to their last assert. `a_texture_rewritten_whole_is_read_whole_only_now_and_then` has the same structure (its line-219 failures fit either cause).
m0rff commented 2026-11-27 13:23:55 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by m0rff on 2026-11-27T13:23:55Z.


Fixed by bb1a6ddf (from #308).

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7219428283 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/307#issuecomment-7219428283). Originally posted by [m0rff](https://github.com/m0rff) on 2026-11-27T13:23:55Z. --- Fixed by bb1a6ddf (from #308).
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
LakshanSivakumar/Native-Victory-macOS#307
No description provided.