Raw title copy tests fail now and then in the parallel victory-gpu suite #354
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?
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T19:32:20Z.
Two tests from the raw title copy work fail now and then in the parallel
cargo test -p victory-gpu --lockedonmainat104c3d3, although both holdone_asking_test():main, 40 runswatch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_rangeswatch.rs:4559:expect("watched destination")onprepare_raw_copy_note(&reading, p, 1)host::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_byteshost.rs:12535: unwrap onNoneThe 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_rangesfailed 3 of 40 runs, andmany_askers_tests::no_mapping_is_lost_between_askersonce (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.AI-assisted (Claude Code).
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-27T19:51:36Z.
@hamdanpor-ctrl I found a submission test that can end the shared query:
a_late_texture_readback_blocks_a_following_cpu_copycallsHost::submit, which callsask_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.
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T20:13:44Z.
More data from the same laptop,
cargo test -p victory-gpu --locked, parallel:aa917f3b6ea434(#346)1d83085(#351)raw_title_copy_keeps_write_watch_and_resends_equal_bytes19,a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges81d83085(#351), again later2d970732d97073contains1d83085, and the commits between them (#350, #356, the README) don't touchwatch.rsor 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;1d83085is 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).
Imported from TaynanGT/Vice-Tay. Originally posted by hamdanpor-ctrl on 2026-11-27T20:29:26Z.
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>:watch::a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges)host::refresh_tests::host::host::(--skip host::, sowatch::included)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).
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T11:24:09Z.
Thanks for the ten-run matrix. The changing failure rate points toward timing or shared state rather than a proven single conflicting test. I'd investigate the background-thread interaction and shared raw-copy state first, without hiding the failure behind retries or sleeps.
Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T13:29:04Z.
The second cause under parallel load is in the test: after a raw copy the journal keeps the query only while the global
changes()count is unchanged, and other fixtures remap unrelated pages meanwhile. 9 of 100 stressed runs failed on #439's branch, and with a retry when the mapping moved it's 0 of 100. #443 against #439's branch has the details.Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T14:39:02Z.
I integrated the bounded retry from #443 locally as
349e595d7. All three targeted raw_title_copy tests passed on Windows. The retry is restricted to a changed global mapping, so the stable-mapping assertion remains intact. The broader parallel stress run is still needed.Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T16:45:29Z.
The last flake I found under parallel load (
no_mapping_is_lost_between_askers, about 1 in 250 to 300 runs) is in #449. The test's own placeholders weren't told to the watch, so it asked Windows, whose answer can be wrong for a moment during a concurrent unmap. The runtime tells of its placeholders through xmem, so it isn't affected.Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-29T19:02:04Z.
Thanks for isolating the remaining flake in #449. The fixture needs to register its placeholders just as the runtime does. Let's keep the original runtime assertions intact and verify both fixes under parallel stress before treating the issue as resolved.
Imported from TaynanGT/Vice-Tay. Originally posted by Kal0s-design on 2026-11-29T20:03:24Z.
Parallel stress of #443 and #449 together on the consolidated branch, as asked here and on #449.
Setup:
cfd5ebd.cfd5ebdwith #443's commit and #449's commit cherry-picked on top (both apply cleanly).victory-gpulib test binary filtered tohost::refresh_tests watch::with--test-threads=8. Base and fixed batches ran at the same time, 3-4 processes of each at once, so the load was the same for both.cfd5ebdraw_title_copy_keeps_write_watch_and_resends_equal_bytesatafter.expect("the copy preserves the query")×3;no_mapping_is_lost_between_askersatassert!(super::published(at, end))×1cfd5ebd+ #443 + #449The four base failures are exactly the two assertions the two PRs address. Both PRs leave the runtime assertions as they were: #443 retries only when the global mapping count moved, and #449 only registers the fixture's placeholders. Nothing else failed in either set.
These are small counts. 4 against 0 of 250 is consistent with both fixes, but on its own it isn't strong proof. The probe evidence in #443 and #449 (what each failure was, and the A/B on the probe events) carries more weight. One detail for exactness: the base binary had a print-only probe in a third test,
a_raw_copy_in_watched_memory_keeps_the_other_asked_ranges, which prints only when that test fails, and it never did. I mapped the panic lines back to cfd5ebd's source with that offset accounted for.AI-assisted: yes
Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T17:01:23Z.
mainhas moved to a new line of the code and everything is now named Vice-Tay:vice-tay.exe play, andVICE_TAY_*switches instead ofVICTORY_*(details in #468). Could you check whether this still happens on the currentmainand say so here, with a log if you can?Imported from TaynanGT/Vice-Tay. Originally posted by TaynanGT on 2026-11-30T20:16:19Z.
Neither of these tests is in this tree any more.
watch::tests::a_raw_copy_in_watched_memory_keeps_the_other_asked_rangesandhost::refresh_tests::...don't exist on currentmain-mainmoved to a different line of the code on 30 November (#468) and the raw-title-copy work came from the old one.So I can't reproduce this and I'm not going to close it as fixed either: the code it describes is gone rather than repaired, and the same race could well exist under another name here.
If you still have the 40-run harness, pointing it at the current
cargo test -p vice-tay-gpu --lockedwould be genuinely useful. Flaky tests in the parallel suite are the kind of thing that hides a real ordering bug, and your method for catching them is better than anything I have.