nvidia-dev: XCL_DRED=1 gives no page fault or breadcrumbs since the launch preparation (its runner device is the one the title gets) #2920

Open
opened 2026-11-27 01:16:01 +00:00 by github-bot · 6 comments
Owner

@⁠joeypercia on GitHub · 2026-11-26 23:25 UTC · original

On nvidia-dev since the launch preparation landed, XCL_DRED=1 no longer reaches the title's device: on a device removal the page-fault output and the breadcrumbs both answer 0x887a0004 (DXGI_ERROR_UNSUPPORTED, "DRED was not enabled"), so a removal is logged with its device state only and no faulting address. On main (no launch preparation) DRED still works.

Measured (RTX 4070 Ti, driver 621.40, release, the newer retail title):

  • My runs with XCL_DRED=1 on nvidia-dev c044dc6d (25 Nov., before the launch preparation): 5 of 5 removals logged DRED page fault at GPU VA ….
  • On af2cecc4 and every later tree (to eae01502): 20 of 20 removals logged DRED: no breadcrumbs (0x887a0004) and no page fault line (the page-fault call failed with the same code; the current code drops that error silently).
  • A local check right after the device is made in real.rs (GetAutoBreadcrumbsOutput on the healthy device), two 60 s launches of the same build:
    • default (launch preparation runs): 0x887a0004 – DRED is not on for this device;
    • XCL_PREPARE=0: 0x887a0022 (DXGI_ERROR_NOT_CURRENTLY_AVAILABLE) – DRED is on, there is just nothing to report yet.

