1. Environment
- GPU: NVIDIA GeForce RTX 5090 (GB202, SM120)
- OS: Windows 11, build 26200
- Driver: 617.42 (all root-cause work). The crash was also observed on 616.92. Versions before 616 were not tested.
- Application: speech.cpp v0.8.8 (text-to-speech CLI) using the ggml Vulkan backend at ggml commit 678d2570, cooperative-matrix path (VK_NV_cooperative_matrix2, shader mul_mm_cm2.comp). Model: Irodori-TTS-3.4B-v4-Q8_0.gguf (about 3.6 GB).
- Shader compiler: glslc from Vulkan SDK 1.4.363.0. Debugging: Nsight Aftermath SDK 2026.3, nvdisasm from CUDA 13.3, Windows ETW (wpr GPU profile).
- Full material: rtx5090-robustness-finding-core.zip attached (README.en.md has the 22 experiments in detail; the Japanese README.md is the original); the full zip with crash dumps is available on request, see section 7.
2. Summary
ggml-vulkan creates its cooperative-matrix matmul pipelines (and a few others such as rms_norm) with a VkPipelineRobustnessCreateInfoEXT whose storageBuffers and uniformBuffers are VK_PIPELINE_ROBUSTNESS_BUFFER_BEHAVIOR_DISABLED_EXT. With those pipelines the application intermittently gets VK_ERROR_DEVICE_LOST (GPU reset, nvlddmkm event ID 153). Nsight Aftermath shows a “MMU Fault Error” whose faulting instruction is always an STL (store to thread-local memory, i.e. a register spill), at the same two PCs every time:
| Shader (pipeline) | Faulted-warp PC | Instruction | Source line (glslc -g) |
|---|---|---|---|
| matmul_f16_2 (mul_mm_cm2.comp, 13,624 SASS instructions) | 0x2c440 | STL [0x10], ... |
mul_mm_cm2.comp:761, sum = coopMatMulAdd(mat_a, mat_b, sum); in the general (clamped-A) path |
| rms_norm_mul_f32 (rms_norm.comp) | 0x26720 | STL [0xe0], R1 |
generic_binary_head.glsl:59, src1 index computation near the shader entry |
If the very same SPIR-V is used to create the pipeline without VkPipelineRobustnessCreateInfoEXT, the generated SASS is byte-for-byte identical (verified from the pipeline-cache blobs, 13,624 instructions, cmp shows no difference; the only difference in the cache blob is 9 bytes of metadata after the code) and the crash never happens (0 crashes in 30 passes × 20 lines in normal execution, 0 in 20 passes in serialized-submission mode; the control build crashes within the first pass).
So the shader code is the same; what differs is how the driver treats the dispatch of a robustness-disabled pipeline. The fault is on the shader’s own spill area (thread-local memory, allocated by the driver), not on any application buffer.
3. Evidence that it is not an application out-of-bounds access
- The faulting instruction is
STLto local memory in both shaders, never a global/buffer access. The faulted-warp PC reported by Aftermath was calibrated with a 48-instruction test shader that stores to an unmapped address: the reported PC was the faultingSTGitself, not the warp’s current PC (experiment (17)). - Shader error reporting (
VK_DEVICE_DIAGNOSTICS_CONFIG_ENABLE_SHADER_ERROR_REPORTING_BIT_NV) was enabled in all Aftermath runs; it would report an out-of-bounds thread-local access as a distinct error, but every dump (12 dumps) is a plain “MMU Fault Error”. The STL is inside the declared local-memory range; the page is not mapped. - Padding every VkBuffer by 1 MiB changes nothing (same PC). The A matrix of the crashing node (96×96 f16) sits at the start of a buffer with 56 MB of slack after it.
- The same matmul shape (M=96, N=38400, K=96, the four f32/f16 combinations) run alone in ggml’s test-backend-ops never crashes: 8,450,136 iterations in perf mode and 90 cases in test mode, all results verified OK.
- Removing the register-pressure “fast path” from mul_mm_cm2.comp (patch v3-cm2-fastpath-off.patch) makes matmul_f16_2 spill-free (3,416 instructions, 0 STL/LDL) and the matmul crash disappears; the rms_norm shaders still spill and can still fault. Of the 36 pipelines, only the 6 that contain STL/LDL ever fault.
4. When it happens (external conditions, experiments (19)–(22))
- Serialized submission mode (wait for each submit) with a controllable
Sleepwas added to ggml. Sleeping about 14 ms after every submit (about 15,000 submits per line of text) does not change the amount of work done before the crash. Sleeping once per graph (43–44 graphs per line) makes the crash come sooner: median submits before crash 98k (no sleep) → 30k (100 ms per graph) → 15k (1000 ms per graph). With 1000 ms per graph the crash reproduces in 52–54 s, in the first or second line, 3/3 and again 3/3 with the real Japanese text. - Windows ETW (DxgKrnl events,
wpr -start GPU) during two crashing runs and one non-crashing control (robustness kept): in both crashing runs, immediately after the first submission of the crashing graph, a thread of the process that is not the application’s submission thread creates 115 allocations (112 of exactly 32 MiB, 3.63 GB in total), makes them resident and zero-fills them (VidMmMakeResident, PagingOpVirtualFill), and discards + terminates the previous set of 23 / 19 allocations (32 MiB × 21 created at the first codec graph of line 1, plus a few others) while the application’s submissions for that graph are still being queued. The application’s last submission is queued after the discard. Then (run 1)TdrPayloadEngineTimeout2.07 s after the last submission andVidSchMarkDeviceAsErrorreason 7; (run 2)VidSchMarkDeviceAsErrorreason 7 without a TDR event. The control run, and earlier passes of the same graph in the same process, show no such re-creation (1–3 allocation changes). There are 0EvictAllocationevents for this process in all three traces. Extracted event lists, per-event counts and the TDR-side 2 s window are in faulttest/etw/ext/. - Interpretation (not verified, driver-internal): the 32 MiB-granular pool that is created, made resident and freed by a non-application thread is a driver-internal allocation (we assume the thread-local-memory backing for spills). Only in the crashing case it is re-created from about 0.7 GB to 3.6 GB concurrently with in-flight submissions of a robustness-disabled pipeline, and the old pages are discarded while a dispatch still addresses them through its STL. Why the pool is re-created at that moment, whether it is indeed local memory, and why pipelines created with robustness do not hit this, cannot be determined from outside the driver.
4a. Possibly related reports
- Forum topic 383848, “Windows Vulkan: unused compute pipeline causes device loss on RTX 4090 / 4070 SUPER” (drivers 616.92 / 616.56; merely creating a second compute pipeline with a larger private array makes pipeline A’s dispatch return VK_ERROR_DEVICE_LOST). NVIDIA reproduced it as internal bug 6822663 and a fix was submitted on 2026-09-28 for a future driver. Our symptom also looks like the per-thread local-memory (scratch) backing being re-sized or re-created under a running dispatch, so it may be the same defect; 617.42 still shows ours.
- The application author’s record (speech.cpp PR #182) adds two data points we did not measure ourselves: the same GB202 chip as an RTX PRO 6000 Blackwell on Linux driver 595.91.07 spoke 1,100 lines without a fault, and an RTX 2080 never faulted. speech.cpp 0.8.11 ships the workaround of creating the coopmat2 matmul pipelines with robustness kept.
- No report on the NVIDIA forums or in ggml / llama.cpp mentions VK_EXT_pipeline_robustness together with this fault (searched 2026-10-21).
5. Reproduction
Standalone reproduction with a small spilling compute shader (201 STL / 10 LDL, dispatched up to 2000 times with 0 / 100 / 1000 ms idle gaps, 1–1024 workgroups, alternating two pipelines) did not reproduce the fault (experiment (21)). The full application reproduces it reliably:
- Build speech.cpp v0.8.8 against ggml 678d2570 with the attached patch (rtx5090-o56-ggml-vulkan-debug.patch; all instrumentation is behind environment variables and is off by default), or use the release build (crashes too, just less deterministically).
- Download the model Irodori-TTS-3.4B-v4-Q8_0.gguf and a reference voice (any WAV works for
--add-voice). - Run with the 20-line Japanese text file connected to stdin (twenty.txt in the zip root; the bytes must reach the process as UTF-8, see README.en.md section 2):
set GGML_VK_SERIALIZE_SUBMISSIONS=1
set GGML_VK_SLEEP_BEFORE_GRAPH=1000
speech.exe tts Irodori-TTS-3.4B-v4-Q8_0.gguf -o out.wav --device gpu --add-voice ref=voice.wav --voice ref --seed 1 -v < twenty.txt
Expected: ggml_vulkan: device lost on Vulkan0 waiting for submission (nodes 383 to 422) (or nodes 555 / 568) within about one minute, exit code 1, nvlddmkm event 153. Without the two environment variables the crash comes within the first pass of 20 lines (6th–13th line) in serialized mode, or within about 12 lines in normal execution.
4. Counter-test: set GGML_VK_KEEP_ROBUSTNESS=1 (creates every pipeline without VkPipelineRobustnessCreateInfoEXT) → no crash.
6. Workarounds found (all verified)
- Do not attach
VkPipelineRobustnessCreateInfoEXTto the matmul pipelines (GGML_VK_KEEP_ROBUSTNESS=mm) or to any pipeline (=1): 0 crashes. Identical SASS, so no performance difference is expected. - Disable the cooperative-matrix-2 path (GGML_VK_DISABLE_COOPMAT2=1).
- Remove the spill from mul_mm_cm2.comp (v3-cm2-fastpath-off.patch); only covers the matmul shader.
7. Attached
Attachment: rtx5090-robustness-finding-core.zip (2.7 MB) — everything below except the 12 GPU crash dumps (.nv-gpudmp, 36 MB) and most pipeline-cache blobs. The full set rtx5090-robustness-finding.zip (50.0 MB, 364 files) and the 11.7 GB of ETL traces are available on request (FTP or any upload target you name).
- README.en.md / README.md: all 22 experiments with numbers; logs/INDEX.en.md maps log files to experiments.
- aftermath/: 7 GPU crash dumps (.nv-gpudmp), decoded JSON/text, shader debug info (.nvdbg), the SPIR-V passed to the driver and its disassembly, source of the decoder tool.
- sass/: pipeline-cache blobs for all 36 pipelines with and without robustness, extracted NVuc containers, nvdisasm output (matmul_f16_2 with/without robustness, v2, v3; rms_norm_mul_f32), extraction scripts.
- faulttest/: calibration shader and dumps ((17)), glslc -g builds and source-line mapping ((18)), timing experiments ((19), sleep/), ETW extracts and tools ((20), etw/; the 11.7 GB of ETL files are available on request), standalone attempt ((21), spill/), UTF-8 stdin verification ((22), file/).
- rtx5090-o56-ggml-vulkan-debug.patch, v3-cm2-fastpath-off.patch.
- logs/: stdout/stderr of every run. Windows user names are replaced by %USERPROFILE%.
- sysinfo/: dxdiag /t output (equivalent of NVIDIA Control Panel System Information; machine name removed), nvidia-smi -q (serial removed), vulkaninfo --summary.
Crash dump key values for quick lookup: matmul_f16_2 PC 0x2c440 = STL [0x10], rms_norm_mul_f32 PC 0x26720 = STL [0xe0]; SPIR-V Aftermath hash of the matmul shader 0x4f0103299ecaf688, of rms_norm 0x8aa5b3338675cea1.