Raw title copy tests fail now and then in the parallel victory-gpu suite #354

Open
opened 2026-11-27 19:33:31 +00:00 by github-bot · 3 comments
Owner

@⁠hamdanpor-ctrl on GitHub · 2026-11-27 19:32 UTC · original

Two tests from the raw title copy work fail now and then in the parallel cargo test -p victory-gpu --locked on main at 104c3d3, although both hold one_asking_test():

Test Failure main, 40 runs
watch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges watch.rs:4559: expect("watched destination") on prepare_raw_copy_note(&reading, p, 1) 1
host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytes host.rs:12535: unwrap on None 1

The same two failed once each in another 40 runs on a branch that changes only shadow/loose_allocation_tests.rs (#346).

What did not help: making the eight other tests that ask about write-watched title memory hold the lock as well (what_is_taken_again_is_what_was_written, no_write_is_lost_between_askers, reads_in_place_and_remappings_wait_for_each_other, the_parts_of_a_page_written_since_it_was_taken, written_pages_are_reported_to_every_asker, only_what_differs_goes_up, kept_things_come_back_by_size_within_the_limit, bytes_under_overlapping_ranges). With that, a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges failed 3 of 40 runs, and many_askers_tests::no_mapping_is_lost_between_askers once (watch.rs:5968, assert!(super::published(at, end))). So what ends or replaces the test's asking is probably not another test asking directly; a submission path in a test without the lock is my next guess, but I have not found it. Not posting that branch.

  • PC: RTX 3050 Laptop GPU 4 GB (driver 617.42), i7-12700H, 16 GB, Windows 11 Pro; Rust 1.98.1
  • Full logs of the failing runs are available if useful.

AI-assisted (Claude Code).

**@⁠hamdanpor-ctrl** on GitHub · 2026-11-27 19:32 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/354) Two tests from the raw title copy work fail now and then in the parallel `cargo test -p victory-gpu --locked` on `main` at `104c3d3`, although both hold `one_asking_test()`: | Test | Failure | `main`, 40 runs | |---|---|---:| | `watch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges` | `watch.rs:4559`: `expect("watched destination")` on `prepare_raw_copy_note(&reading, p, 1)` | 1 | | `host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytes` | `host.rs:12535`: unwrap on `None` | 1 | The same two failed once each in another 40 runs on a branch that changes only `shadow/loose_allocation_tests.rs` (#346). What did not help: making the eight other tests that ask about write-watched title memory hold the lock as well (`what_is_taken_again_is_what_was_written`, `no_write_is_lost_between_askers`, `reads_in_place_and_remappings_wait_for_each_other`, `the_parts_of_a_page_written_since_it_was_taken`, `written_pages_are_reported_to_every_asker`, `only_what_differs_goes_up`, `kept_things_come_back_by_size_within_the_limit`, `bytes_under_overlapping_ranges`). With that, `a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges` failed 3 of 40 runs, and `many_askers_tests::no_mapping_is_lost_between_askers` once (`watch.rs:5968`, `assert!(super::published(at, end))`). So what ends or replaces the test's asking is probably not another test asking directly; a submission path in a test without the lock is my next guess, but I have not found it. Not posting that branch. - PC: RTX 3050 Laptop GPU 4 GB (driver 617.42), i7-12700H, 16 GB, Windows 11 Pro; Rust 1.98.1 - Full logs of the failing runs are available if useful. AI-assisted (Claude Code).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 19:33:31 +00:00
Author
Owner

@⁠TaynanGT on GitHub · 2026-11-27 19:51 UTC · original

@⁠hamdanpor-ctrl I found a submission test that can end the shared query: a_late_texture_readback_blocks_a_following_cpu_copy calls Host::submit, which calls ask_once_end(). The readback fixture was outside the lock held by both raw-copy tests.

#361 takes the same lock in that fixture. #344 separately gave the host raw-copy test a stable mapping. I’ve kept this issue open for the remaining intermittent cases.

**@⁠TaynanGT** on GitHub · 2026-11-27 19:51 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/354#issuecomment-7226939846) @⁠hamdanpor-ctrl I found a submission test that can end the shared query: `a_late_texture_readback_blocks_a_following_cpu_copy` calls `Host::submit`, which calls `ask_once_end()`. The readback fixture was outside the lock held by both raw-copy tests. #361 takes the same lock in that fixture. #344 separately gave the host raw-copy test a stable mapping. I’ve kept this issue open for the remaining intermittent cases.
Author
Owner

@⁠hamdanpor-ctrl on GitHub · 2026-11-27 20:13 UTC · original

More data from the same laptop, cargo test -p victory-gpu --locked, parallel:

Commit Runs Failed Which
aa917f3 10 1 raw copy in watched memory
b6ea434 (#346) 10 2 one each
1d83085 (#351) 40 23 raw_title_copy_keeps_write_watch_and_resends_equal_bytes 19, a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges 8
1d83085 (#351), again later 10 7 6 and 3
2d97073 10 1 raw title copy

2d97073 contains 1d83085, and the commits between them (#350, #356, the README) don't touch watch.rs or the refresh tests, yet the rate fell back. So these two look very sensitive to timing or to how the test binary happens to be laid out, not tied to one change; 1d83085 is just a build where they fail most of the time here, which may make it the easiest one to debug on.

AI-assisted (Claude Code).

**@⁠hamdanpor-ctrl** on GitHub · 2026-11-27 20:13 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/354#issuecomment-7227299261) More data from the same laptop, `cargo test -p victory-gpu --locked`, parallel: | Commit | Runs | Failed | Which | |---|---:|---:|---| | `aa917f3` | 10 | 1 | raw copy in watched memory | | `b6ea434` (#346) | 10 | 2 | one each | | `1d83085` (#351) | 40 | 23 | `raw_title_copy_keeps_write_watch_and_resends_equal_bytes` 19, `a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges` 8 | | `1d83085` (#351), again later | 10 | 7 | 6 and 3 | | `2d97073` | 10 | 1 | raw title copy | `2d97073` contains `1d83085`, and the commits between them (#350, #356, the README) don't touch `watch.rs` or the refresh tests, yet the rate fell back. So these two look very sensitive to timing or to how the test binary happens to be laid out, not tied to one change; `1d83085` is just a build where they fail most of the time here, which may make it the easiest one to debug on. AI-assisted (Claude Code).
Author
Owner

@⁠hamdanpor-ctrl on GitHub · 2026-11-27 20:29 UTC · original

Narrowed on 1d83085, where the full parallel suite fails these about 7 times in 10 here. 10 runs per group, cargo test -p victory-gpu --locked -- <filter>:

Run beside the two tests Tests run Raw-copy failure
nothing (the two tests alone) 2 0 of 10
watch:: 51 3 of 10 (a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges)
host::refresh_tests:: 10 0 of 10
host:: 172 0 of 10
everything but host:: (--skip host::, so watch:: included) 389 0 of 10

The last group contains the watch:: one yet never failed, so I don't think a single other test is the cause; together with the rate moving between builds, it looks like a timing race in the raw-copy path or its test (perhaps against a background thread) that other tests only make more or less likely.

AI-assisted (Claude Code).

**@⁠hamdanpor-ctrl** on GitHub · 2026-11-27 20:29 UTC · [original](https://github.com/TaynanGT/Vice-Tay/issues/354#issuecomment-7227555537) Narrowed on `1d83085`, where the full parallel suite fails these about 7 times in 10 here. 10 runs per group, `cargo test -p victory-gpu --locked -- <filter>`: | Run beside the two tests | Tests run | Raw-copy failure | |---|---:|---:| | nothing (the two tests alone) | 2 | 0 of 10 | | `watch::` | 51 | 3 of 10 (`a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges`) | | `host::refresh_tests::` | 10 | 0 of 10 | | `host::` | 172 | 0 of 10 | | everything but `host::` (`--skip host::`, so `watch::` included) | 389 | 0 of 10 | The last group contains the `watch::` one yet never failed, so I don't think a single other test is the cause; together with the rate moving between builds, it looks like a timing race in the raw-copy path or its test (perhaps against a background thread) that other tests only make more or less likely. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/TaynanGT--Vice-Tay#354
No description provided.