World GPU fault: title's own hang-check exits (EXIT 1) 5-22s after "in the world" — same fault as VIctory #844 #16

Open
opened 2026-11-30 18:02:13 +00:00 by github-bot · 8 comments
Owner

@⁠peraperkan on GitHub · 2026-11-30 17:57 UTC · original

Symptom

On the target system (RX 9070 XT, Mesa 26.3.1, 30 GB RAM, Proton 11/GE-Proton 11-15), every run reaches "in the world" (renders fine, 12-17 fps), then the title exits on its own after 5-22 s with:

title exited with 1

No panic, no VK_ERROR_DEVICE_LOST, no segfault. Reproducible 7/7 runs, at varying times (5s, 14s, 16s, 22s...). Not affected by: AFMF/MangoHud layers, VKB_REC_THREADS (1 or 8), VKB_GTT_BUDGET_GB, UMEM_LAZY_UNBIND, Mesa 26.2.4 vs 26.3.1.

Likely root cause (matches upstream VIctory #844 and #714)

This is the same world-GPU-fault pattern Slaktarn700 diagnosed and fixed in the D3D12 path (Marvisak/VIctory#844, branch Slaktarn700:proton-fixes):

  1. Heap slots the title writes into its own memory — GTA VI copies whole descriptor slots inside its own heap with no create/copy call reporting it. A mesh shader then reads a slot as a constant buffer while the host slot still holds a texture view → the device is lost. Fix there: mirror heap blocks written since the last submission (watch::writes) before each submit.
  2. Root SRVs bound as unbounded tables — a compute shader reads 32 MB past a root SRV's host copy. Fix there: bind root SRVs as one-view raw-buffer tables sized to the copy so out-of-range reads return zeros.

Upstream: "Before, it was lost after 5–90 s" — exactly the window seen here. VIctory#714 notes the reason no DEVICE_LOST appears: "the title's own hang check exits first." That is why the only signal is title exited with 1.

vkback-specific note

The D3D12 path's fix (re-mirror from the title's record under the slot lock, HostHeap::mirror) does not exist in vkback by design — descjob.rs documents that vkback "jobs are not made from the record at run time, so the order is kept by one stream instead." If the title writes descriptor slots straight into its own heap memory, that stream never sees the write, which matches the crash.

Per-frame evidence of the title touching unmapped addresses (expected stale words, but the same reads that fault when they land in a live slot):

ERROR rule32 buffer view not on 4 bytes over no title memory (null): vkback: 0x100000007 len 1024 Shader view
ERROR rule32 buffer view not on 4 bytes over no title memory (null): vkback: 0xd00000007 len 112 Constant view

Reference

Happy to test a vkback port once it exists — I can rebuild from source on this exact machine (RX 9070 XT, RADV).

**@⁠peraperkan** on GitHub · 2026-11-30 17:57 UTC · [original](https://github.com/vktory6/VKtory/issues/16) ## Symptom On the target system (RX 9070 XT, Mesa 26.3.1, 30 GB RAM, Proton 11/GE-Proton 11-15), every run reaches "in the world" (renders fine, 12-17 fps), then the title exits on its own after **5-22 s** with: ``` title exited with 1 ``` No panic, no `VK_ERROR_DEVICE_LOST`, no segfault. Reproducible 7/7 runs, at varying times (5s, 14s, 16s, 22s...). Not affected by: AFMF/MangoHud layers, `VKB_REC_THREADS` (1 or 8), `VKB_GTT_BUDGET_GB`, `UMEM_LAZY_UNBIND`, Mesa 26.2.4 vs 26.3.1. ## Likely root cause (matches upstream VIctory #844 and #714) This is the same world-GPU-fault pattern Slaktarn700 diagnosed and fixed in the D3D12 path (Marvisak/VIctory#844, branch `Slaktarn700:proton-fixes`): 1. **Heap slots the title writes into its own memory** — GTA VI copies whole descriptor slots inside its own heap with no create/copy call reporting it. A mesh shader then reads a slot as a constant buffer while the host slot still holds a texture view → the device is lost. Fix there: mirror heap blocks written since the last submission (`watch::writes`) before each submit. 2. **Root SRVs bound as unbounded tables** — a compute shader reads 32 MB past a root SRV's host copy. Fix there: bind root SRVs as one-view raw-buffer tables sized to the copy so out-of-range reads return zeros. Upstream: "Before, it was lost after 5–90 s" — exactly the window seen here. VIctory#714 notes the reason no `DEVICE_LOST` appears: *"the title's own hang check exits first."* That is why the only signal is `title exited with 1`. ## vkback-specific note The D3D12 path's fix (re-mirror from the title's record under the slot lock, `HostHeap::mirror`) does not exist in vkback by design — `descjob.rs` documents that vkback "jobs are not made from the record at run time, so the order is kept by one stream instead." If the title writes descriptor slots straight into its own heap memory, that stream never sees the write, which matches the crash. Per-frame evidence of the title touching unmapped addresses (expected stale words, but the same reads that fault when they land in a live slot): ``` ERROR rule32 buffer view not on 4 bytes over no title memory (null): vkback: 0x100000007 len 1024 Shader view ERROR rule32 buffer view not on 4 bytes over no title memory (null): vkback: 0xd00000007 len 112 Constant view ``` ## Reference - Marvisak/VIctory#844 — the two fixes (with `umr` wave-dump evidence and the 8-minute-no-device-loss result). - Marvisak/VIctory#714 — "hang check exits first", so no DRED report. Happy to test a vkback port once it exists — I can rebuild from source on this exact machine (RX 9070 XT, RADV).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:02:13 +00:00
Author
Owner

@⁠peraperkan on GitHub · 2026-11-30 18:02 UTC · original

Follow-up from source review: vkback already has equivalents of BOTH #844 fixes, so the fault persisting here is a scene-specific case the current mechanisms miss.

  • Fix #1 (heap re-mirror) → live.rs index_slots_begin/slot_reads/retry_slot_reads at each Execute (the comment there literally cites resync_title_writes).
  • Fix #2 (bounded out-of-range reads) → flatviews.rs: the whole title window is one sparse buffer, reads by 40-bit address pick a view slice; unmapped pages "read zeros and drop writes" (residencyNonResidentStrict). Added 2026-11-29.
  • Stale-word crash (w24/w27) → bufview.rs exact_view + null for "buffer view not on 4 bytes … over no title memory" — the 0xd00000007/0x100000007 rule32 lines are this already-handled path.

So the crash is not the two known faults. The remaining signature in the logs is: title exited with 1, ~5–22 s after "in the world", no DEVICE_LOST, ~10–36 rule32 buffer view … over no title memory per run (all the handled stale-word path).

I can capture whatever is needed for repro on this exact box (RX 9070 XT, RADV 26.3.1). If there's a VKB_* diagnostic to arm (per-op watch, gpuprof, umr-friendly dumps) that would pin the faulting op, point me at it and I'll run it.

**@⁠peraperkan** on GitHub · 2026-11-30 18:02 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7287241536) Follow-up from source review: vkback already has equivalents of BOTH #844 fixes, so the fault persisting here is a *scene-specific* case the current mechanisms miss. - **Fix #1 (heap re-mirror)** → `live.rs` `index_slots_begin`/`slot_reads`/`retry_slot_reads` at each `Execute` (the comment there literally cites `resync_title_writes`). - **Fix #2 (bounded out-of-range reads)** → `flatviews.rs`: the whole title window is one sparse buffer, reads by 40-bit address pick a view slice; unmapped pages "read zeros and drop writes" (residencyNonResidentStrict). Added 2026-11-29. - **Stale-word crash (w24/w27)** → `bufview.rs` `exact_view` + null for "buffer view not on 4 bytes … over no title memory" — the `0xd00000007`/`0x100000007` rule32 lines are this already-handled path. So the crash is not the two known faults. The remaining signature in the logs is: `title exited with 1`, ~5–22 s after "in the world", no `DEVICE_LOST`, ~10–36 `rule32 buffer view … over no title memory` per run (all the handled stale-word path). I can capture whatever is needed for repro on this exact box (RX 9070 XT, RADV 26.3.1). If there's a `VKB_*` diagnostic to arm (per-op watch, gpuprof, umr-friendly dumps) that would pin the faulting op, point me at it and I'll run it.
Author
Owner

@⁠peraperkan on GitHub · 2026-11-30 18:19 UTC · original

RGP capture note (relevant to debugging the fault): MESA_VK_TRACE=rgp enables RADV thread trace fine on this box (radv: Thread trace support is enabled (128 MiB) in log.txt), and both MESA_VK_TRACE_FRAME=1 and MESA_VK_TRACE_TRIGGER produce .rgp files with vkcube. But for VKtory neither trigger nor frame produces a capture — vkback's standalone present mode logs no game window known ... frames are not shown until it comes before the swapchain exists, and the capture trigger never fires. If RGP captures are the intended way to pin the faulting wave (as with the umr dumps in VIctory#844), is there a VKtory flag to force the windowed/swapchain present path (or should capture be armed after the window arrives)?

**@⁠peraperkan** on GitHub · 2026-11-30 18:19 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7287677960) RGP capture note (relevant to debugging the fault): `MESA_VK_TRACE=rgp` enables RADV thread trace fine on this box (`radv: Thread trace support is enabled (128 MiB)` in log.txt), and both `MESA_VK_TRACE_FRAME=1` and `MESA_VK_TRACE_TRIGGER` produce `.rgp` files with `vkcube`. But for VKtory neither trigger nor frame produces a capture — vkback's standalone present mode logs `no game window known ... frames are not shown until it comes` before the swapchain exists, and the capture trigger never fires. If RGP captures are the intended way to pin the faulting wave (as with the umr dumps in VIctory#844), is there a VKtory flag to force the windowed/swapchain present path (or should capture be armed after the window arrives)?
Author
Owner