Why (read in the code, eae01502):

  1. The launch preparation calls precompile(..., pipelines: false, startup: Some(..)) in the title's process (shaders.rs, prepare_for_launch, the pack-with-workers branch).
  2. Without a pipeline device, precompile decides the split forms with recomp::runner::graphics_wave32() and recomp::runner::wave64_supported().
  3. Those go through runner::init, which creates a device through the Agility factory and keeps it for the life of the process (the runner's GPU static).
  4. real.rs turns DRED on (SetAutoBreadcrumbsEnablement / SetPageFaultEnablement on the factory's configuration interface) only after that, then calls create_device on the same adapter, and the factory has D3D12_DEVICE_FACTORY_FLAG_ALLOW_RETURNING_EXISTING_DEVICE: it hands back the runner's device, made before DRED was set.

Possible fixes, either one:

  • Turn DRED on before the launch preparation starts (the same settings, once, from the start of present/preparation.rs or from the factory's creation in agility.rs when XCL_DRED is set). Every later device, the runner's included, then has it.
  • Or let the preparation decide the wave forms without the runner, from a device it drops afterwards (as preflight does), so the title gets a new device.

Checked locally (added later): the first fix (DRED's settings once, from a Once, called at the start of present/preparation.rs before the preparation and again where real.rs sets them now) gives 0x887a0022 on the same 60 s launch with the preparation running: DRED is on for the title's device again.

It also matters for the debug layer in the same way if it is turned on after the preparation (not checked). And log_device_removed could log the page-fault call's error, as it does for the breadcrumbs, so the next time this shows.

This is why the GPU page faults (DRED state 7) in #2867's runs on eae01502 came with no address. I can make the first fix as a PR against nvidia-dev if that is wanted.

Not tested: AMD; the inbox (non-Agility) path; the debug layer.

AI use: Claude Code (Claude Opus 5.5) ran the runs on the hardware above, read the code and wrote this.

**@⁠joeypercia** on GitHub · 2026-11-26 23:25 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920) On `nvidia-dev` since the launch preparation landed, `XCL_DRED=1` no longer reaches the title's device: on a device removal the page-fault output and the breadcrumbs both answer `0x887a0004` (`DXGI_ERROR_UNSUPPORTED`, "DRED was not enabled"), so a removal is logged with its device state only and no faulting address. On `main` (no launch preparation) DRED still works. **Measured** (RTX 4070 Ti, driver 621.40, release, the newer retail title): - My runs with `XCL_DRED=1` on `nvidia-dev` `c044dc6d` (25 Nov., before the launch preparation): 5 of 5 removals logged `DRED page fault at GPU VA …`. - On `af2cecc4` and every later tree (to `eae01502`): 20 of 20 removals logged `DRED: no breadcrumbs (0x887a0004)` and no page fault line (the page-fault call failed with the same code; the current code drops that error silently). - A local check right after the device is made in `real.rs` (`GetAutoBreadcrumbsOutput` on the healthy device), two 60 s launches of the same build: - default (launch preparation runs): `0x887a0004` – DRED is not on for this device; - `XCL_PREPARE=0`: `0x887a0022` (`DXGI_ERROR_NOT_CURRENTLY_AVAILABLE`) – DRED is on, there is just nothing to report yet. **Why** (read in the code, `eae01502`): 1. The launch preparation calls `precompile(..., pipelines: false, startup: Some(..))` in the title's process (`shaders.rs`, `prepare_for_launch`, the pack-with-workers branch). 2. Without a pipeline device, `precompile` decides the split forms with `recomp::runner::graphics_wave32()` and `recomp::runner::wave64_supported()`. 3. Those go through `runner::init`, which creates a device through the Agility factory and keeps it for the life of the process (the runner's `GPU` static). 4. `real.rs` turns DRED on (`SetAutoBreadcrumbsEnablement` / `SetPageFaultEnablement` on the factory's configuration interface) only after that, then calls `create_device` on the same adapter, and the factory has `D3D12_DEVICE_FACTORY_FLAG_ALLOW_RETURNING_EXISTING_DEVICE`: it hands back the runner's device, made before DRED was set. **Possible fixes**, either one: - Turn DRED on before the launch preparation starts (the same settings, once, from the start of `present/preparation.rs` or from the factory's creation in `agility.rs` when `XCL_DRED` is set). Every later device, the runner's included, then has it. - Or let the preparation decide the wave forms without the runner, from a device it drops afterwards (as `preflight` does), so the title gets a new device. **Checked locally (added later):** the first fix (DRED's settings once, from a `Once`, called at the start of `present/preparation.rs` before the preparation and again where `real.rs` sets them now) gives `0x887a0022` on the same 60 s launch with the preparation running: DRED is on for the title's device again. It also matters for the debug layer in the same way if it is turned on after the preparation (not checked). And `log_device_removed` could log the page-fault call's error, as it does for the breadcrumbs, so the next time this shows. This is why the GPU page faults (DRED state 7) in #2867's runs on `eae01502` came with no address. I can make the first fix as a PR against `nvidia-dev` if that is wanted. **Not tested:** AMD; the inbox (non-Agility) path; the debug layer. AI use: Claude Code (Claude Opus 5.5) ran the runs on the hardware above, read the code and wrote this.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 01:16:01 +00:00
Author
Owner

@⁠joeypercia on GitHub · 2026-11-27 00:02 UTC · original · edited 2026-11-27 00:08 UTC

What DRED shows once it is on again (the local fix from the description), for the GPU removals in #2867's runs: 3 long runs of eae01502 + #2794 + grahamster2's three 3292b096 follow-ups (#2867), Series S profile, XCL_COHERENT_HEAPS=sparse:1024, RTX 4070 Ti 12 GB. Of 4 runs one reached the 900 s cap; three were removed:

run removal DRED page fault operation in flight
b 0x887a0006 at 258.2 s, state 7 GPU VA 0x0, no allocations there or recently freed DispatchMesh (op 42), 799 of 1,373 done, pipeline as/ms 82d3b25b3d0da3d8 ps dc7b63177a68229b, in a list of two-pass mesh draws (Dispatch, DispatchMesh pairs)
c 0x887a0006 at 234.9 s, state 7 GPU VA 0x0, none Dispatch (op 6), 340 of 777 done, cs d73cd18c6b8a6fa9
d (added later, the loop's rerun of the same build) 0x887a0006 at 220.6 s, state 7 GPU VA 0x0, none ExecuteIndirect (op 5), 1,264 of 1,855 done, ms 5c54c71006712170 ps 71f1700dc0df6e6a (two-pass mesh)
  • All three are accesses at address 0, by three unrelated programs, so it looks like a GPU address of 0 reaching a program (a root view or an indirect argument), not one shader's bug. The null views XCL puts in place of destroyed resources' descriptors read as zeros and do not fault, so they are not it.
  • In run b the two-pass buffers were at their 3,072 MiB cap from 197.9 s (XCL_TWO_PASS_MB), with draws skipped there; the faulting DispatchMesh was one that ran.
  • log_device_removed labels VA 0 as window 10 + 0x0: uma_window_vas() has 0 for windows that have no buffer, and the label matches it. Harmless, but it reads as if the address were in a window.

I have not traced where the 0 comes from. Posting here because these addresses were only visible with DRED on, which is this issue.

AI use: Claude Code (Claude Opus 5.5) ran the runs on the hardware above, read the logs and wrote this.

**@⁠joeypercia** on GitHub · 2026-11-27 00:02 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7206119807) · edited 2026-11-27 00:08 UTC What DRED shows once it is on again (the local fix from the description), for the GPU removals in #2867's runs: 3 long runs of `eae01502` + #2794 + grahamster2's three `3292b096` follow-ups (#2867), Series S profile, `XCL_COHERENT_HEAPS=sparse:1024`, RTX 4070 Ti 12 GB. Of 4 runs one reached the 900 s cap; three were removed: | run | removal | DRED page fault | operation in flight | |---|---|---|---| | b | `0x887a0006` at 258.2 s, state 7 | **GPU VA 0x0**, no allocations there or recently freed | `DispatchMesh` (op 42), 799 of 1,373 done, pipeline `as/ms 82d3b25b3d0da3d8` `ps dc7b63177a68229b`, in a list of two-pass mesh draws (`Dispatch`, `DispatchMesh` pairs) | | c | `0x887a0006` at 234.9 s, state 7 | **GPU VA 0x0**, none | `Dispatch` (op 6), 340 of 777 done, `cs d73cd18c6b8a6fa9` | | d (added later, the loop's rerun of the same build) | `0x887a0006` at 220.6 s, state 7 | **GPU VA 0x0**, none | `ExecuteIndirect` (op 5), 1,264 of 1,855 done, `ms 5c54c71006712170` `ps 71f1700dc0df6e6a` (two-pass mesh) | - All three are accesses at address 0, by three unrelated programs, so it looks like a GPU address of 0 reaching a program (a root view or an indirect argument), not one shader's bug. The null views XCL puts in place of destroyed resources' descriptors read as zeros and do not fault, so they are not it. - In run b the two-pass buffers were at their 3,072 MiB cap from 197.9 s (`XCL_TWO_PASS_MB`), with draws skipped there; the faulting `DispatchMesh` was one that ran. - `log_device_removed` labels VA 0 as `window 10 + 0x0`: `uma_window_vas()` has 0 for windows that have no buffer, and the label matches it. Harmless, but it reads as if the address were in a window. I have not traced where the 0 comes from. Posting here because these addresses were only visible with DRED on, which is this issue. AI use: Claude Code (Claude Opus 5.5) ran the runs on the hardware above, read the logs and wrote this.
Author
Owner

@⁠akimfomin on GitHub · 2026-11-27 00:22 UTC · original

I reproduced the healthy-device distinction on the inbox D3D12 path, one of your listed gaps. On RTX 4070 Ti SUPER, both queries return 0x887a0022 when DRED is enabled before creating the idle device and 0x887a0004 when enabled afterward. GetDeviceRemovedReason returned S_OK in both fresh processes. No command queue or device removal was needed. Microsoft documents the pre-creation requirement.

PortBridge Test Lab #103 turns that into a two-process check for an AMD or Intel volunteer and records inbox vs. Agility explicitly. You can give the card to your agent as an acceptance check for early setup. Post just the codes and revision there and we'll link the credited outcome here. AI-assisted independent inbox control.

**@⁠akimfomin** on GitHub · 2026-11-27 00:22 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7206406424) I reproduced the healthy-device distinction on the inbox D3D12 path, one of your listed gaps. On RTX 4070 Ti SUPER, both queries return 0x887a0022 when DRED is enabled before creating the idle device and 0x887a0004 when enabled afterward. GetDeviceRemovedReason returned S_OK in both fresh processes. No command queue or device removal was needed. [Microsoft documents the pre-creation requirement](https://learn.microsoft.com/en-us/windows/win32/direct3d12/use-dred#setting-up-dred-in-code). [PortBridge Test Lab #103](https://github.com/akimfomin/PortBridge/issues/103) turns that into a two-process check for an AMD or Intel volunteer and records inbox vs. Agility explicitly. You can give the card to your agent as an acceptance check for early setup. Post just the codes and revision there and we'll link the credited outcome here. AI-assisted independent inbox control.
Author
Owner

@⁠andrewDoing on GitHub · 2026-11-27 00:40 UTC · original

Debug-layer and DRED behavior on a healthy RTX 5070

With XCL_DRED=1, four fresh processes at nvidia-dev commit eae01502 created the title device through XCL's real backend. Two processes first executed the runner wave-capability queries used by launch preparation. The D3D12 debug layer remained available when requested in both orders; DRED query behavior changed with initialization order. Issue #2920

First device Debug requested Title device exposes ID3D12InfoQueue Both DRED queries
Title No No 0x887a0022
Title Yes Yes 0x887a0022
Runner No No 0x887a0004
Runner Yes Yes 0x887a0004

Both GetAutoBreadcrumbsOutput and GetPageFaultAllocationOutput returned DXGI_ERROR_NOT_CURRENTLY_AVAILABLE with the title device first, and DXGI_ERROR_UNSUPPORTED with the runner first. All four devices remained healthy. The runner explicitly calls the one-time debug layer setup before creating its device when debug is requested. It does not configure DRED there.

A local integration test called the normal XCL entry points and added no production instrumentation. This checks the device initialization sequence in isolation on the Windows RTX 5070. A full launcher session, actual device loss, the inbox D3D12 path, and other vendors remain untested. Title first, debug off · Title first, debug on · Runner first, debug off · Runner first, debug on

AI use: OpenAI Codex wrote the diagnostic test, ran the four processes, checked the environment flags recorded by each process, and wrote this report.

**@⁠andrewDoing** on GitHub · 2026-11-27 00:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7206656661) # Debug-layer and DRED behavior on a healthy RTX 5070 With `XCL_DRED=1`, four fresh processes at nvidia-dev commit `eae01502` created the title device through XCL's real backend. Two processes first executed the runner wave-capability queries used by launch preparation. The D3D12 debug layer remained available when requested in both orders; DRED query behavior changed with initialization order. [Issue #2920](https://git.gtahub.st/github/xcl-dev--xcl/issues/2920) | First device | Debug requested | Title device exposes ID3D12InfoQueue | Both DRED queries | | --- | --- | --- | --- | | Title | No | No | 0x887a0022 | | Title | Yes | Yes | 0x887a0022 | | Runner | No | No | 0x887a0004 | | Runner | Yes | Yes | 0x887a0004 | Both `GetAutoBreadcrumbsOutput` and `GetPageFaultAllocationOutput` returned `DXGI_ERROR_NOT_CURRENTLY_AVAILABLE` with the title device first, and `DXGI_ERROR_UNSUPPORTED` with the runner first. All four devices remained healthy. The runner explicitly calls the one-time debug layer setup before creating its device when debug is requested. It does not configure DRED there. A local integration test called the normal XCL entry points and added no production instrumentation. This checks the device initialization sequence in isolation on the Windows RTX 5070. A full launcher session, actual device loss, the inbox D3D12 path, and other vendors remain untested. [Title first, debug off](xcl-2920-debug-p0-d0.log) · [Title first, debug on](xcl-2920-debug-p0-d1.log) · [Runner first, debug off](xcl-2920-debug-p1-d0.log) · [Runner first, debug on](xcl-2920-debug-p1-d1.log) AI use: OpenAI Codex wrote the diagnostic test, ran the four processes, checked the environment flags recorded by each process, and wrote this report.
Author
Owner

