d3d12: guest-memory BLAS eviction and unmapped guest-pool instances cause RADV GPUVM faults after #394 #403

Closed
opened 2026-11-28 16:02:07 +00:00 by DrArroway · 6 comments
DrArroway commented 2026-11-28 16:02:07 +00:00 (Migrated from github.com)
Contributor

Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-28T16:02:07Z.


Environment

  • GPU / Driver: AMD Radeon RX 6900 XT (1002:73bf, RADV NAVI21, Mesa 26.3.1, Linux 7.3.6)
  • Runtime: GE-Proton11-14 (vkd3d-proton), 3840x2160
  • Commits tested: e380da1 and 567bd04 (both tested with open PRs #373, #389, #393 applied)

Summary

Once #394 enabled BLAS rehydration in ProjectScarlett (484–489 rehydrated BLASes, 0 skipped, ~256 MiB private storage), RADV hits repeatable GPUVM page faults (GPU reset) shortly after entering the 3D world and logging AS source ... was given new storage after a list recorded it.

We observed two distinct BLAS guest-memory lifetime/fixup causes (plus two related notes below):


1. Raw guest VA leaked into TLAS instance descriptors (PERMISSION_FAULTS: 0x3, RW: 0x0)

On e380da1 (Run 3, 286.6s), right after:

TuxBox d3d12_xs: AS source 0x17459e600 was given new storage after a list recorded it (#1): the list keeps 0xffff8006ae670000, the address now resolves to 0x17459e600

RADV faulted directly on the raw Xbox guest VA:

radv: GPUVM fault detected at address 0x17459e000.
amdgpu: in page starting at address 0x000000017459e000 from client 0x1b (UTCL2)
amdgpu: Faulty UTCL2 client ID: TCP (0x8), PERMISSION_FAULTS: 0x3, RW: 0x0
amdgpu: in page starting at address 0x00000001745a3000 from client 0x1b (UTCL2)

Root cause:

  • In runtime/d3d12/src/device/blas/guest_memory.rs, overwriting an overlapping BLAS range removes overwritten neighbours from mappings.addresses at recording time (before earlier-recorded TLAS lists submit).
  • In runtime/d3d12/src/device/blas/instance_fixup.hlsl (and the upload path in build_raytracing.rs), if a TLAS instance's AccelerationStructure address is not found in relocated, it is left unchanged as the raw Xbox guest VA instead of being zeroed to 0 (inactive DXR instance).
  • Note: arbitrary unregistered addresses cannot be zeroed unconditionally because native AS buffers can live on a separate desktop device (e.g. tools/reference/blas/guest.cpp), so zeroing needs to be restricted to registered guest-pool ranges (minus any registered native Kind::Structure buffers).

2. Replaced / overwritten BLAS private storage dropped while in-flight TLASes still traverse it (PERMISSION_FAULTS: 0x3, RW: 0x0)

On e380da1 (Run 1, 245.6s), right after AS source 0x1799c6100..0x179df5000 was given new storage after a list recorded it (#1..#7), RADV faulted across freed host VAs in the BLAS private-storage range (0x8005ab06e000, 0x8005cd09d000, GPU reset).

Root cause & prototype finding:

  • guest_memory.rs currently drops evicted: Vec<ID3D12Resource> on the CPU immediately when recording a replacing/overlapping build.
  • We tested a local prototype on 567bd04 that:
    1. Defers removal of overwritten BLAS mappings until submission (with rollback on failure),
    2. Zeros unmapped addresses inside guest-pool ranges (excluding native Kind::Structure buffers) to 0 in instance_fixup.hlsl and upload fixup, and
    3. Retires replaced/evicted BLAS ID3D12Resources behind queue_trace pending fences + a 5-second grace period.
  • That prototype eliminated the raw guest VA fault (0x1745...) and survived AS source #1..#8 across multiple 3D frames, but still hit freed BLAS host-VA reads on a second run (0x80078e54a000, 0x8007905eb000, 0x800788431000, 0x8007af05d000 — same 0x8007... range as AS source #1..#5 0xffff8007bbf60000..0xffff8007bc020000, PERMISSION_FAULTS: 0x3, RW: 0x0).
  • Why:
    1. ProjectScarlett 3D frames currently take 16–20s (due to heavy placed texture readback batches), so a short grace period + pending_fences() captured at overwrite time misses command lists still being recorded and later frames still tracing an already-built TLAS.
    2. Instances::prepare overwrites its previous submission's retained snapshot on re-submission, dropping old BLAS references on the CPU while an earlier TLAS build or ray trace using them is still in flight. Keeping each BLAS snapshot bound to the built TLAS until that TLAS is rebuilt and all queues have drained past the rebuild should close this gap.

  1. Separate compute write fault (PERMISSION_FAULTS: 0x4, RW: 0x1): On the longer prototype run (430.5s, game frame 2095, AS source #1..#8 crossed without any 0x3 read fault), RADV hit a write permission fault across 0x8001d0ee3000–0x8001d3ed6000 (Faulty UTCL2 client ID: TCP (0x8), PERMISSION_FAULTS: 0x4, RW: 0x1, ring comp_1.0.1 timeout). A similar 0x4 / RW: 0x1 fault (0x8005cd09d000, ring comp_1.3.0) also appeared alongside the 0x3 read fault in e380da1 Run 1.
  2. TUXBOX_TRACE_GPU_FAULT=1 (0a97a05) on fast aborts: In the traced run, GPU fault trace: marking every draw and dispatch initialized cleanly, but no unfinished command list was printed after VK_ERROR_DEVICE_LOST because the title hit placed texture publication failed: HRESULT(0x80004005) → Breakpad EXCEPTION_BREAKPOINT and exited within ~1s, racing the watcher thread's 1s sleep loop. Triggering gpu_trace::report() synchronously when d3d12_xs observes DXGI_ERROR_DEVICE_REMOVED / queue submission failure would ensure fast aborts still dump the ring.
<!-- greyfinch-sync:brcly/TuxBox:issue:6667858003 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403). Originally posted by [DrArroway](https://github.com/DrArroway) on 2026-11-28T16:02:07Z. --- ### Environment - **GPU / Driver:** AMD Radeon RX 6900 XT (`1002:73bf`, RADV NAVI21, Mesa 26.3.1, Linux 7.3.6) - **Runtime:** GE-Proton11-14 (`vkd3d-proton`), 3840x2160 - **Commits tested:** `e380da1` and `567bd04` (both tested with open PRs `#373`, `#389`, `#393` applied) ### Summary Once `#394` enabled BLAS rehydration in ProjectScarlett (`484`–`489` rehydrated BLASes, `0` skipped, `~256 MiB` private storage), RADV hits repeatable GPUVM page faults (`GPU reset`) shortly after entering the 3D world and logging `AS source ... was given new storage after a list recorded it`. We observed two distinct BLAS guest-memory lifetime/fixup causes (plus two related notes below): --- ### 1. Raw guest VA leaked into TLAS instance descriptors (`PERMISSION_FAULTS: 0x3, RW: 0x0`) On `e380da1` (Run 3, 286.6s), right after: ```text TuxBox d3d12_xs: AS source 0x17459e600 was given new storage after a list recorded it (#1): the list keeps 0xffff8006ae670000, the address now resolves to 0x17459e600 ``` RADV faulted directly on the **raw Xbox guest VA**: ```text radv: GPUVM fault detected at address 0x17459e000. amdgpu: in page starting at address 0x000000017459e000 from client 0x1b (UTCL2) amdgpu: Faulty UTCL2 client ID: TCP (0x8), PERMISSION_FAULTS: 0x3, RW: 0x0 amdgpu: in page starting at address 0x00000001745a3000 from client 0x1b (UTCL2) ``` **Root cause:** - In `runtime/d3d12/src/device/blas/guest_memory.rs`, overwriting an overlapping BLAS range removes overwritten neighbours from `mappings.addresses` at recording time (before earlier-recorded TLAS lists submit). - In `runtime/d3d12/src/device/blas/instance_fixup.hlsl` (and the upload path in `build_raytracing.rs`), if a TLAS instance's `AccelerationStructure` address is not found in `relocated`, it is left unchanged as the raw Xbox guest VA instead of being zeroed to `0` (inactive DXR instance). - Note: arbitrary unregistered addresses cannot be zeroed unconditionally because native AS buffers can live on a separate desktop device (e.g. `tools/reference/blas/guest.cpp`), so zeroing needs to be restricted to registered guest-pool ranges (minus any registered native `Kind::Structure` buffers). --- ### 2. Replaced / overwritten BLAS private storage dropped while in-flight TLASes still traverse it (`PERMISSION_FAULTS: 0x3, RW: 0x0`) On `e380da1` (Run 1, 245.6s), right after `AS source 0x1799c6100..0x179df5000 was given new storage after a list recorded it (#1..#7)`, RADV faulted across freed host VAs in the BLAS private-storage range (`0x8005ab06e000`, `0x8005cd09d000`, `GPU reset`). **Root cause & prototype finding:** - `guest_memory.rs` currently drops `evicted: Vec<ID3D12Resource>` on the CPU immediately when recording a replacing/overlapping build. - We tested a local prototype on `567bd04` that: 1. Defers removal of overwritten BLAS mappings until submission (with rollback on failure), 2. Zeros unmapped addresses inside guest-pool ranges (excluding native `Kind::Structure` buffers) to `0` in `instance_fixup.hlsl` and upload fixup, and 3. Retires replaced/evicted BLAS `ID3D12Resource`s behind `queue_trace` pending fences + a 5-second grace period. - That prototype eliminated the raw guest VA fault (`0x1745...`) and survived `AS source #1..#8` across multiple 3D frames, **but still hit freed BLAS host-VA reads** on a second run (`0x80078e54a000`, `0x8007905eb000`, `0x800788431000`, `0x8007af05d000` — same `0x8007...` range as `AS source #1..#5` `0xffff8007bbf60000..0xffff8007bc020000`, `PERMISSION_FAULTS: 0x3, RW: 0x0`). - **Why:** 1. ProjectScarlett 3D frames currently take **16–20s** (due to heavy `placed texture readback` batches), so a short grace period + `pending_fences()` captured at overwrite time misses command lists still being recorded and later frames still tracing an already-built TLAS. 2. `Instances::prepare` overwrites its previous submission's retained snapshot on re-submission, dropping old BLAS references on the CPU while an earlier TLAS build or ray trace using them is still in flight. Keeping each BLAS snapshot bound to the built TLAS until that TLAS is rebuilt and all queues have drained past the rebuild should close this gap. --- ### Related observations from the same runs 1. **Separate compute write fault (`PERMISSION_FAULTS: 0x4, RW: 0x1`):** On the longer prototype run (430.5s, game frame 2095, `AS source #1..#8` crossed without any `0x3` read fault), RADV hit a write permission fault across `0x8001d0ee3000`–`0x8001d3ed6000` (`Faulty UTCL2 client ID: TCP (0x8)`, `PERMISSION_FAULTS: 0x4`, `RW: 0x1`, `ring comp_1.0.1` timeout). A similar `0x4 / RW: 0x1` fault (`0x8005cd09d000`, `ring comp_1.3.0`) also appeared alongside the `0x3` read fault in `e380da1` Run 1. 2. **`TUXBOX_TRACE_GPU_FAULT=1` (`0a97a05`) on fast aborts:** In the traced run, `GPU fault trace: marking every draw and dispatch` initialized cleanly, but no unfinished command list was printed after `VK_ERROR_DEVICE_LOST` because the title hit `placed texture publication failed: HRESULT(0x80004005)` → Breakpad `EXCEPTION_BREAKPOINT` and exited within ~1s, racing the watcher thread's 1s `sleep` loop. Triggering `gpu_trace::report()` synchronously when `d3d12_xs` observes `DXGI_ERROR_DEVICE_REMOVED` / queue submission failure would ensure fast aborts still dump the ring.
DrArroway commented 2026-11-28 16:49:27 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-28T16:49:27Z.


Follow-up: TLAS-bound BLAS lifetime + exact build_as GPU fault trace

Tested an updated prototype on 567bd04 (+ #373, #389, #393) on RX 6900 XT (RADV NAVI21, Mesa 26.3.1, GE-Proton11-14) with:

  1. Each built TLAS pinning the active private BLAS snapshot (Arc<[ID3D12Resource]>) until that TLAS is rebuilt/cleared/destroyed, retiring superseded snapshots behind queue_trace pending fences + a 30s grace window.
  2. Synchronous gpu_trace flush on UINT64_MAX fence / device-removed queue errors, plus gpu_trace::around markers on all 6 raytracing commands (build_as, rehydrate_as, copy_as, copy_as_deserialize, postbuild_as, instance_fixup, dispatch_rays).

Results across 3 runs

  • Run 1: 540.8s (9m 0s), clean exit (exit code 0), 17 consecutive 3D world frames (11s–22s/frame), past 488+ BLAS rehydrations (0 skipped), 513 MiB private BLAS storage, and AS source #1..#16 — 0 GPUVM faults, 0 GPU resets.
  • Run 2: Faulted at 312.6s on 0x8007bcfff000 (ring:24, TCP, PERMISSION_FAULTS: 0x3, RW: 0x0) with 0 draws/dispatches unfinished and 0 BLAS resources reaped (elapsed < 30s), showing the remaining intermittent fault was inside an unmarked raytracing operation.
  • Run 3 (with raytracing commands marked in TUXBOX_TRACE_GPU_FAULT=1): Crossed 8 consecutive 3D world frames (475+ BLAS rehydrations, 512 MiB private storage, AS source #1..#8), then at 343.2s hit 0x8007c63eb000–0x8007c63fc000 (ring:24, TCP, PERMISSION_FAULTS: 0x3, RW: 0x0). The synchronous trace pinpointed 1 single unfinished command out of 107,772:
TuxBox d3d12_xs: GPU fault trace: fence signaled UINT64_MAX (device lost); 1 commands started and not finished, of 107772 recorded
TuxBox d3d12_xs: GPU fault trace: #98132 list 0x75c9fd80 build_as type=1 count=6 guest_dst=0x17b3d0b00 native_dst=0xffff800788000000 src=0xffff800788000000 scratch=0xffff8001d003b200

Takeaways

  1. Pinning BLAS snapshots to TLAS lifetime eliminated the post-#394 freed-BLAS / raw-guest-VA UAFs (allowing 9-minute fault-free 3D runs).
  2. The remaining intermittent RADV fault is inside an in-place bottom-level BLAS update (build_as type=1 count=6, native_dst == src == 0xffff800788000000), reading unmapped pages 0x8007c63eb000–0x8007c63fc000 (RW: 0x0) — pointing either to one of the 6 geometry inputs (VertexBuffer/IndexBuffer in build_raytracing/guest_addresses.rs reading past its imported buffer span) or a PERFORM_UPDATE mismatch on a relocated/rehydrated BLAS.
  3. Notably, scratch=0xffff8001d003b200 lies in the same 0x8001d0... VA region as the earlier PERMISSION_FAULTS: 0x4, RW: 0x1 compute write fault (0x8001d0ee3000–0x8001d3ed6000).
  4. Synchronous gpu_trace flushing on UINT64_MAX / removed-device errors + marking raytracing commands made TUXBOX_TRACE_GPU_FAULT=1 capture fast Breakpad aborts cleanly.
<!-- greyfinch-sync:brcly/TuxBox:comment:7242540238 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7242540238). Originally posted by [DrArroway](https://github.com/DrArroway) on 2026-11-28T16:49:27Z. --- ### Follow-up: TLAS-bound BLAS lifetime + exact `build_as` GPU fault trace Tested an updated prototype on `567bd04` (+ `#373`, `#389`, `#393`) on RX 6900 XT (RADV NAVI21, Mesa 26.3.1, GE-Proton11-14) with: 1. Each built TLAS pinning the active private BLAS snapshot (`Arc<[ID3D12Resource]>`) until that TLAS is rebuilt/cleared/destroyed, retiring superseded snapshots behind `queue_trace` pending fences + a 30s grace window. 2. Synchronous `gpu_trace` flush on `UINT64_MAX` fence / device-removed queue errors, plus `gpu_trace::around` markers on all 6 raytracing commands (`build_as`, `rehydrate_as`, `copy_as`, `copy_as_deserialize`, `postbuild_as`, `instance_fixup`, `dispatch_rays`). #### Results across 3 runs - **Run 1:** **540.8s (9m 0s), clean exit (`exit code 0`)**, **17 consecutive 3D world frames** (`11s`–`22s`/frame), past `488+` BLAS rehydrations (`0` skipped), `513 MiB` private BLAS storage, and `AS source #1..#16` — **0 GPUVM faults, 0 GPU resets**. - **Run 2:** Faulted at `312.6s` on `0x8007bcfff000` (`ring:24`, `TCP`, `PERMISSION_FAULTS: 0x3, RW: 0x0`) with 0 draws/dispatches unfinished and 0 BLAS resources reaped (elapsed `< 30s`), showing the remaining intermittent fault was inside an unmarked raytracing operation. - **Run 3 (with raytracing commands marked in `TUXBOX_TRACE_GPU_FAULT=1`):** Crossed **8 consecutive 3D world frames** (`475+` BLAS rehydrations, `512 MiB` private storage, `AS source #1..#8`), then at `343.2s` hit `0x8007c63eb000`–`0x8007c63fc000` (`ring:24`, `TCP`, `PERMISSION_FAULTS: 0x3, RW: 0x0`). The synchronous trace pinpointed **1 single unfinished command out of 107,772**: ```text TuxBox d3d12_xs: GPU fault trace: fence signaled UINT64_MAX (device lost); 1 commands started and not finished, of 107772 recorded TuxBox d3d12_xs: GPU fault trace: #98132 list 0x75c9fd80 build_as type=1 count=6 guest_dst=0x17b3d0b00 native_dst=0xffff800788000000 src=0xffff800788000000 scratch=0xffff8001d003b200 ``` #### Takeaways 1. Pinning BLAS snapshots to TLAS lifetime eliminated the post-`#394` freed-BLAS / raw-guest-VA UAFs (allowing 9-minute fault-free 3D runs). 2. The remaining intermittent RADV fault is inside an **in-place bottom-level BLAS update (`build_as type=1 count=6`, `native_dst == src == 0xffff800788000000`)**, reading unmapped pages `0x8007c63eb000`–`0x8007c63fc000` (`RW: 0x0`) — pointing either to one of the 6 geometry inputs (`VertexBuffer`/`IndexBuffer` in `build_raytracing/guest_addresses.rs` reading past its imported buffer span) or a `PERFORM_UPDATE` mismatch on a relocated/rehydrated BLAS. 3. Notably, `scratch=0xffff8001d003b200` lies in the same `0x8001d0...` VA region as the earlier `PERMISSION_FAULTS: 0x4, RW: 0x1` compute write fault (`0x8001d0ee3000`–`0x8001d3ed6000`). 4. Synchronous `gpu_trace` flushing on `UINT64_MAX` / removed-device errors + marking raytracing commands made `TUXBOX_TRACE_GPU_FAULT=1` capture fast Breakpad aborts cleanly.
1093i3511 commented 2026-11-28 18:32:19 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-28T18:32:19Z.


The same faults happen on RDNA2 with a smaller card, on current main without extra PRs. Details are on #232 and #292.

Setup: RX 6600 (1002:73ff, NAVI23, 8 GB), Mesa RADV 26.3.1, Linux 7.3.6, GE-Proton11-14. main 2af42c9 with no open PRs applied, TUXBOX_TRACE_GPU_FAULT=1.

Two runs, 35 and 7.4 min long. Both went the same way: 476 and 487 BLASes rehydrated, 0 skipped, then 7 and 8 AS source … was given new storage after a list recorded it, then a fault 10–20 s later. Each run also logged one Attempted to place TLAS on VA … previously used by non-TLAS, marking mutated.

The faulting pages are raw guest addresses, like your first cause:

run 1: in page starting at address 0x000000017561f000 ... TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0
       in page starting at address 0x0000000000000000 ... (same status)
run 2: in page starting at address 0x0000000177fdf000 ... TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0

Run 1's AS source lines included 0x179dac100 … the address now resolves to 0x179dac100, an address that resolves to itself. That fits a guest address left unresolved in an instance.

Two things that differ from your 6900 XT:

  • Here the compute ring reset fails (Ring comp_1.1.1 reset failed, then comp_1.3.0 in run 2). Then the kernel does a MODE1 reset (VRAM is lost due to GPU reset!), which also takes down the Wayland compositor. If your resets recovered on their own, an 8 GB card makes this worse.
  • The trace race shows up even when the title has no abort of its own. The game process ended 0.38 s after the first VK_ERROR_DEVICE_LOST, because the compositor and Xwayland went away. So a report flushed when the device is lost, as in your follow-up, would help here too.

I didn't see a PERMISSION_FAULTS: 0x4, RW: 0x1 write fault in either run.

If you push the prototype from your follow-up (TLAS-pinned BLAS snapshots, the synchronous trace flush, marked raytracing commands), I can run it on this card. A branch on top of main would be easiest.

<!-- greyfinch-sync:brcly/TuxBox:comment:7243865835 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7243865835). Originally posted by [1093i3511](https://github.com/1093i3511) on 2026-11-28T18:32:19Z. --- The same faults happen on RDNA2 with a smaller card, on current `main` without extra PRs. Details are on #232 and #292. **Setup:** RX 6600 (`1002:73ff`, NAVI23, 8 GB), Mesa RADV 26.3.1, Linux 7.3.6, GE-Proton11-14. `main` 2af42c9 with no open PRs applied, `TUXBOX_TRACE_GPU_FAULT=1`. Two runs, 35 and 7.4 min long. Both went the same way: 476 and 487 BLASes rehydrated, 0 skipped, then 7 and 8 `AS source … was given new storage after a list recorded it`, then a fault 10–20 s later. Each run also logged one `Attempted to place TLAS on VA … previously used by non-TLAS, marking mutated`. The faulting pages are raw guest addresses, like your first cause: ```text run 1: in page starting at address 0x000000017561f000 ... TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0 in page starting at address 0x0000000000000000 ... (same status) run 2: in page starting at address 0x0000000177fdf000 ... TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0 ``` Run 1's `AS source` lines included `0x179dac100 … the address now resolves to 0x179dac100`, an address that resolves to itself. That fits a guest address left unresolved in an instance. Two things that differ from your 6900 XT: - **Here the compute ring reset fails** (`Ring comp_1.1.1 reset failed`, then `comp_1.3.0` in run 2). Then the kernel does a MODE1 reset (`VRAM is lost due to GPU reset!`), which also takes down the Wayland compositor. If your resets recovered on their own, an 8 GB card makes this worse. - **The trace race shows up even when the title has no abort of its own.** The game process ended 0.38 s after the first `VK_ERROR_DEVICE_LOST`, because the compositor and Xwayland went away. So a report flushed when the device is lost, as in your follow-up, would help here too. I didn't see a `PERMISSION_FAULTS: 0x4, RW: 0x1` write fault in either run. If you push the prototype from your follow-up (TLAS-pinned BLAS snapshots, the synchronous trace flush, marked raytracing commands), I can run it on this card. A branch on top of `main` would be easiest.
1093i3511 commented 2026-11-28 19:20:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-28T19:20:58Z.


A third run on the RX 6600, same build (main 2af42c9, no extra PRs, TUXBOX_TRACE_GPU_FAULT=1), after an update to linux-firmware-amdgpu 20261124 and a reboot (MEC firmware 0x86, PFP 0x6d, ME 0x40). This time the fault was on your second cause, and the title rendered the opening world scene first.

Two world frames

The world was on screen twice before the fault, at 20:04:06 and 20:04:29; I took a screenshot of each. The fault came at 20:04:34. Frames took 26–31 s (presented 1 frames in 28s, 6,152 frames in total), and the run lasted 422 s.

Both frames show the night skyline past a fence and an overhang that PROJECTSCARLETT.md describes. They are very dark and blocky. The first has only edge outlines on most geometry. I haven't checked how much of this comes from missing shaders or stand-ins.

The fault: host addresses this time, not raw guest VAs

amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:5 pasid:38)  x10
        GCVM_L2_PROTECTION_FAULT_STATUS:0x00501031  TCP (0x8)  PERMISSION_FAULTS: 0x3  RW: 0x0  MORE_FAULTS: 0x1
        pages 0x80084d4bc000, 0x8008583c3000, 0x8008583cc000, 0x80085f684000, 0x80085f686000,
              0x80087c8b6000, 0x80087efa7000, 0x8008800df000 (2x), 0x8008840a0000
amdgpu: ring comp_1.1.1 timeout, signaled seq=80, emitted seq=81
amdgpu: Ring comp_1.1.1 reset failed
amdgpu: MODE1 reset
amdgpu: VRAM is lost due to GPU reset!

The amdgpu devcoredump for the ring timeout gives the first faulting page as 0x00008007a07e0000 (status 0x501030, ring comp_1.1.1). RADV logged the same address (GPUVM fault detected at address 0x8007a07e0000).

My first two runs faulted on raw guest addresses (0x17561f000, 0x177fdf000), like your cause 1. This run faulted on host addresses that are spread out, all reads (RW: 0x0). That looks like your cause 2 (freed BLAS private storage) and your second prototype run (0x8007…, freed BLAS host VAs).

The AS source lines before it, 8 in total. Four of them resolve to the guest address itself:

AS source 0x179dd0400 ... (#1): the list keeps 0xffff800747ca0000, the address now resolves to 0xffff800769030000
AS source 0x179e04f00 ... (#2): the list keeps 0xffff800747cf0000, the address now resolves to 0xffff800769080000
AS source 0x17a0bbf00 ... (#3): the list keeps 0xffff800747d50000, the address now resolves to 0xffff8007693e0000
AS source 0x179e04f00 ... (#4): the list keeps 0xffff800747cf0000, the address now resolves to 0x179e04f00
AS source 0x179db6000 ... (#5): the list keeps 0xffff80074fe10000, the address now resolves to 0x179db6000
AS source 0x179dd0400 ... (#6): the list keeps 0xffff800760540000, the address now resolves to 0xffff8007840e0000
AS source 0x179e04f00 ... (#7): the list keeps 0xffff800768e70000, the address now resolves to 0x179e04f00
AS source 0x179db6000 ... (#8): the list keeps 0xffff800768e90000, the address now resolves to 0x179db6000

There were 494 rehydrated structures (0 skipped). Unlike runs 1 and 2, there was no place TLAS on VA … previously used by non-TLAS this time.

Across the three runs

run length fault pages kind
1 35 min 0x17561f000, 0x0 raw guest VA (cause 1)
2 7.4 min 0x177fdf000 raw guest VA (cause 1)
3 (new firmware) 7.0 min 0x8007a07e0000, 0x80084d4bc000–0x8008840a0000 host VAs (cause 2)

All three runs ended in a failed compute ring reset and a MODE1 reset. The new firmware doesn't change that.

Trace and dump

GPU fault trace: marking every draw and dispatch appeared again, with no report after it: the game was gone about 0.4 s after the device loss. Your synchronous flush would be needed here too.

I have the full devcoredump (about 5.6 MB, with register state and the comp_1.1.1 ring contents). I can share it privately if someone wants to decode the ring.

Your prototype, as a branch on main, is the next thing I'd run on this card.

<!-- greyfinch-sync:brcly/TuxBox:comment:7244477384 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7244477384). Originally posted by [1093i3511](https://github.com/1093i3511) on 2026-11-28T19:20:58Z. --- A third run on the RX 6600, same build (`main` 2af42c9, no extra PRs, `TUXBOX_TRACE_GPU_FAULT=1`), after an update to `linux-firmware-amdgpu` 20261124 and a reboot (MEC firmware `0x86`, PFP `0x6d`, ME `0x40`). This time the fault was on your **second** cause, and the title rendered the opening world scene first. ## Two world frames The world was on screen twice before the fault, at 20:04:06 and 20:04:29; I took a screenshot of each. The fault came at 20:04:34. Frames took 26–31 s (`presented 1 frames in 28s`, 6,152 frames in total), and the run lasted 422 s. Both frames show the night skyline past a fence and an overhang that PROJECTSCARLETT.md describes. They are very dark and blocky. The first has only edge outlines on most geometry. I haven't checked how much of this comes from missing shaders or stand-ins. ## The fault: host addresses this time, not raw guest VAs ```text amdgpu: [gfxhub] page fault (src_id:0 ring:24 vmid:5 pasid:38) x10 GCVM_L2_PROTECTION_FAULT_STATUS:0x00501031 TCP (0x8) PERMISSION_FAULTS: 0x3 RW: 0x0 MORE_FAULTS: 0x1 pages 0x80084d4bc000, 0x8008583c3000, 0x8008583cc000, 0x80085f684000, 0x80085f686000, 0x80087c8b6000, 0x80087efa7000, 0x8008800df000 (2x), 0x8008840a0000 amdgpu: ring comp_1.1.1 timeout, signaled seq=80, emitted seq=81 amdgpu: Ring comp_1.1.1 reset failed amdgpu: MODE1 reset amdgpu: VRAM is lost due to GPU reset! ``` The amdgpu devcoredump for the ring timeout gives the first faulting page as `0x00008007a07e0000` (status `0x501030`, ring `comp_1.1.1`). RADV logged the same address (`GPUVM fault detected at address 0x8007a07e0000`). My first two runs faulted on raw guest addresses (`0x17561f000`, `0x177fdf000`), like your cause 1. This run faulted on host addresses that are spread out, all reads (`RW: 0x0`). That looks like your cause 2 (freed BLAS private storage) and your second prototype run (`0x8007…`, freed BLAS host VAs). The `AS source` lines before it, 8 in total. Four of them resolve to the guest address itself: ```text AS source 0x179dd0400 ... (#1): the list keeps 0xffff800747ca0000, the address now resolves to 0xffff800769030000 AS source 0x179e04f00 ... (#2): the list keeps 0xffff800747cf0000, the address now resolves to 0xffff800769080000 AS source 0x17a0bbf00 ... (#3): the list keeps 0xffff800747d50000, the address now resolves to 0xffff8007693e0000 AS source 0x179e04f00 ... (#4): the list keeps 0xffff800747cf0000, the address now resolves to 0x179e04f00 AS source 0x179db6000 ... (#5): the list keeps 0xffff80074fe10000, the address now resolves to 0x179db6000 AS source 0x179dd0400 ... (#6): the list keeps 0xffff800760540000, the address now resolves to 0xffff8007840e0000 AS source 0x179e04f00 ... (#7): the list keeps 0xffff800768e70000, the address now resolves to 0x179e04f00 AS source 0x179db6000 ... (#8): the list keeps 0xffff800768e90000, the address now resolves to 0x179db6000 ``` There were 494 rehydrated structures (0 skipped). Unlike runs 1 and 2, there was no `place TLAS on VA … previously used by non-TLAS` this time. ## Across the three runs | run | length | fault pages | kind | | --- | ---: | --- | --- | | 1 | 35 min | `0x17561f000`, `0x0` | raw guest VA (cause 1) | | 2 | 7.4 min | `0x177fdf000` | raw guest VA (cause 1) | | 3 (new firmware) | 7.0 min | `0x8007a07e0000`, `0x80084d4bc000`–`0x8008840a0000` | host VAs (cause 2) | All three runs ended in a failed compute ring reset and a MODE1 reset. The new firmware doesn't change that. ## Trace and dump `GPU fault trace: marking every draw and dispatch` appeared again, with no report after it: the game was gone about 0.4 s after the device loss. Your synchronous flush would be needed here too. I have the full devcoredump (about 5.6 MB, with register state and the `comp_1.1.1` ring contents). I can share it privately if someone wants to decode the ring. Your prototype, as a branch on `main`, is the next thing I'd run on this card.
gtb-sbe commented 2026-11-28 23:20:12 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-28T23:20:12Z.


On the geometry-range candidate from your follow-up: I opened #428 for it. Indices past VertexCount make a title-memory build read past its vertex import, and a Lanes case reproduces it on main as a TCP read fault (MAPPING_ERROR 0x1).

In my game runs on an RX 9060 XT it didn't come up, though. With a counter on top of #409 and #424, none of the 256+ 16-bit indexed geometries had an index past VertexCount. So your build_as type=1 count=6 fault is more likely the never-built update source that ce620c7 handles. I'm leaving the lifetime and prebuild work to you and #409.

<!-- greyfinch-sync:brcly/TuxBox:comment:7247361665 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7247361665). Originally posted by [gtb-sbe](https://github.com/gtb-sbe) on 2026-11-28T23:20:12Z. --- On the geometry-range candidate from your follow-up: I opened #428 for it. Indices past `VertexCount` make a title-memory build read past its vertex import, and a Lanes case reproduces it on `main` as a `TCP` read fault (`MAPPING_ERROR 0x1`). In my game runs on an RX 9060 XT it didn't come up, though. With a counter on top of #409 and #424, none of the 256+ 16-bit indexed geometries had an index past `VertexCount`. So your `build_as type=1 count=6` fault is more likely the never-built update source that `ce620c7` handles. I'm leaving the lifetime and prebuild work to you and #409.
DrArroway commented 2026-11-29 07:52:21 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T07:52:21Z.


Updated the remaining non-overlapping work onto current main (2871726) in #455:

  • #409, #424, and #428 are merged on main, and #436 / #442 / #443 / #445 cover unbuilt AS copy/query, refused builds, private scratch, and in-place update extent booking.
  • #455 adds the remaining pieces: TLAS-pinned BLAS storage snapshots (tlas_deps + fence-backed retirement) and prebuild-after-translation + Xbox format normalization (53 / R32G32_FLOAT / vertex_bytes), verified on both AMD 1002:73bf and 1002:164e plus ProjectScarlett (545.6s, 24+ 3D frames, 0 GPUVM faults alongside #441).
<!-- greyfinch-sync:brcly/TuxBox:comment:7252743128 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7252743128). Originally posted by [DrArroway](https://github.com/DrArroway) on 2026-11-29T07:52:21Z. --- Updated the remaining non-overlapping work onto current `main` (`2871726`) in #455: - `#409`, `#424`, and `#428` are merged on `main`, and `#436` / `#442` / `#443` / `#445` cover unbuilt AS copy/query, refused builds, private scratch, and in-place update extent booking. - `#455` adds the remaining pieces: TLAS-pinned BLAS storage snapshots (`tlas_deps` + fence-backed retirement) and prebuild-after-translation + Xbox format normalization (`53` / `R32G32_FLOAT` / `vertex_bytes`), verified on both AMD `1002:73bf` and `1002:164e` plus ProjectScarlett (`545.6s`, 24+ 3D frames, 0 GPUVM faults alongside `#441`).
brcly commented 2026-11-29 21:58:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T21:58:11Z.


Closing as fixed: the pieces are all on main now (#409, #424, #428, #436, #442, #443, #445, and #455 for the TLAS-pinned BLAS storage and prebuild normalisation). The RX 6600 and RX 6900 XT runs on those builds reached the world without this fault. Thanks for seeing it through. Please reopen if a GPUVM fault on guest-memory BLAS or unmapped instances shows up again on current main.

<!-- greyfinch-sync:brcly/TuxBox:comment:7263298258 --> Imported from [brcly/TuxBox](https://github.com/brcly/TuxBox/issues/403#issuecomment-7263298258). Originally posted by [brcly](https://github.com/brcly) on 2026-11-29T21:58:11Z. --- Closing as fixed: the pieces are all on `main` now (#409, #424, #428, #436, #442, #443, #445, and #455 for the TLAS-pinned BLAS storage and prebuild normalisation). The RX 6600 and RX 6900 XT runs on those builds reached the world without this fault. Thanks for seeing it through. Please reopen if a GPUVM fault on guest-memory BLAS or unmapped instances shows up again on current `main`.
Sign in to join this conversation.
No labels
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.

Reference
brcly/TuxBox#403
No description provided.