@⁠vktory6 on GitHub · 2026-11-30 22:36 UTC · original

Thanks for the detailed report, and for the follow-up: you're right, vkback has both of those mechanisms (the
title's byte copies into its shader-visible heaps are found through the heap write watch and sent before each
submission, and by-address reads go through the flat title window, which reads zeros on unmapped pages). The rule-32
buffer view ... over no title memory lines are counted and nulled, so on their own they don't explain an exit.

What we know:

  • On the reference machine (same GPU and Mesa) a 2026-11-29 build ran a 45-minute session without an exit.
  • We saw the same signature twice on 2026-11-27: the title ended with exit code 1 about 15 s after the world showed
    (prison cell), no device loss, nothing in log.txt or vk.log. It did not come back, so it is open and unexplained
    (docs/learnings/shader-store.md, "Prison runs: title exits ...", and docs/learnings/exposure-pair.md, "Open").
  • title exited with 1 is printed by our launcher when the title's main thread returns with that code. It is not a
    crash, and not the exit/TerminateProcess paths, which log title exits / title terminates the process with the
    callers. So the title itself decided to stop.
  • A GPU hang on RADV ends in a ring timeout after about 2 s even when the title quits first, and that shows up in the
    kernel log (docs/learnings/vkback-descriptors-and-hangs.md). If there is nothing there, a GPU hang check is
    unlikely to be the reason.