@⁠throny on GitHub · 2026-11-27 04:55 UTC · original

I can take this unless someone already has a fix in progress (say so and I stop): enable the DRED settings (auto-breadcrumbs and page faults) once, before the FIRST D3D12 device the process creates, when XCL_DRED=1 - i.e. in the launch preparation / runner path as well as where the title device is made today - so the device the title gets has them. Plan: one small PR against nvidia-dev, with a test that the settings call happens before the runner's device creation, and a world run on an RTX 4080 where the device is lost within 3-4 minutes in every run right now, so the result is checked on a real removal (page-fault line and breadcrumbs present or not). Starting now. AI use: Claude Code (Claude Fable 5.2).

**@⁠throny** on GitHub · 2026-11-27 04:55 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7210203447) I can take this unless someone already has a fix in progress (say so and I stop): enable the DRED settings (auto-breadcrumbs and page faults) once, before the FIRST D3D12 device the process creates, when `XCL_DRED=1` - i.e. in the launch preparation / runner path as well as where the title device is made today - so the device the title gets has them. Plan: one small PR against `nvidia-dev`, with a test that the settings call happens before the runner's device creation, and a world run on an RTX 4080 where the device is lost within 3-4 minutes in every run right now, so the result is checked on a real removal (page-fault line and breadcrumbs present or not). Starting now. AI use: Claude Code (Claude Fable 5.2).
Author
Owner

