Repository navigation
Conversation
|
Tested on Windows 11, RTX 4070 SUPER (driver 621.14), with the repo toolchain, merged into current
I didn't test with game data. Tested locally with an AI-assisted script (Claude Code); I checked the results before posting. |
Host::execute waited on each submission with no end; a host that drops the work without signalling (or reporting removal) hung the submit thread until the title watchdog killed the run with no report. Waits now go in 250 ms slices that check for removal, warn at 10/20 s, and give up with a stall report at 25 s (below the title 30 s watchdog).
|
Automated triage for the maintainers. Needs rebase. This PR no longer merges cleanly into Previous verdict for this head: merge candidate. Generated by Claude Code |
Upstream moved 70564ae..ccfb029 (GPU pacing, DRED identity, descriptor cursor, xmem commit reporting, hardware-adapter test gating, input layouts, many shader lowerings). Resolved 10 files: - host.rs, pipeline/host.rs (tests), primitive.rs, valu_tests.rs, xasync.rs: kept both sides additive tests. - indirect.rs: took upstream one-group clamp plus INDIRECT_ARGUMENT barriers; draw call sites pass the resource. - pipeline/library.rs: took upstream NAMES-hold plus clone-outside-lock loads (supersedes our Marvisak#1680 LOADS); periodic saves stay best-effort. - emit/host.rs: kept our fence-wait helper; took upstream hardware_adapter gating. - xmem.rs: took upstream OOM reporting; kept our APU allocator-refusal crash log on top of it. - lower.rs: upstream had merged the same Marvisak#1733 helper; dropped our copy. - pipeline/host.rs: kept our padding-zeroing clean_* over upstream reads. Kept from our queue: PSV0 strings, op-cache opcode key, huge gating, Marvisak#1750 wait slices, micro-opts. Verified: workspace green (gpu 151, shader 254), clippy -D warnings clean, policy 185 files ok.
|
Verification on Linux: RTX 3050 6 GB Laptop, Proton 11, vkd3d-proton. Tree: On the #1118 hang (the GPU stuck at 100% inside one mesh or compute dispatch; details on #1118), the control tree ended 2 of 2 runs with the title's watchdog at AI-assisted (Claude Code). Tested with my own dump of Grand Theft Auto VI 1.0.2.1. |
…stalls Host::execute waited for each submission with no end. A host that loses its device need not signal the fences of the work it dropped: vkd3d-proton after a GPU fault does not, and by default does not report the device removed either. The title's submit thread then stays in our wait, its render thread blocks on its full submission ring, and 30 s later the title's own watchdog ends the run at image+0x23cf683 (Marvisak#1118), with nothing of ours in crashes.log to say that the GPU faulted. The wait now goes in 250 ms slices: * between slices the device is asked whether it was removed; if so the wait ends and the existing check after the submission reports it; * a submission still running is said so at 10 s and 20 s; * at 25 s it is given up with a report of its own ("has not finished a submission ... and reports no removal"). The limit is below the title's 30 s so the run ends with the cause, not with the title's null write. vkd3d-proton's own source calls a wait of over 5 s a lost device; Windows resets a device after about 2 s. A fence that comes is taken as before; a device that is removed and signals (Windows) is reported by the check after the wait, as before. Tested on Linux only (RTX 5080, driver 620.70, GE-Proton11-6's Wine, vkd3d-proton 30b0eb9), on main + Marvisak#177 + Marvisak#259, where the world faults the GPU in every run (Xid 13, fixed by Marvisak#542): * without this, with or without VKD3D_CONFIG=fault: the title's crash at +0x23cf683 24 to 30 s after the Xid, in 9 of 9 runs, and no report; * with this and VKD3D_CONFIG=fault: "device removed: 0x887A0005" 4 s after the Xid; * with this and vkd3d-proton's defaults: the two warnings, then the stall report 25 s after the submission began. New unit test of the wait (no GPU); cargo test --workspace under Proton: 333 passed, the same ten environmental failures as main; clippy -D warnings with and without --all-features; cargo xtask policy. Not run on Windows. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
b58b779 to
3a7583f
Compare
Upstream model preferred throughout; our additive diagnostics kept: Marvisak#1750 250ms wait slices + stall reporting, copy/timing stats, texture-flow made/freed, stencil-view log, costs wiring, FrameWindow meter, lazy host-copy semantics via upstream made_copy, Marvisak#1267/Marvisak#1824/Marvisak#1694/Marvisak#1699 kept (Parts, opcode key, dot_int, 16-bit). Port adaptations where our async model differs: withholding wired at completion (note_submission + expansion + memory_withheld), per-range settle in copy_page_mappings instead of drain-everything, sync-model drain() in async-sensitive GPU tests. Dropped as superseded: manual settle around texture refresh (upstream per-thread Scratch + kept-alive per-submission uploads), Touches.staging, per-list timing grouping (upstream cuts).
Refs #1118 and #714.
Problem
Host::executewaits for each submission withWaitForSingleObject(INFINITE)and only afterwards asks the device whether it was removed. A host that loses its device does not have to signal the fences of the work it dropped. vkd3d-proton after a GPU fault does not, and with its default settings it does not mark the device removed either: its fence wait on the driver has no timeout unlessVKD3D_CONFIG=faultorbreadcrumbsis set.What follows is the crash many reports end with:
+0x23cf683.crashes.logthen holds the title's crash and nothing about the GPU. On this machine that was the outcome of 9 of 9 world runs without this change, 24 to 30 s after the Xid each time.Change
One file,
crates/victory-gpu/src/host.rs. The wait goes in 250 ms slices (wait_for_submission):host submission still on the GPU).fail, with a report of its own:host GPU has not finished a submission of N lists in 25 s and reports no removal.VICTORY_GPU_TIMING), records that list asremoved_in, as the check after each list does onmain, so the report still names it.A fence that comes is taken exactly as before, so a healthy run and a Windows device removal (which signals) behave as they do now.
The one policy choice here is the 25 s limit, and it is a single constant (
STALL_SECS). It is below the title's 30 s so that the run ends with our report of the cause and not with the title's crash. For scale: vkd3d-proton's source calls a fence wait of more than 5 s "pretty much a guaranteed timeout (TDR) scenario", and Windows resets a device after about 2 s. If you would rather it only reported and kept waiting, that is a two-line change.Testing
Rebased onto
main940d32f. The only conflict was two tests added side by side; both are kept.On the rebased commit (Linux, RTX 5080, driver 620.70, GE-Proton11-6's Wine, vkd3d-proton
30b0eb9, diagnostics build of this branch + #177 + #259):host submission still on the GPUat 10 s and 20 s and the stall report at 25 s (... a submission of 18 lists in 25 s and reports no removal), also incrashes.log. No title crash.VICTORY_SKIP_PIPELINESfor three compute pipelines whose creation never returned under vkd3d-proton (476446edcac7d521,e79dd4bd900b4200,d6dba265fd10bc2b; the run froze without it). The earlier base needed no skips. That is not this change.VKD3D_CONFIG=fault+VICTORY_GPU_TIMINGrun that would exercise theremoved_inline. On this tree that run froze the whole process during world load before any fault, with no wait of ours involved.cargo test --workspace, Windows target under Wine: 621 passed, 81 failed;mainis 620 passed with the same 81 failures, all environmental (no hardware adapter for the shader tests under Wine).victory-gpualone: 144 passed (147 with--all-features).cargo clippy --workspace --all-targets --locked -- -D warnings, with and without--all-features;cargo xtask policy. The lines this change adds are rustfmt-clean.Before the rebase (base
ffe310e+ #177 + #259, same machine):+0x23cf683, 24 to 30 s later (8 of 8 runs)VKD3D_CONFIG=fault+0x23cf683, 29 s laterVKD3D_CONFIG=faulthost GPU device removed ...; device removed: 0x887A0005, 4 s latera_wait_for_a_submission_ends_when_the_device_is_removedcovers the four outcomes with closures in place of the fence and the device (no GPU needed).Notes
wait_gpuis alsoINFINITE. If GPU: run submissions asynchronously on a host fence timeline #595 lands first I will redo this on top of it.VICTORY_STACKSon a run that died. The submit thread sat invictory_gpu::queue::execute, the render thread in its wait for a free ring slot, the main thread in the wait the watchdog guards. No game data is attached.🤖 Generated with Claude Code