What would help:

  1. The commit you built, the scene and how you started it (tools/play.sh defaults or a save), and any switches you
    set.
  2. log.txt and vk.log of one run (the last ~200 lines of each is fine), especially any title exits,
    title terminates, title aborts or unhandled-exception lines with their from= callers.
  3. journalctl -k (or dmesg) around the moment of the exit: any amdgpu ring timeout, page fault or reset lines.
  4. One run with VKB_LAT=<file>, and the last seconds through greenfield/tools/frec/frames.py <run> <from_s> <to_s>.
    That shows whether presents and GPU work kept completing right up to the exit, or stopped before it.
  5. Whether it happens at the same moment in the game each time (a scripted event) or at random.

On RGP: there is no windowed mode or second present path. vkback always presents into the title's own window
(borderless full screen); the no game window known line is logged once, for the first presents before the PE side
has sent the window, and it presents normally after that (docs/learnings/present.md). Check the log for
failed to set new pstate. (-16) (see #9), and note that MESA_VK_TRACE turns off vkback's pipeline cache, so the
first world seconds are slow (docs/learnings/gpu-time.md). For this exit, though, the logs and the kernel log above
are the better first step: without a device loss there may be no faulting wave to find.

**@⁠vktory6** on GitHub · 2026-11-30 22:36 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7294068923) Thanks for the detailed report, and for the follow-up: you're right, vkback has both of those mechanisms (the title's byte copies into its shader-visible heaps are found through the heap write watch and sent before each submission, and by-address reads go through the flat title window, which reads zeros on unmapped pages). The rule-32 `buffer view ... over no title memory` lines are counted and nulled, so on their own they don't explain an exit. What we know: - On the reference machine (same GPU and Mesa) a 2026-11-29 build ran a 45-minute session without an exit. - We saw the same signature twice on 2026-11-27: the title ended with exit code 1 about 15 s after the world showed (prison cell), no device loss, nothing in `log.txt` or `vk.log`. It did not come back, so it is open and unexplained (`docs/learnings/shader-store.md`, "Prison runs: title exits ...", and `docs/learnings/exposure-pair.md`, "Open"). - `title exited with 1` is printed by our launcher when the title's main thread returns with that code. It is not a crash, and not the `exit`/`TerminateProcess` paths, which log `title exits` / `title terminates the process` with the callers. So the title itself decided to stop. - A GPU hang on RADV ends in a ring timeout after about 2 s even when the title quits first, and that shows up in the kernel log (`docs/learnings/vkback-descriptors-and-hangs.md`). If there is nothing there, a GPU hang check is unlikely to be the reason. What would help: 1. The commit you built, the scene and how you started it (`tools/play.sh` defaults or a save), and any switches you set. 2. `log.txt` and `vk.log` of one run (the last ~200 lines of each is fine), especially any `title exits`, `title terminates`, `title aborts` or unhandled-exception lines with their `from=` callers. 3. `journalctl -k` (or `dmesg`) around the moment of the exit: any amdgpu ring timeout, page fault or reset lines. 4. One run with `VKB_LAT=<file>`, and the last seconds through `greenfield/tools/frec/frames.py <run> <from_s> <to_s>`. That shows whether presents and GPU work kept completing right up to the exit, or stopped before it. 5. Whether it happens at the same moment in the game each time (a scripted event) or at random. On RGP: there is no windowed mode or second present path. vkback always presents into the title's own window (borderless full screen); the `no game window known` line is logged once, for the first presents before the PE side has sent the window, and it presents normally after that (`docs/learnings/present.md`). Check the log for `failed to set new pstate. (-16)` (see #9), and note that `MESA_VK_TRACE` turns off vkback's pipeline cache, so the first world seconds are slow (`docs/learnings/gpu-time.md`). For this exit, though, the logs and the kernel log above are the better first step: without a device loss there may be no faulting wave to find.
Author
Owner