@⁠ettehn on GitHub · 2026-11-27 04:56 UTC · original

A lifetime control on Windows 11 build 26200 with the D3D12 factory wrapper from main 8b957bec (after #2555). On inbox WARP, releasing the first DRED-off device before enabling DRED made both queries on the second device return 0x887A0022, matching the early-enable control. Keeping the first device alive reused its COM identity, and both queries stayed at 0x887A0004.

Agility SDK 614 WARP returned a distinct device in both held-device controls. Both queries on the second device returned 0x887A0022 with DRED enabled before its creation, and 0x887A0004 with DRED left off.

Three fresh processes per case, 24 total. GetDeviceRemovedReason stayed S_OK. The two queries were GetAutoBreadcrumbsOutput and GetPageFaultAllocationOutput. This checks idle WARP device lifetime only. The full launcher, physical adapters and actual device loss remain outside this test.

AI use: OpenAI Codex (GPT-6) assisted with the probe, verification and report.

**@⁠ettehn** on GitHub · 2026-11-27 04:56 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7210224479) A lifetime control on Windows 11 build 26200 with the D3D12 factory wrapper from `main` `8b957bec` (after #2555). On inbox WARP, releasing the first DRED-off device before enabling DRED made both queries on the second device return `0x887A0022`, matching the early-enable control. Keeping the first device alive reused its COM identity, and both queries stayed at `0x887A0004`. Agility SDK 614 WARP returned a distinct device in both held-device controls. Both queries on the second device returned `0x887A0022` with DRED enabled before its creation, and `0x887A0004` with DRED left off. Three fresh processes per case, 24 total. `GetDeviceRemovedReason` stayed `S_OK`. The two queries were `GetAutoBreadcrumbsOutput` and `GetPageFaultAllocationOutput`. This checks idle WARP device lifetime only. The full launcher, physical adapters and actual device loss remain outside this test. AI use: OpenAI Codex (GPT-6) assisted with the probe, verification and report.
Author
Owner

@⁠throny on GitHub · 2026-11-27 05:40 UTC · original

Fix is up as a draft: #2967 (the DRED settings are applied at the start of agility::create_device, which every device of a title process goes through, the runner's included).

Checked on a real removal on an RTX 4080 (nvidia-dev a5e2d851 + the change, XCL_DRED=1, removal 145 s after the first frame, 0x887a0005): DRED answers again. What it said for this removal, which may interest the people chasing the NVIDIA world-load loss (#1452, #2403): device state 0, page fault at GPU VA 0 with no allocations there or recently freed, and no breadcrumbs because no list was in flight. So this removal was not a fault in a command list of ours that DRED could see; it fits a removal decided by the driver outside any list (the code-size limit of #2403, or memory) rather than a bad draw or a page fault. One removal only; I will collect more with the fix in the next runs.

AI use: Claude Code (Claude Fable 5.2).

**@⁠throny** on GitHub · 2026-11-27 05:40 UTC · [original](https://github.com/xcl-dev/xcl/issues/2920#issuecomment-7210836821) Fix is up as a draft: #2967 (the DRED settings are applied at the start of `agility::create_device`, which every device of a title process goes through, the runner's included). Checked on a real removal on an RTX 4080 (`nvidia-dev` `a5e2d851` + the change, `XCL_DRED=1`, removal 145 s after the first frame, 0x887a0005): DRED answers again. What it said for this removal, which may interest the people chasing the NVIDIA world-load loss (#1452, #2403): **device state 0, page fault at GPU VA 0 with no allocations there or recently freed, and no breadcrumbs because no list was in flight.** So this removal was not a fault in a command list of ours that DRED could see; it fits a removal decided by the driver outside any list (the code-size limit of #2403, or memory) rather than a bad draw or a page fault. One removal only; I will collect more with the fix in the next runs. AI use: Claude Code (Claude Fable 5.2).
This discussion has been locked. Commenting is limited to contributors.
No description provided.