Segfault in NVIDIA driver during parallel shader-cache warm-up at boot (regression from ec746622) #2069

Open
opened 2026-11-26 10:13:22 +00:00 by github-bot · 1 comment
Owner

@⁠md-archive on GitHub · 2026-11-02 04:00 UTC · original

Summary
Since ec746622 ("pipeline: create shader-store pipelines at boot on half the hardware threads"), booting with the shader cache enabled crashes with SIGSEGV during warm-up. Builds before that commit boot the same title fine. With the shader cache disabled, current main boots and runs.

Environment

  • KytyPS5 KytyPS5-2026-10-31-a06e356 (Release, clang-lld), Linux (Fedora 43)
  • NVIDIA GeForce RTX 3070 Ti Laptop GPU, driver 580.178.04, Vulkan loader 1.4.341

Affected title: PPSA01325 (ASTRO's PLAYROOM, APP_VER 01.905.000). This is the only title tested so far.

Steps to reproduce

  1. Boot a title once with --shader-cache so that _PipelineCache/
**@⁠md-archive** on GitHub · 2026-11-02 04:00 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2069) **Summary** Since ec746622 ("pipeline: create shader-store pipelines at boot on half the hardware threads"), booting with the shader cache enabled crashes with SIGSEGV during warm-up. Builds before that commit boot the same title fine. With the shader cache disabled, current main boots and runs. **Environment** - KytyPS5 KytyPS5-2026-10-31-a06e356 (Release, clang-lld), Linux (Fedora 43) - NVIDIA GeForce RTX 3070 Ti Laptop GPU, driver 580.178.04, Vulkan loader 1.4.341 **Affected title:** PPSA01325 (ASTRO's PLAYROOM, APP_VER 01.905.000). This is the only title tested so far. **Steps to reproduce** 1. Boot a title once with --shader-cache so that _PipelineCache/<TITLE>.shaders gets created. 2. Boot it again with --shader-cache. Result The log ends at: Shader cache: compiling shaders and pipelines from _PipelineCache/PPSA01325.shaders (5.3 MB) with 8 threads The process exits with SIGSEGV (exit code 139). It reproduces every time (3 of 3 runs). Backtrace (crashing thread) #0-4 libnvidia-glvkspirv.so.580.178.04 #5 _nv014nvvm (libnvidia-glvkspirv.so) #6-12 libnvidia-glcore.so.580.178.04 #13 kyty_emulator + 0x52b31f #14 kyty_emulator + 0x51da44 #15 execute_native_thread_routine (libstdc++) At the time of the crash, the main thread is also inside libnvidia-glcore from the same emulator function (+0x52b31f). So several threads are compiling pipelines in the driver at once, and the crash happens on a ParallelFor helper thread. **Analysis** PipelineCache::WarmUp now calls CreateGraphicsPipeline and CreatePipelineInternal from Common::ParallelFor on hardware_concurrency()/2 threads, all sharing one VkPipelineCache. The Vulkan spec allows that, so this is likely an NVIDIA driver bug, but it only started with this commit. **Workaround** Boot without --shader-cache. **dmesg output** >[ 1241.176511] kyty_emulator[14819]: segfault at 28 ip 00007f2669557c88 sp 00007f2636ff96b0 error 4 in libnvidia-glvkspirv.so.580.178.04[157c88,7f2669431000+71e000] likely on CPU 15 (core 7, socket 0) >[ 1241.176522] Code: 74 15 4c 8d 94 24 d0 00 00 00 ba 02 00 00 00 4c 89 d7 e8 eb f8 27 00 41 8b 36 48 89 ef e8 90 ce fb ff 48 89 c7 e8 f8 fd 1e 00 <48> 8b 50 28 48 89 55 40 48 8d 50 18 48 89 55 48 48 8b 70 30 48 89 >[ 1292.891281] kyty_emulator[15227]: segfault at 28 ip 00007f5009f57c88 sp 00007f4fddf406b0 error 4 in libnvidia-glvkspirv.so.580.178.04[157c88,7f5009e31000+71e000] likely on CPU 0 (core 0, socket 0) >[ 1292.891296] Code: 74 15 4c 8d 94 24 d0 00 00 00 ba 02 00 00 00 4c 89 d7 e8 eb f8 27 00 41 8b 36 48 89 ef e8 90 ce fb ff 48 89 c7 e8 f8 fd 1e 00 <48> 8b 50 28 48 89 55 40 48 8d 50 18 48 89 55 48 48 8b 70 30 48 89
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:13:22 +00:00
Author
Owner

@⁠theantipopau on GitHub · 2026-11-06 05:09 UTC · original

Thanks for the detailed report — the crashing-driver backtrace, the with 8 threads log line and the dmesg entries were enough to pin this on the parallel warm-up.

I've opened #2132, which makes PipelineCache::WarmUp create its pipelines one at a time when the device vendor is NVIDIA (0x10DE) and leaves every other vendor on Common::ParallelFor. The cache format and the files are untouched, so a cache written by an earlier build is still reused; only the compile loop changes. The log line now reports the number of threads actually used, so on your GPU it should read with 1 threads.

Could you try it on the RTX 3070 Ti? Either build the branch theantipopau:fix/nvidia-shader-warmup, or grab a build of #2132 once it lands:

  1. Boot PPSA01325 once with --shader-cache so _PipelineCache/PPSA01325.shaders is (re)created.
  2. Boot it again with --shader-cache.
  3. Check whether it survives, and what the Shader cache: compiling shaders and pipelines from ... line says.

I can't verify the NVIDIA path myself — this machine is an RX 9070 XT on RADV, where the parallel warm-up has never crashed — so a run on your hardware is the only real confirmation. If it still segfaults, a fresh backtrace plus that log line would be very useful; if it boots, a short "works here" is enough to close this out.

**@⁠theantipopau** on GitHub · 2026-11-06 05:09 UTC · [original](https://github.com/KytyPS5/KytyPS5/issues/2069#issuecomment-6677469714) Thanks for the detailed report — the crashing-driver backtrace, the `with 8 threads` log line and the dmesg entries were enough to pin this on the parallel warm-up. I've opened #2132, which makes `PipelineCache::WarmUp` create its pipelines one at a time when the device vendor is NVIDIA (`0x10DE`) and leaves every other vendor on `Common::ParallelFor`. The cache format and the files are untouched, so a cache written by an earlier build is still reused; only the compile loop changes. The log line now reports the number of threads actually used, so on your GPU it should read `with 1 threads`. Could you try it on the RTX 3070 Ti? Either build the branch `theantipopau:fix/nvidia-shader-warmup`, or grab a build of #2132 once it lands: 1. Boot PPSA01325 once with `--shader-cache` so `_PipelineCache/PPSA01325.shaders` is (re)created. 2. Boot it again with `--shader-cache`. 3. Check whether it survives, and what the `Shader cache: compiling shaders and pipelines from ...` line says. I can't verify the NVIDIA path myself — this machine is an RX 9070 XT on RADV, where the parallel warm-up has never crashed — so a run on your hardware is the only real confirmation. If it still segfaults, a fresh backtrace plus that log line would be very useful; if it boots, a short "works here" is enough to close this out.
This discussion has been locked. Commenting is limited to contributors.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/KytyPS5--KytyPS5#2069
No description provided.