No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!2009
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2009/head"
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?
@tharun-37 on GitHub · 2026-11-25 02:51 UTC · original
tharun-37:fix/shadow-copyback→main· +52 −8 · 2 files · 2 commits · closed without mergingSplit from #2000 per review feedback (gpu-only, Windows path). #721: copy_back now writes only changed bytes. #722: page marked current only if title still matches. Builds clean; shadow tests pass.
@jeremygold02 on GitHub · 2026-11-25 03:08 UTC · original · edited 2026-11-25 03:22 UTC
Triage verdict — Needs changes (
57fdaea)Evidence
57fdaeaaddresses the right invariant for #721. For #722, I would keep the PR in review until the final compare is tied to the page’s watch state.copy_backre-reads title bytes and compares them with the host copy, then separately callsTracked::taken, which protects the page and clears its dirty entry. From the code, a title write between the compare and that clear can leave a stale copy marked current.Checks and limits
Next step
write_mappedcall per changed run, so a passing dense or small test does not bound that cost. Prior sparse-write discussionThis verification was AI-assisted.
@upipibi on GitHub · 2026-11-25 03:20 UTC · original
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
57fdaea.victory-gpu: 141 passed, 2 failed, 2 ignored. This PR adds no test of its own for #721 / #722, so this only shows the existing tests still pass. The 2 are #1744's NVIDIA failures onmain(dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views, the heap-cap ones). Same asmainon this hardware. Not run: a title.AI-assisted (Claude Code).
@Marvisak on GitHub · 2026-11-25 09:17 UTC · original · edited 2026-11-25 22:19 UTC
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/shadow.rsandcrates/victory-gpu/src/watch.rs). It will be reviewed again once it is rebased.From the earlier needs-work note, still open: regression tests in the PR for the #722 race and for #721, a bound or measurement for the per-run
write_mappedcost, and the overlap with #1024.Generated by Claude Code
@ajsem1337 on GitHub · 2026-11-25 10:48 UTC · original
Deterministic reproduction of the guarded copy-back race
Following up on the race identified in review, a test simulates a GPU write by changing the host copy. During guarded snapshot copy-back, a test hook makes a second thread write to the tracked title page just before
Tracked::taken.main(940d32f)mainwith #2009 (57fdaea)Three seeds on main and two on the PR gave the same result. The other eight cases met their visibility deadlines on both builds.
On #2009 the write lands after the final comparison and before the page is re-protected. That write is marked as already copied. Marking the page current requires validating its bytes after re-protection and preserving later writes, including writes through aliases. Prior review · Related earlier report
Reproducer (test, test-only hook, and the one-line assertion change for this PR): https://gist.github.com/ajsem1337/551639fa596a63f63282956d42917b0c
Found with AI assistance (Codex wrote the original test, Claude Code ported it to
mainand ran it).@ajsem1337 on GitHub · 2026-11-25 11:55 UTC · original
Re-ran the reproducer from the gist on
b9ecb1e: theBeforeTakencase now passes for all three seeds (3913, 77, 1234567). The write made just beforeTracked::takenreaches the host copy one submission later (lost: 0, deferred: 32, waslost: 32onmainand on57fdaea), and the whole test passes.Limits: the gist's 0001 no longer applies to the changed
taken, so I put the sameBEFORE_TAKENhook in by hand at the same place (top oftaken, beforeguards()), plus 0002. The test covers that window only, not a write landing inside the guarded section, and it ran under Proton on an RX 7900 GRE, not on Windows.@cloph-dsp on GitHub · 2026-11-25 16:26 UTC · original
Independent GPU validation for PR #2009 (Windows, Rust 1.100.0/MSVC, head
b9ecb1e, no game data):cargo test --locked -p victory-gpu --lib shadow::testswithVICTORY_D3D12_WARP=0on RTX 5060 Laptop (driver 621.24) -> 4 tests passed (title_writes_under_a_busy_range_are_copied,snapshots_cover_the_declared_ranges_and_writes_go_back_once,marked_pages_go_back_by_the_bytes_the_gpu_changed,mark_runs_are_reused_and_joined), 141 filtered, exit 0; withVICTORY_D3D12_WARP=1 --features diagnostics(WARP) -> same 4 tests passed, 144 filtered, exit 0. Explicit adapter selection used because the hybrid laptop may default to the 780M iGPU. No real title or game data used. AI-assisted (Hy4 flash). GPU/driver: RTX 5060 Laptop, driver 621.24, Vulkan 1.4.357 (WARP second data point).@tharun-37 on GitHub · 2026-11-26 03:26 UTC · original
Closing to re-scope: taking on better-scoped issues instead.
Pull request closed