@⁠vktory6 on GitHub · 2026-11-30 22:40 UTC · original

I created a task based on your report: github.com/vktory6/VKtory@5cae53b40f

**@⁠vktory6** on GitHub · 2026-11-30 22:40 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7294155005) I created a task based on your report: https://github.com/vktory6/VKtory/commit/5cae53b40fb415d19b3a2b6d55bfe3a1ab7ccb22
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 09:04 UTC · original

Adding findings from a local investigation on the reference machine (GE-Proton11-15, build with an 8 MiB title-main stack floor), in case they save someone time:

  • One confirmed overflow: an idle run ended with 0100:err:virtual:virtual_setup_exception stack overflow 2048 bytes addr 0x7f364ff79099 stack 0xd20800 (0xd20000-0xd21000-0xe20000) — thread 0100 is the Rust title-main thread created by spawn_main with the image's 1 MiB reserve. Its last calls were a burst of env reads then four SetThreadIdealProcessorEx.
  • Bigger stack is not a demonstrated fix: raising only title-main to 8 MiB removed that ERR line, but 2 of 3 runs still exited 1 about 40-45 s after world entry; a fourth survived 150 s. Two later 180 s filtered runs also survived. So the reserve masks one instance at most; the intermittent exit has another cause.
  • No title exit call: with WINEDEBUG=+process, the parent Proton start.exe logs NtTerminateProcess handle (nil), exit_code 1 after the victory.exe child disappears; the child logs no NtTerminateProcess, and there is no title exits / title calls ExitProcess / title terminates line. The guest process ends on the Unix side, silently. Its native process exited with status 0 in the LD_PRELOAD trace, so that trace did not identify a Windows exit code.
  • Secondary panic: one native exit trace ended in abort from panic_cannot_unwind <- vkback_unix::live_done while Wine was forcibly unwinding a thread — this is the Unix-call teardown panic already described in crates/victory-gpu/src/unixgate.rs, not the initiating event.
  • Sampler artifact: VICTORY_STACKS suspends threads; a filtered run with it produced a nested exception on a signal stack whose PC mapped into Wine's usr1_handler (SIGUSR1, used by SuspendThread). Without VICTORY_STACKS that exception does not appear — don't chase it as the cause.
  • dmesg showed no amdgpu ring timeout around the exits.

