GPU: NVIDIA's shader compiler overflows the pipeline worker's 2 MB stack and the pipeline is refused as out of memory (fix on a fork) #966

Open
opened 2026-11-24 14:35:45 +00:00 by Peppacodes · 11 comments
Peppacodes commented 2026-11-24 14:35:45 +00:00 (Migrated from github.com)
Contributor

Imported from Marvisak/VIctory. Originally posted by Peppacodes on 2026-11-24T14:35:45Z.


What's wrong

The driver compiles host pipelines on VIctory's pipeline worker threads (victory-pipelines-N, crates/victory-gpu/src/pipeline/make.rs). Those threads use Rust's default 2 MB stack.

On an RTX 5080 (driver 32.0.16.1692), NVIDIA's compiler recursed past that while creating a world compute pipeline:

thread 'victory-pipelines-4' (1400) has overflowed its stack
VIctory: first-chance exception 0xc00000fd at ntdll.dll+0x55b00
  #6  nvgpucomp64.dll+0x63413f
  #7  nvgpucomp64.dll+0x1588d86
  #8  nvgpucomp64.dll+0x254c38b
  #9… nvgpucomp64.dll+0x254c175 / +0x254c362, repeating
WARN victory_gpu::pipeline::host: host pipeline refused error=Not enough memory resources are available to complete this operation. (0x8007000E) shaders=[compute c7d7a6283fad3cd6]

The driver catches the overflow and reports it as E_OUTOFMEMORY. The program's dispatches are then dropped every frame. The E_OUTOFMEMORY refusals after a first-chance exception in nvgpucomp64.dll reported on #233 and #334 may have the same cause on some drivers.

Fix

GPU: pipeline workers get a 64 MB stack for the driver's compiler

A 64 MB stack is reserved address space; only the pages the compiler actually uses are committed.

Result

Same game build and scene on the RTX 5080. The tree is #940's branch plus #587 and #452.

Stack overflow c7d7a6283fad3cd6
2 MB workers (run 20) yes, at frame ~1420 refused, 0x8007000E
64 MB workers (run 21) none host pipeline shaders=[compute c7d7a6283fad3cd6]

Checks

Run on the branch itself (main + this commit), Windows 11, Rust 1.98.1, with the CI's commands:

  • cargo test --workspace --locked --no-fail-fast: 342 passed, 0 failed, 6 ignored. frame::tests::waits_end_on_ticks_and_count_frames failed once in a first run under load and passed three times alone; #689 is about that test.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean.
  • rustfmt --edition 2024 --check on make.rs: no new differences (the file has the same 3 on main).
  • cargo xtask policy: 154 files ok.

Not checked

  • Which program shapes trigger the recursion, and whether other drivers need more than 64 MB.
  • Whether the other std::thread::Builder threads in host.rs ever run the driver's compiler.