Evidence is in /tmp/opencode/capture/ (native-exittrace-*, seh-filter-*, stackfix-*) and the detailed chronology in the local todo. No PR shipped because no initiating mechanism was proven. If someone has a diagnostic that can see the guest's exit decision before teardown, that seems to be the missing piece.

**@⁠TheRifai** on GitHub · 2026-12-01 09:04 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7306171109) Adding findings from a local investigation on the reference machine (GE-Proton11-15, build with an 8 MiB title-main stack floor), in case they save someone time: - **One confirmed overflow:** an idle run ended with `0100:err:virtual:virtual_setup_exception stack overflow 2048 bytes addr 0x7f364ff79099 stack 0xd20800 (0xd20000-0xd21000-0xe20000)` — thread `0100` is the Rust `title-main` thread created by `spawn_main` with the image's 1 MiB reserve. Its last calls were a burst of env reads then four `SetThreadIdealProcessorEx`. - **Bigger stack is not a demonstrated fix:** raising only `title-main` to 8 MiB removed that ERR line, but 2 of 3 runs still exited 1 about 40-45 s after world entry; a fourth survived 150 s. Two later 180 s filtered runs also survived. So the reserve masks one instance at most; the intermittent exit has another cause. - **No title exit call:** with `WINEDEBUG=+process`, the parent Proton `start.exe` logs `NtTerminateProcess handle (nil), exit_code 1` *after* the `victory.exe` child disappears; the child logs no `NtTerminateProcess`, and there is no `title exits` / `title calls ExitProcess` / `title terminates` line. The guest process ends on the Unix side, silently. Its native process exited with status 0 in the LD_PRELOAD trace, so that trace did not identify a Windows exit code. - **Secondary panic:** one native exit trace ended in `abort` from `panic_cannot_unwind <- vkback_unix::live_done` while Wine was forcibly unwinding a thread — this is the Unix-call teardown panic already described in `crates/victory-gpu/src/unixgate.rs`, not the initiating event. - **Sampler artifact:** `VICTORY_STACKS` suspends threads; a filtered run with it produced a nested exception on a signal stack whose PC mapped into Wine's `usr1_handler` (SIGUSR1, used by `SuspendThread`). Without `VICTORY_STACKS` that exception does not appear — don't chase it as the cause. - `dmesg` showed no amdgpu ring timeout around the exits. Evidence is in `/tmp/opencode/capture/` (`native-exittrace-*`, `seh-filter-*`, `stackfix-*`) and the detailed chronology in the local todo. No PR shipped because no initiating mechanism was proven. If someone has a diagnostic that can see the guest's exit decision before teardown, that seems to be the missing piece.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 09:08 UTC · original