No game files used. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:issue:6584214903 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966). Originally posted by [Peppacodes](https://github.com/Peppacodes) on 2026-11-24T14:35:45Z. --- ### What's wrong The driver compiles host pipelines on VIctory's pipeline worker threads (`victory-pipelines-N`, `crates/victory-gpu/src/pipeline/make.rs`). Those threads use Rust's default 2 MB stack. On an RTX 5080 (driver 32.0.16.1692), NVIDIA's compiler recursed past that while creating a world compute pipeline: ``` thread 'victory-pipelines-4' (1400) has overflowed its stack VIctory: first-chance exception 0xc00000fd at ntdll.dll+0x55b00 #6 nvgpucomp64.dll+0x63413f #7 nvgpucomp64.dll+0x1588d86 #8 nvgpucomp64.dll+0x254c38b #9… nvgpucomp64.dll+0x254c175 / +0x254c362, repeating WARN victory_gpu::pipeline::host: host pipeline refused error=Not enough memory resources are available to complete this operation. (0x8007000E) shaders=[compute c7d7a6283fad3cd6] ``` The driver catches the overflow and reports it as `E_OUTOFMEMORY`. The program's dispatches are then dropped every frame. The `E_OUTOFMEMORY` refusals after a first-chance exception in `nvgpucomp64.dll` reported on #233 and #334 may have the same cause on some drivers. ### Fix `GPU: pipeline workers get a 64 MB stack for the driver's compiler` - Branch: https://github.com/Peppacodes/VIctory/tree/fix/pipeline-worker-stack - Compare: [main...Peppacodes:VIctory:fix/pipeline-worker-stack](https://github.com/Marvisak/VIctory/compare/main...Peppacodes:VIctory:fix/pipeline-worker-stack) - Commit: `d09c31b`, on `main` (`ffe310e`). One file, +8 lines: `Builder::stack_size(64 << 20)` on the workers. A 64 MB stack is reserved address space; only the pages the compiler actually uses are committed. ### Result Same game build and scene on the RTX 5080. The tree is #940's branch plus #587 and #452. | | Stack overflow | `c7d7a6283fad3cd6` | |---|---|---| | 2 MB workers (run 20) | yes, at frame ~1420 | refused, `0x8007000E` | | 64 MB workers (run 21) | none | `host pipeline shaders=[compute c7d7a6283fad3cd6]` | ### Checks Run on the branch itself (`main` + this commit), Windows 11, Rust 1.98.1, with the CI's commands: - `cargo test --workspace --locked --no-fail-fast`: 342 passed, 0 failed, 6 ignored. `frame::tests::waits_end_on_ticks_and_count_frames` failed once in a first run under load and passed three times alone; #689 is about that test. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean. - `rustfmt --edition 2024 --check` on `make.rs`: no new differences (the file has the same 3 on `main`). - `cargo xtask policy`: 154 files ok. ### Not checked - Which program shapes trigger the recursion, and whether other drivers need more than 64 MB. - Whether the other `std::thread::Builder` threads in `host.rs` ever run the driver's compiler. No game files used. AI-assisted (Claude Code).
MichaelSmithAI commented 2026-11-24 15:04:16 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by MichaelSmithAI on 2026-11-24T14:55:28Z.


We checked d09c31b on an RTX 4090 with Wine and vkd3d-proton 3.2. A small DXC compute shader went through the normal pipeline queue. On the named worker, the measured stack reservation was 2 MiB with the default builder and 64 MiB with the patch. Both workers created the pipeline successfully.

This confirms the reservation changes on the thread that calls the driver. The same-scene RTX 5080 comparison in your report remains the evidence for admission of the title shader c7d7a6283fad3cd6. Our Wine control used a different shader. For other reports of 0x8007000E, a matching shader hash and a worker-stack diagnostic would help distinguish this case.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7135170266 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7135170266). Originally posted by [MichaelSmithAI](https://github.com/MichaelSmithAI) on 2026-11-24T14:55:28Z. --- We checked d09c31b on an RTX 4090 with Wine and vkd3d-proton 3.2. A small DXC compute shader went through the normal pipeline queue. On the named worker, the measured stack reservation was 2 MiB with the default builder and 64 MiB with the patch. Both workers created the pipeline successfully. This confirms the reservation changes on the thread that calls the driver. The same-scene RTX 5080 comparison in your report remains the evidence for admission of the title shader `c7d7a6283fad3cd6`. Our Wine control used a different shader. For other reports of `0x8007000E`, a matching shader hash and a worker-stack diagnostic would help distinguish this case.
NuraadGit commented 2026-11-24 17:04:26 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by NuraadGit on 2026-11-24T16:27:34Z.


A control for the same program: on an RTX 2080 (Turing, driver 616.56), c7d7a6283fad3cd6 gets its host pipeline in both world runs I checked, with default-size worker stacks. Neither log has a 0x8007000E. The stack: JMAN730's fork + #493 + #189 (d0fd9bf, Wave32) + #206 + #667 + #704 + #878 + #489, loop limit 32.

So the overflow depends on the driver, the architecture or the emitted module (our wave lowering and loop limit differ), not on the title's program alone. That still leaves a larger stack worth having for the drivers that recurse.

AI-assisted (Claude Code). The hardware, title copy and runs are the user's.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7137698492 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7137698492). Originally posted by [NuraadGit](https://github.com/NuraadGit) on 2026-11-24T16:27:34Z. --- A control for the same program: on an RTX 2080 (Turing, driver 616.56), `c7d7a6283fad3cd6` gets its host pipeline in both world runs I checked, with default-size worker stacks. Neither log has a `0x8007000E`. The stack: JMAN730's fork + #493 + #189 (`d0fd9bf`, Wave32) + #206 + #667 + #704 + #878 + #489, loop limit 32. So the overflow depends on the driver, the architecture or the emitted module (our wave lowering and loop limit differ), not on the title's program alone. That still leaves a larger stack worth having for the drivers that recurse. *AI-assisted (Claude Code). The hardware, title copy and runs are the user's.*
465d6a0eac commented 2026-11-24 18:05:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by 465d6a0eac on 2026-11-24T17:49:48Z.


Thank you for this, @Peppacodes! Many pull requests here are still waiting to be merged, so I've ported your fix (d09c31b) to 465d6a0eac/AgentRecompVI, a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/36. You're credited as the author there. This stays the original.

Test results

  • Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): together with the rest of this batch, cargo clippy (both variants) and cargo test --workspace pass (429 passed, 0 failed).
  • On this driver (32.0.16.1088) the world still has 5 compute pipelines refused with 0x8007000E, but they are not stack overflows: each follows a first-chance access violation inside nvgpucomp64.dll (a read at 0x8), so the 64 MB stack doesn't change them here. It's in for the drivers that do recurse.
  • In the world (the first mission's scene), the whole batch took the title from 0.1–0.2 fps (3,300–6,400 ms of GPU time per frame) to 0.8–1.2 fps (190–310 ms). The screen is still black there, and the GPU still hangs after about 3 minutes (one command list over 2 s), so this is not playable yet.
<!-- greyfinch-sync:Marvisak/VIctory:comment:7139764690 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7139764690). Originally posted by [465d6a0eac](https://github.com/465d6a0eac) on 2026-11-24T17:49:48Z. --- Thank you for this, @Peppacodes! Many pull requests here are still waiting to be merged, so I've ported your fix (d09c31b) to [465d6a0eac/AgentRecompVI](https://github.com/465d6a0eac/AgentRecompVI), a VIctory fork where AI agents review and merge each other's work: https://github.com/465d6a0eac/AgentRecompVI/pull/36. You're credited as the author there. This stays the original. **Test results** - Windows 11, NVIDIA GeForce RTX 3070 Ti (driver 32.0.16.1088, 32-lane waves): together with the rest of this batch, `cargo clippy` (both variants) and `cargo test --workspace` pass (429 passed, 0 failed). - On this driver (32.0.16.1088) the world still has 5 compute pipelines refused with 0x8007000E, but they are not stack overflows: each follows a first-chance access violation inside nvgpucomp64.dll (a read at 0x8), so the 64 MB stack doesn't change them here. It's in for the drivers that do recurse. - In the world (the first mission's scene), the whole batch took the title from 0.1–0.2 fps (3,300–6,400 ms of GPU time per frame) to 0.8–1.2 fps (190–310 ms). The screen is still black there, and the GPU still hangs after about 3 minutes (one command list over 2 s), so this is not playable yet.
luisaugustz commented 2026-11-24 19:04:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by luisaugustz on 2026-11-24T18:10:19Z.


AMD data point: the 64 MB worker stack does not prevent the amdxc64.dll compiler crash on RDNA 4

On an RX 9070 XT (Adrenalin 32.0.32029.2010), compiling some CS_RaytracingResolve pipelines crashes inside AMD's compiler on the pipeline workers:

0xc0000005 at amdxc64.dll+0x861b9f (read 0x8)
  #1 amdxc64.dll+0x957eba

With d09c31b (64 MB worker stacks), the same address crashes the same way, in-game and offline (translate --pipelines, one program). It's a null read, not a stack overflow, so this fix doesn't cover it. Details and the affected programs are on #71.

We have kept the larger stack anyway: no regression in several world runs on this card.

AI-assisted (Claude Code): measured on this machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140261138 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7140261138). Originally posted by [luisaugustz](https://github.com/luisaugustz) on 2026-11-24T18:10:19Z. --- **AMD data point: the 64 MB worker stack does not prevent the `amdxc64.dll` compiler crash on RDNA 4** On an RX 9070 XT (Adrenalin 32.0.32029.2010), compiling some `CS_RaytracingResolve` pipelines crashes inside AMD's compiler on the pipeline workers: ``` 0xc0000005 at amdxc64.dll+0x861b9f (read 0x8) #1 amdxc64.dll+0x957eba ``` With `d09c31b` (64 MB worker stacks), the same address crashes the same way, in-game and offline (`translate --pipelines`, one program). It's a null read, not a stack overflow, so this fix doesn't cover it. Details and the affected programs are on #71. We have kept the larger stack anyway: no regression in several world runs on this card. _AI-assisted (Claude Code): measured on this machine._
rouges78 commented 2026-11-24 19:04:14 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by rouges78 on 2026-11-24T18:25:29Z.


I tried to reproduce this without the title on a second NVIDIA card. It did not reproduce, but the measurements may be useful. Synthetic shaders only, no game data.

Host: Windows 11 Pro (build 26300), RTX 4080, NVIDIA driver 621.14 (32.0.16.2114), native.

Method: a small probe creates a compute pipeline on a fresh thread and reads how much of that thread's stack was committed afterwards (the high-water mark, in 4 KiB pages). A second thread samples the caller's RIP and RSP during the call.

  • Same threading as in the report. On 621.14 the compile runs on the thread that calls CreateComputePipelineState, on that thread's own stack: in a 4 s compile, 2,764 of 2,902 samples were inside nvgpucomp64.dll, the thread's CPU time matched the wall time, and RSP never left its stack.
  • No deep recursion from any shape I tried. 48 compute shaders in 19 shapes, from 2.5 KB to 8.0 MB of DXIL, compiling in 4 ms to 193 s: the caller's stack peaked at 40 to 48 KiB every time, whatever the size.
    • Built with DXC 1.8: long dependency chains, sequential and nested ifs and loops, if/else phi chains, early returns, breaks, select chains, a wide loop phi web, a switch dispatch loop, boolean and/or chains.
    • Built with the shader crate's own writer, shapes DXC does not emit: trivial phis, phis of phis, chains of unmerged blocks, loops passing a value through untouched (up to 65,536 of each; dxil.dll accepts the ones I validated).
  • The 73 pipelines that cargo test -p victory-shader creates stay at or below 40 KiB as well.

So on this driver the stack depth does not follow shader size or any of these shapes, which fits the RTX 2080 control above: the overflow needs something specific to the emitted module, or to the driver or architecture (the report is 616.92 on a 5080; I only have 621.14 on a 4080). I can't tell which. Nothing here argues against the 64 MB stack.

What would answer "is 64 MB enough" is the same number on the worker that compiles that shader. The measurement is about 20 lines with no new dependency (below); logged after a pipeline is made, it is also the worker-stack diagnostic asked for above.

Committed-stack high-water mark of the current thread
#[link(name = "kernel32")]
unsafe extern "system" {
    fn GetCurrentThreadStackLimits(lo: *mut usize, hi: *mut usize);
    fn VirtualQuery(at: *const u8, info: *mut Mbi, len: usize) -> usize;
}
/// MEMORY_BASIC_INFORMATION (x64).
#[repr(C)]
#[derive(Default)]
struct Mbi {
    base: usize,
    allocation_base: usize,
    allocation_protect: u32,
    partition: u16,
    region: usize,
    state: u32,
    protect: u32,
    kind: u32,
}
/// Bytes of this thread's stack committed so far. Stack pages are committed
/// on first touch and never given back, so this is the deepest it has been.
fn committed_stack() -> usize {
    let (mut lo, mut hi) = (0usize, 0usize);
    // SAFETY: plain queries on our own stack.
    unsafe {
        GetCurrentThreadStackLimits(&mut lo, &mut hi);
        let mut at = lo;
        while at < hi {
            let mut m = Mbi::default();
            if VirtualQuery(at as *const u8, &mut m, size_of::<Mbi>()) == 0 {
                break;
            }
            // MEM_COMMIT and not PAGE_GUARD: the lowest page in use.
            if m.state == 0x1000 && m.protect & 0x100 == 0 {
                return hi - at;
            }
            at = m.base + m.region;
        }
    }
    0
}

AI-assisted (Claude Code), from runs on my machine.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140625589 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7140625589). Originally posted by [rouges78](https://github.com/rouges78) on 2026-11-24T18:25:29Z. --- I tried to reproduce this without the title on a second NVIDIA card. It did not reproduce, but the measurements may be useful. Synthetic shaders only, no game data. **Host:** Windows 11 Pro (build 26300), RTX 4080, NVIDIA driver 621.14 (32.0.16.2114), native. **Method:** a small probe creates a compute pipeline on a fresh thread and reads how much of that thread's stack was committed afterwards (the high-water mark, in 4 KiB pages). A second thread samples the caller's RIP and RSP during the call. - **Same threading as in the report.** On 621.14 the compile runs on the thread that calls `CreateComputePipelineState`, on that thread's own stack: in a 4 s compile, 2,764 of 2,902 samples were inside `nvgpucomp64.dll`, the thread's CPU time matched the wall time, and RSP never left its stack. - **No deep recursion from any shape I tried.** 48 compute shaders in 19 shapes, from 2.5 KB to 8.0 MB of DXIL, compiling in 4 ms to 193 s: the caller's stack peaked at 40 to 48 KiB every time, whatever the size. - Built with DXC 1.8: long dependency chains, sequential and nested ifs and loops, if/else phi chains, early returns, breaks, select chains, a wide loop phi web, a switch dispatch loop, boolean and/or chains. - Built with the shader crate's own writer, shapes DXC does not emit: trivial phis, phis of phis, chains of unmerged blocks, loops passing a value through untouched (up to 65,536 of each; `dxil.dll` accepts the ones I validated). - The 73 pipelines that `cargo test -p victory-shader` creates stay at or below 40 KiB as well. So on this driver the stack depth does not follow shader size or any of these shapes, which fits the RTX 2080 control above: the overflow needs something specific to the emitted module, or to the driver or architecture (the report is 616.92 on a 5080; I only have 621.14 on a 4080). I can't tell which. Nothing here argues against the 64 MB stack. What would answer "is 64 MB enough" is the same number on the worker that compiles that shader. The measurement is about 20 lines with no new dependency (below); logged after a pipeline is made, it is also the worker-stack diagnostic asked for above. <details><summary>Committed-stack high-water mark of the current thread</summary> ```rust #[link(name = "kernel32")] unsafe extern "system" { fn GetCurrentThreadStackLimits(lo: *mut usize, hi: *mut usize); fn VirtualQuery(at: *const u8, info: *mut Mbi, len: usize) -> usize; } /// MEMORY_BASIC_INFORMATION (x64). #[repr(C)] #[derive(Default)] struct Mbi { base: usize, allocation_base: usize, allocation_protect: u32, partition: u16, region: usize, state: u32, protect: u32, kind: u32, } /// Bytes of this thread's stack committed so far. Stack pages are committed /// on first touch and never given back, so this is the deepest it has been. fn committed_stack() -> usize { let (mut lo, mut hi) = (0usize, 0usize); // SAFETY: plain queries on our own stack. unsafe { GetCurrentThreadStackLimits(&mut lo, &mut hi); let mut at = lo; while at < hi { let mut m = Mbi::default(); if VirtualQuery(at as *const u8, &mut m, size_of::<Mbi>()) == 0 { break; } // MEM_COMMIT and not PAGE_GUARD: the lowest page in use. if m.state == 0x1000 && m.protect & 0x100 == 0 { return hi - at; } at = m.base + m.region; } } 0 } ``` </details> AI-assisted (Claude Code), from runs on my machine.
alessiodeia commented 2026-11-24 21:03:30 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by alessiodeia on 2026-11-24T20:26:28Z.


Another 0x8007000E source on NVIDIA that a bigger stack does not cover: a null read inside the compiler, fixed by a driver update. RTX 2070 SUPER (Turing).

On driver 617.42, every host pipeline refused … (0x8007000E) in my world runs comes right after a caught first-chance exception at the same compiler address:

VIctory: first-chance exception 0xc0000005 at nvgpucomp64.dll+0x315a411 (read 0x8: nothing mapped there)

It is not a stack overflow: there is no has overflowed its stack and no 0xc00000fd. The counts match one to one: 38 exceptions and 38 refusals on one tree, 85 and 85 on a tree that translates more programs. All of them come during the first ~9 minutes of pipeline creation.

After updating to 621.40 (same victory.exe, same tree, two 30-minute runs) there were 0 compiler exceptions and 0 refused pipelines. The tree is main ffe310e + #439 + #979's two commits + #1130 + #1065 + #493 #587 #282 #876 #67 #490 #464 #984 + fix/unaligned-buffer-srv.

So for a 0x8007000E report, check the first-chance line just above the refusal. nvgpucomp64.dll+0x315a411 (read 0x8) on 617.x points to a driver update, and a stack overflow points to this fix. Like @luisaugustz's amdxc64.dll case, this one is a null read rather than stack depth.

One caveat from the same runs on 621.40: one of the two ended at 10 minutes in with DXGI_ERROR_DEVICE_REMOVED (0x887A0005, not _HUNG) and empty DRED breadcrumbs. The other ran the full 30 minutes. I don't have a cause for that one yet.

No game data attached. AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7143551093 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7143551093). Originally posted by [alessiodeia](https://github.com/alessiodeia) on 2026-11-24T20:26:28Z. --- **Another `0x8007000E` source on NVIDIA that a bigger stack does not cover: a null read inside the compiler, fixed by a driver update. RTX 2070 SUPER (Turing).** On driver **617.42**, every `host pipeline refused … (0x8007000E)` in my world runs comes right after a caught first-chance exception at the same compiler address: ``` VIctory: first-chance exception 0xc0000005 at nvgpucomp64.dll+0x315a411 (read 0x8: nothing mapped there) ``` It is not a stack overflow: there is no `has overflowed its stack` and no `0xc00000fd`. The counts match one to one: 38 exceptions and 38 refusals on one tree, 85 and 85 on a tree that translates more programs. All of them come during the first ~9 minutes of pipeline creation. After updating to **621.40** (same `victory.exe`, same tree, two 30-minute runs) there were **0** compiler exceptions and **0** refused pipelines. The tree is `main` `ffe310e` + #439 + #979's two commits + #1130 + #1065 + #493 #587 #282 #876 #67 #490 #464 #984 + `fix/unaligned-buffer-srv`. So for a `0x8007000E` report, check the first-chance line just above the refusal. `nvgpucomp64.dll+0x315a411` (read 0x8) on 617.x points to a driver update, and a stack overflow points to this fix. Like @luisaugustz's `amdxc64.dll` case, this one is a null read rather than stack depth. One caveat from the same runs on 621.40: one of the two ended at 10 minutes in with `DXGI_ERROR_DEVICE_REMOVED` (`0x887A0005`, not `_HUNG`) and empty DRED breadcrumbs. The other ran the full 30 minutes. I don't have a cause for that one yet. No game data attached. AI-assisted (Claude Code).
Marvisak commented 2026-11-25 07:03:29 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T06:57:30Z.


Automated triage for the maintainers.

Confirmed on main. In crates/victory-gpu/src/pipeline/make.rs, queue spawns the victory-pipelines-N workers with std::thread::Builder::new().name(...) and no stack_size, so they get Rust's default 2 MB stack, and the driver's compiler runs on them. The overflow in nvgpucomp64.dll that ends in a refused pipeline (0x8007000E) fits that. Open PR #1129 ("GPU: give pipeline workers room for NVIDIA's shader compiler") carries the same change, so review can continue there. Your branch fix/pipeline-worker-stack can be compared with it.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7155335853 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7155335853). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T06:57:30Z. --- <!-- victory-issue-triage v1 verdict=confirmed seen=2026-11-25T09:38:02Z at=2026-11-25T09:50:38Z --> Automated triage for the maintainers. Confirmed on `main`. In `crates/victory-gpu/src/pipeline/make.rs`, `queue` spawns the `victory-pipelines-N` workers with `std::thread::Builder::new().name(...)` and no `stack_size`, so they get Rust's default 2 MB stack, and the driver's compiler runs on them. The overflow in `nvgpucomp64.dll` that ends in a refused pipeline (`0x8007000E`) fits that. Open PR #1129 ("GPU: give pipeline workers room for NVIDIA's shader compiler") carries the same change, so review can continue there. Your branch `fix/pipeline-worker-stack` can be compared with it. --- _Generated by [Claude Code](https://claude.ai/code)_
StExpeditus commented 2026-11-25 10:07:46 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:37:15Z.


Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, RTX 5060 Ti, driver 621.24, Rust 1.98.1 MSVC), commit d09c31b: cargo test -p victory-gpu --locked --no-fail-fast -> 50 passed, 0 failed, 1 ignored. Synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158576413 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7158576413). Originally posted by [StExpeditus](https://github.com/StExpeditus) on 2026-11-25T09:37:15Z. --- Validated the fork branch on Windows 11 Pro 26200 (Intel Core i5-14600K, RTX 5060 Ti, driver 621.24, Rust 1.98.1 MSVC), commit `d09c31b`: `cargo test -p victory-gpu --locked --no-fail-fast` -> **50 passed, 0 failed, 1 ignored**. Synthetic tests only, no game files.
StExpeditus commented 2026-11-25 10:07:47 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by StExpeditus on 2026-11-25T09:38:02Z.


Addendum: this branch is far behind current main (the victory-gpu delta is 37 files, ~11.2k lines), so the run above is the branch as-is on its old base; it needs a rebase before a clean cherry-pick. The change itself is one file, +8 lines (Builder::stack_size(64 << 20)).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7158594273 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7158594273). Originally posted by [StExpeditus](https://github.com/StExpeditus) on 2026-11-25T09:38:02Z. --- Addendum: this branch is far behind current main (the `victory-gpu` delta is 37 files, ~11.2k lines), so the run above is the branch as-is on its old base; it needs a rebase before a clean cherry-pick. The change itself is one file, +8 lines (`Builder::stack_size(64 << 20)`).
Venom2054 commented 2026-11-26 15:02:32 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by Venom2054 on 2026-11-26T14:38:08Z.


I tested another variable for c7d7a6283fad3cd6 on an RTX 5070 Ti. With the loop limit held at 16,384, I reassembled the emitted DXIL with llvm.loop.unroll.disable on the loop back edge. The instructions and runtime worker-stack settings were the same. Windows SDK validation passed. All four output words matched an independent CPU sum in eight GPU readbacks (0 to 4,097 input elements). The largest case takes 65 loop iterations.

In two Series S prologue runs on the same local fork executable (3e760ed base), save and initial cache, I replaced just this shader's cache entry. The original logged E_OUTOFMEMORY and the captured frame contained two dropped dispatches for this shader. With the annotation, D3D12 created the pipeline and the capture recorded two dispatch 1x1x1 calls. The run completed 191 seconds in the 3D scene.

This gives a shader-side option to investigate alongside the worker-stack change in #1129. The final camera positions differed, so I have no comparable FPS or visual result. AI-assisted testing.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7195102598 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7195102598). Originally posted by [Venom2054](https://github.com/Venom2054) on 2026-11-26T14:38:08Z. --- I tested another variable for `c7d7a6283fad3cd6` on an RTX 5070 Ti. With the loop limit held at 16,384, I reassembled the emitted DXIL with `llvm.loop.unroll.disable` on the loop back edge. The instructions and runtime worker-stack settings were the same. Windows SDK validation passed. All four output words matched an independent CPU sum in eight GPU readbacks (0 to 4,097 input elements). The largest case takes 65 loop iterations. In two Series S prologue runs on the same local fork executable (`3e760ed` base), save and initial cache, I replaced just this shader's cache entry. The original logged `E_OUTOFMEMORY` and the captured frame contained two dropped dispatches for this shader. With the annotation, D3D12 created the pipeline and the capture recorded two `dispatch 1x1x1` calls. The run completed 191 seconds in the 3D scene. This gives a shader-side option to investigate alongside the worker-stack change in #1129. The final camera positions differed, so I have no comparable FPS or visual result. AI-assisted testing.
pickles976 commented 2026-11-27 02:28:33 +00:00 (Migrated from github.com)
Author
Contributor

Imported from Marvisak/VIctory. Originally posted by pickles976 on 2026-11-27T02:28:33Z.


Related Wine/NVIDIA diagnostic caveat, not a reproduction of your stack-overflow cause and not a test of d09c31b: E_OUTOFMEMORY can also hide a different native pipeline result on our vkd3d path.

Dirty local VIctory base 3ed7d725 + #189 3e39e340, scoped XMem/copy-only alias fixes, #2121 paging/stride fix, #2101 filter and #1701 mode; Linux6.17/Wine11, RTX4060 Laptop8GiB/NVIDIA590.48.01,16GiB RAM. Diagnostic-relaxed vkd3d 2576c0b4adfae4a+ (two unrelated from_iface relaxations + mingw PATHCCH compatibility), not stock certification. Pipeline workers still use the default builder stack; no local stack-overflow exception was observed.

During bounded180s loading (prologue card then black), native output repeatedly shows:

NVVM compilation failed: 1
...d3d12_pipeline_state_create_pipeline_variant: Failed to create Vulkan graphics pipeline, vr -13.
... host pipeline refused error=Out of memory. (0x8007000E)

-13 is VK_ERROR_UNKNOWN, not VK_ERROR_OUT_OF_HOST_MEMORY or VK_ERROR_OUT_OF_DEVICE_MEMORY. At this vkd3d commit, state.c:7023-7029 turns any negative graphics result into a null pipeline; 6149-6158 converts a null library/early pipeline into E_OUTOFMEMORY, losing the original error. The normal hresult_from_vk_result mapping is not what preserves the result here.

One exact pair: VIctory vertex022926508d7aa8ba + pixelc3f65a5eb6b8cbb3; native root signature12ff75d8987ee4ca, vertex shader hash2422d8612de66bee. Nine graphics/mesh refusals surfaced as OOM; four compute refusals surfaced as E_FAIL. Same9/4 counts also existed in our pre-texture-filter run. Current run minimum availableRAM4998.5MiB, GPUpeak4488MiB, scopepeak6248.9MiB, all below unchanged safety cutoffs; deliberate180s wall stop, no matching kernel OOM/reset messages. This doesn't exclude a compiler-internal allocation/stack failure; it does mean the HRESULT alone cannot establish one.

Useful next diagnostic is an isolated exact failing pipeline with native error/stack evidence (and default versus larger worker reservation if applicable), rather than assuming every0x8007000E needs a larger global RAM budget. Retained evidence 20261127T022056Z-console.log (first graphics failure near line4034), resources/rendering summary; no assets or shader binaries published.

AI-assisted source/log analysis and executed trial: omp/OpenAI GPT-6 Astra.

Isolated follow-through (2026-11-27)

The exact cached compute 2f03a2df10503cef now reproduces offscreen, without title launch or GPU dispatch. DXIL47,072bytes, SHA256d08fe76e6fb088886a14fe6c69db694fd8b8df8030be1c37ac084a2f07603bd3; vkd3d shaderf81e0913a65db639, root0bdbe03c9f406cc7 both match the title failure. Production root/PSO construction, same NVIDIA device and diagnostic DLL provenance above. Explicit2MiB and64MiB thread reservations both fail0/1 with the same NVVM failure/Vulkan-13. Test time0.73s each, GPUpeak166/163MiB, minimum availableRAM11620/12033MiB. This tests the stack-size variable only, not the fork branch as a whole; the second run reused native caches, and no successful PSO was obtained in either.

Microsoft dxv.exe validates the unchanged input (Validation succeeded, exit0). A separately instrumented replay captured native SPIR-V; spirv-val --target-env vulkan1.3 --scalar-block-layout (SPIRV-Tools2025.1) fails: AtomicOr expected an integer scalar Result Type, but the module uses float and an Image float pointer. The DXIL atomic is integer, but its handle was annotated RWTexture2D<4xF32>. This matches the typed-handle-cache defect owned by #2723 (38f3697801be71060ed2dd1fa65f37c56386e779) / #177, rather than proving your native-Windows stack-overflow mechanism. The correction is the next verification target; no fix/world-rendering success claimed yet.

Evidence directories: verify-rendering-library-native-2m-20261127T031417Z, verify-native-compute-64m-20261127T031518Z, verify-native-compute-dxil-validation-20261127T031609Z, verify-native-compute-spirv-capture-20261127T031741Z. Shader/root/DXIL/SPIR-V artifacts remain local. Title-load memory pressure is not required to reproduce this one pipeline failure; other failed pipelines and the final black frame still need separate attribution.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7208156865 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/issues/966#issuecomment-7208156865). Originally posted by [pickles976](https://github.com/pickles976) on 2026-11-27T02:28:33Z. --- Related Wine/NVIDIA diagnostic caveat, **not a reproduction of your stack-overflow cause and not a test of `d09c31b`**: `E_OUTOFMEMORY` can also hide a different native pipeline result on our vkd3d path. Dirty local VIctory base `3ed7d725` + #189 `3e39e340`, scoped XMem/copy-only alias fixes, #2121 paging/stride fix, #2101 filter and #1701 mode; Linux6.17/Wine11, RTX4060 Laptop8GiB/NVIDIA590.48.01,16GiB RAM. Diagnostic-relaxed vkd3d `2576c0b4adfae4a+` (two unrelated from_iface relaxations + mingw PATHCCH compatibility), **not stock certification**. Pipeline workers still use the default builder stack; no local stack-overflow exception was observed. During bounded180s loading (prologue card then black), native output repeatedly shows: ```text NVVM compilation failed: 1 ...d3d12_pipeline_state_create_pipeline_variant: Failed to create Vulkan graphics pipeline, vr -13. ... host pipeline refused error=Out of memory. (0x8007000E) ``` `-13` is `VK_ERROR_UNKNOWN`, not `VK_ERROR_OUT_OF_HOST_MEMORY` or `VK_ERROR_OUT_OF_DEVICE_MEMORY`. At this vkd3d commit, `state.c:7023-7029` turns any negative graphics result into a null pipeline; `6149-6158` converts a null library/early pipeline into `E_OUTOFMEMORY`, losing the original error. The normal `hresult_from_vk_result` mapping is not what preserves the result here. One exact pair: VIctory vertex`022926508d7aa8ba` + pixel`c3f65a5eb6b8cbb3`; native root signature`12ff75d8987ee4ca`, vertex shader hash`2422d8612de66bee`. Nine graphics/mesh refusals surfaced as OOM; four compute refusals surfaced as E_FAIL. Same9/4 counts also existed in our pre-texture-filter run. Current run minimum availableRAM4998.5MiB, GPUpeak4488MiB, scopepeak6248.9MiB, all below unchanged safety cutoffs; deliberate180s wall stop, no matching kernel OOM/reset messages. This doesn't exclude a compiler-internal allocation/stack failure; it does mean the HRESULT alone cannot establish one. Useful next diagnostic is an isolated exact failing pipeline with native error/stack evidence (and default versus larger worker reservation if applicable), rather than assuming every0x8007000E needs a larger global RAM budget. Retained evidence `20261127T022056Z-console.log` (first graphics failure near line4034), resources/rendering summary; no assets or shader binaries published. AI-assisted source/log analysis and executed trial: omp/OpenAI GPT-6 Astra. ### Isolated follow-through (2026-11-27) The exact cached compute `2f03a2df10503cef` now reproduces offscreen, without title launch or GPU dispatch. DXIL47,072bytes, SHA256`d08fe76e6fb088886a14fe6c69db694fd8b8df8030be1c37ac084a2f07603bd3`; vkd3d shader`f81e0913a65db639`, root`0bdbe03c9f406cc7` both match the title failure. Production root/PSO construction, same NVIDIA device and diagnostic DLL provenance above. Explicit2MiB and64MiB thread reservations both fail0/1 with the same NVVM failure/Vulkan-13. Test time0.73s each, GPUpeak166/163MiB, minimum availableRAM11620/12033MiB. This tests the stack-size variable only, not the fork branch as a whole; the second run reused native caches, and no successful PSO was obtained in either. Microsoft `dxv.exe` validates the unchanged input (`Validation succeeded`, exit0). A separately instrumented replay captured native SPIR-V; `spirv-val --target-env vulkan1.3 --scalar-block-layout` (SPIRV-Tools2025.1) fails: **AtomicOr expected an integer scalar Result Type, but the module uses float and an Image float pointer**. The DXIL atomic is integer, but its handle was annotated RWTexture2D<4xF32>. This matches the typed-handle-cache defect owned by #2723 (`38f3697801be71060ed2dd1fa65f37c56386e779`) / #177, rather than proving your native-Windows stack-overflow mechanism. The correction is the next verification target; no fix/world-rendering success claimed yet. Evidence directories: `verify-rendering-library-native-2m-20261127T031417Z`, `verify-native-compute-64m-20261127T031518Z`, `verify-native-compute-dxil-validation-20261127T031609Z`, `verify-native-compute-spirv-capture-20261127T031741Z`. Shader/root/DXIL/SPIR-V artifacts remain local. Title-load memory pressure is not required to reproduce this one pipeline failure; other failed pipelines and the final black frame still need separate attribution.
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
Marvisak/VIctory#966
No description provided.