Thanks, this narrows it down a lot, especially that the child process ends without any of our exit lines while the parent reports 1, and that the bigger stack isn't the fix. I added your findings to the task "The title exits with code 1 seconds after reaching the world" in github.com/vktory6/VKtory@a2d52e2.

**@⁠vktory6** on GitHub · 2026-12-01 09:08 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7306267798) Thanks, this narrows it down a lot, especially that the child process ends without any of our exit lines while the parent reports 1, and that the bigger stack isn't the fix. I added your findings to the task "The title exits with code 1 seconds after reaching the world" in https://github.com/vktory6/VKtory/commit/a2d52e2.
Author
Owner

@⁠TheRifai on GitHub · 2026-12-01 09:56 UTC · original

Another repro on current main (b53e3b5), with validation, BCPack tables, VKB_LAT and a scripted camera walk from the house save (world at 09:51:49 UTC):

  • Keys: W 6, I 3, K 3, J 2, L 2 (pressed at 09:51:49.9, :56.0, :59.3, 09:52:02.5 and :04.7 respectively).
  • The run ended with EXIT 1 at 09:52:05.46 — about 0.75 s after the L press, ~16 s after world entry.
  • The last log lines are a burst of first-bind pipelines and shader translations at frame 844 (mesh + pixel, several new hashes). The last completed present in the latency trace is frame 843, with work still flowing right up to the end.
  • Validation log has only the four known VUIDs (three descriptor limits and 06409); loud summary has only the two known rule-32 kinds. No title exited, no exit/abort log, no device-lost line, no amdgpu fault.

This matches the earlier note that the bathroom-transition exit happens while binding a new mesh pipeline: camera movement brings new geometry into view, a batch of pipelines is made, and the title stops shortly after. It is not tied to one key in particular — each new direction produces its own bind burst. Evidence in /tmp/opencode/capture/explore-main/ (validation log, lat.txt, per-second stats).

**@⁠TheRifai** on GitHub · 2026-12-01 09:56 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7307420633) Another repro on current main (`b53e3b5`), with validation, BCPack tables, `VKB_LAT` and a scripted camera walk from the house save (world at 09:51:49 UTC): - Keys: `W 6`, `I 3`, `K 3`, `J 2`, `L 2` (pressed at 09:51:49.9, :56.0, :59.3, 09:52:02.5 and :04.7 respectively). - The run ended with `EXIT 1` at 09:52:05.46 — about **0.75 s after the `L` press**, ~16 s after world entry. - The last log lines are a burst of **first-bind pipelines and shader translations at frame 844** (mesh + pixel, several new hashes). The last completed present in the latency trace is frame 843, with work still flowing right up to the end. - Validation log has only the four known VUIDs (three descriptor limits and `06409`); loud summary has only the two known rule-32 kinds. No `title exited`, no exit/abort log, no device-lost line, no amdgpu fault. This matches the earlier note that the bathroom-transition exit happens while binding a new mesh pipeline: camera movement brings new geometry into view, a batch of pipelines is made, and the title stops shortly after. It is not tied to one key in particular — each new direction produces its own bind burst. Evidence in `/tmp/opencode/capture/explore-main/` (validation log, `lat.txt`, per-second stats).
Author
Owner

@⁠vktory6 on GitHub · 2026-12-01 10:05 UTC · original

Thanks, a repro on main in ~16 s is very useful, and the timing (a burst of new pipelines and translations right before the end) is the best lead so far. It is in the task as Rechecked on: b53e3b5 (github.com/vktory6/VKtory@dee2dbb).

**@⁠vktory6** on GitHub · 2026-12-01 10:05 UTC · [original](https://github.com/vktory6/VKtory/issues/16#issuecomment-7307655283) Thanks, a repro on main in ~16 s is very useful, and the timing (a burst of new pipelines and translations right before the end) is the best lead so far. It is in the task as `Rechecked on: b53e3b5` (https://github.com/vktory6/VKtory/commit/dee2dbb).
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/vktory6--VKtory#16
No description provided.