Ghostrunner (PPSA03685) on Windows/NVIDIA: device lost about 147 s in (vkWaitForFences present: Vulkan result -4) #5951

Open
opened 2026-10-14 16:52:35 +00:00 by p3n1cillin · 10 comments
p3n1cillin commented 2026-10-14 16:52:35 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T16:52:35Z.


Ghostrunner (PPSA03685, Unreal Engine 4) on Windows 11, RTX 5070, MinGW GCC 15, Release, main a453108cf, relinked with --windows (title modules from sce_module). It boots and runs through its start-up with Enter presses (Cross). About 147 s in, the GPU device is lost:

[device-fault] result 5:
[device-fault] instruction pointer unknown at 0x2bf1eec50 (precision 0x10)
[device-fault] instruction pointer unknown at 0x2bf1efc20 (precision 0x10)
... (more "instruction pointer unknown" lines in 0x2bf1ec000..0x2bf1ff000)
[videoout] presentation failed: vkWaitForFences present: Vulkan result -4
terminate called after throwing an instance of 'std::runtime_error'
  what():  vkWaitForFences present: Vulkan result -4

No library stop came before it. The faulting instruction pointers are all in one 76 KiB range, which looks like a single hung shader. This run was without APS5_GPU_CHECKPOINTS=1, so it doesn't name the dispatch; I'll add a checkpoint run below. One run so far.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5851893340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T16:52:35Z. --- Ghostrunner (PPSA03685, Unreal Engine 4) on Windows 11, RTX 5070, MinGW GCC 15, Release, `main` `a453108cf`, relinked with `--windows` (title modules from `sce_module`). It boots and runs through its start-up with Enter presses (Cross). About 147 s in, the GPU device is lost: ``` [device-fault] result 5: [device-fault] instruction pointer unknown at 0x2bf1eec50 (precision 0x10) [device-fault] instruction pointer unknown at 0x2bf1efc20 (precision 0x10) ... (more "instruction pointer unknown" lines in 0x2bf1ec000..0x2bf1ff000) [videoout] presentation failed: vkWaitForFences present: Vulkan result -4 terminate called after throwing an instance of 'std::runtime_error' what(): vkWaitForFences present: Vulkan result -4 ``` No library stop came before it. The faulting instruction pointers are all in one 76 KiB range, which looks like a single hung shader. This run was without `APS5_GPU_CHECKPOINTS=1`, so it doesn't name the dispatch; I'll add a checkpoint run below. One run so far. AI-assisted: yes (Claude Code)
p3n1cillin commented 2026-10-14 16:55:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T16:55:17Z.


Second run with APS5_GPU_CHECKPOINTS=1, same setup. It reproduces at the same point (device lost 144 s in, vkWaitForFences present: Vulkan result -4). The checkpoint report:

[device-fault] checkpoint: program 0x146f38800 at stage 0x1
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000
[device-fault] result 5:

So the last compute dispatch the GPU reached is program 0x146f38800, reaching both the top-of-pipe (0x1) and bottom-of-pipe (0x2000) stage markers.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6173656003 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6173656003). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T16:55:17Z. --- Second run with `APS5_GPU_CHECKPOINTS=1`, same setup. It reproduces at the same point (device lost 144 s in, `vkWaitForFences present: Vulkan result -4`). The checkpoint report: ``` [device-fault] checkpoint: program 0x146f38800 at stage 0x1 [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 [device-fault] result 5: ``` So the last compute dispatch the GPU reached is program `0x146f38800`, reaching both the top-of-pipe (0x1) and bottom-of-pipe (0x2000) stage markers.
p3n1cillin commented 2026-10-14 17:40:59 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T17:40:59Z.


Some notes on program 0x146f38800:

  • It lies inside the title's executable image, so it's a compute shader embedded in the eboot rather than loaded from the paks.
  • It has 676 instructions.
  • With APS5_DUMP_SHADERS=1 its recompile request (shader_146f38800.req) is captured. I haven't attached it, since it's the title's shader binary, but I can run anything against it locally if that would help narrow down the hang (for example a SPIR-V dump or a variant without a particular pass).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6174530923 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6174530923). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T17:40:59Z. --- Some notes on program `0x146f38800`: - It lies inside the title's executable image, so it's a compute shader embedded in the eboot rather than loaded from the paks. - It has 676 instructions. - With `APS5_DUMP_SHADERS=1` its recompile request (`shader_146f38800.req`) is captured. I haven't attached it, since it's the title's shader binary, but I can run anything against it locally if that would help narrow down the hang (for example a SPIR-V dump or a variant without a particular pass).
MarcZX10 commented 2026-10-14 18:15:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T18:15:11Z.


The checkpoint reaches both top-of-pipe and bottom-of-pipe for 0x146f38800, so the current evidence does not show that this dispatch itself is stuck; it may have completed before the later command that loses the device.

Could you try one run with APS5_PROFILE_DRAW=1 while keeping APS5_GPU_CHECKPOINTS=1? The dispatch profiler prints any phase that takes over 1 s as [dispatch] <phase> took ... (.. words, program 0x...), including a phase that never completes. The last such lines before device loss should tell us whether another dispatch is hanging and which program it is. Please share just those lines plus the final checkpoint/device-fault lines; no shader request or game data needs to be attached.

If that run still points to 0x146f38800, the saved request can be replayed locally with agc_shader_replay --dis --cfg shader_146f38800.req; the compile/CFG result can help distinguish a compiler/control-flow problem from a later GPU command without posting the title's shader binary.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6175176318 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6175176318). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T18:15:11Z. --- The checkpoint reaches both top-of-pipe and bottom-of-pipe for `0x146f38800`, so the current evidence does not show that this dispatch itself is stuck; it may have completed before the later command that loses the device. Could you try one run with `APS5_PROFILE_DRAW=1` while keeping `APS5_GPU_CHECKPOINTS=1`? The dispatch profiler prints any phase that takes over 1 s as `[dispatch] <phase> took ... (.. words, program 0x...)`, including a phase that never completes. The last such lines before device loss should tell us whether another dispatch is hanging and which program it is. Please share just those lines plus the final checkpoint/device-fault lines; no shader request or game data needs to be attached. If that run still points to `0x146f38800`, the saved request can be replayed locally with `agc_shader_replay --dis --cfg shader_146f38800.req`; the compile/CFG result can help distinguish a compiler/control-flow problem from a later GPU command without posting the title's shader binary.
p3n1cillin commented 2026-10-14 19:56:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T19:56:41Z.


@MarcZX100 here's the run with APS5_PROFILE_DRAW=1 and APS5_GPU_CHECKPOINTS=1 on current main 4c1de0c0c (same setup). It reproduces at 142 s. The last lines before the loss:

[dispatch] driver phases queue 0 direct (10 s, 229 dispatches, 0 cache hits), us per dispatch: ... capture 273.6 recompile 1344.5 ...
[dispatch] creating a pipeline for 127329 SPIR-V words (program 0x146f38800)
[device-fault] checkpoint: program 0x146f38800 at stage 0x1
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000
[device-fault] result 5:
what():  vkWaitForFences present: Vulkan result -4

So the program from the checkpoint is a 676-instruction compute shader that recompiles to 127,329 SPIR-V words. Its pipeline is created right before the device is lost, and no [dispatch] <phase> took … line over 1 s comes before it. That looks like the size blow-up in #4977 (vkQuake, 519,500 words) on NVIDIA rather than a hang in the dispatch itself, though I haven't confirmed the device loss comes from this pipeline. I can dump the SPIR-V or try a run with any pass disabled if that helps.

AI-assisted: yes (Claude Code)

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177098286 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6177098286). Originally posted by [p3n1cillin](https://github.com/p3n1cillin) on 2026-10-14T19:56:41Z. --- @MarcZX100 here's the run with `APS5_PROFILE_DRAW=1` and `APS5_GPU_CHECKPOINTS=1` on current `main` `4c1de0c0c` (same setup). It reproduces at 142 s. The last lines before the loss: ``` [dispatch] driver phases queue 0 direct (10 s, 229 dispatches, 0 cache hits), us per dispatch: ... capture 273.6 recompile 1344.5 ... [dispatch] creating a pipeline for 127329 SPIR-V words (program 0x146f38800) [device-fault] checkpoint: program 0x146f38800 at stage 0x1 [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 [device-fault] result 5: what(): vkWaitForFences present: Vulkan result -4 ``` So the program from the checkpoint is a 676-instruction compute shader that recompiles to **127,329 SPIR-V words**. Its pipeline is created right before the device is lost, and no `[dispatch] <phase> took …` line over 1 s comes before it. That looks like the size blow-up in #4977 (vkQuake, 519,500 words) on NVIDIA rather than a hang in the dispatch itself, though I haven't confirmed the device loss comes from this pipeline. I can dump the SPIR-V or try a run with any pass disabled if that helps. AI-assisted: yes (Claude Code)
MarcZX10 commented 2026-10-14 19:58:49 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T19:58:49Z.


One way to separate pipeline compilation from execution is to capture this large compute pipeline and replay it without dispatching it. The driver has APS5_DUMP_COMPUTE_PIPELINES support, and agc_compute_pipeline_replay <capture.aps5cp> creates the pipeline in compile-only mode and reports pipeline_create time. Reproduce with APS5_DUMP_COMPUTE_PIPELINES=<dir> and APS5_DUMP_COMPUTE_MIN_WORDS=120000, then replay only the capture for program 0x146f38800 on the same RTX 5070. If compile-only replay also stalls or loses the device, that points toward pipeline creation; if it succeeds, the title run’s later execution/synchronization path remains in scope. The replay report says the driver cache is uncontrolled, so please note whether the second run uses a warmed driver cache. A timing/error summary is enough; no shader request or title data needs to be attached.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6177137673 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6177137673). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-14T19:58:49Z. --- One way to separate pipeline compilation from execution is to capture this large compute pipeline and replay it without dispatching it. The driver has `APS5_DUMP_COMPUTE_PIPELINES` support, and `agc_compute_pipeline_replay <capture.aps5cp>` creates the pipeline in compile-only mode and reports `pipeline_create` time. Reproduce with `APS5_DUMP_COMPUTE_PIPELINES=<dir>` and `APS5_DUMP_COMPUTE_MIN_WORDS=120000`, then replay only the capture for program `0x146f38800` on the same RTX 5070. If compile-only replay also stalls or loses the device, that points toward pipeline creation; if it succeeds, the title run’s later execution/synchronization path remains in scope. The replay report says the driver cache is uncontrolled, so please note whether the second run uses a warmed driver cache. A timing/error summary is enough; no shader request or title data needs to be attached.
xXPBSXx commented 2026-10-15 21:01:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-15T21:01:41Z.


An independent reproduction on other hardware: Ghostrunner (PPSA03685), Windows 10, NVIDIA GeForce RTX 4080 SUPER (the game selected it, run_223419.out line 84; an AMD Radeon RX 6400 is also listed as a candidate), main 44df21632 + #6236 (e088fd874) with APS5_PLAYGO_UNLISTED_CHUNKS=absent (without it the title stops earlier at scePlayGo), run with APS5_GPU_CHECKPOINTS=1, APS5_PROFILE_DRAW=1 and APS5_DUMP_COMPUTE_PIPELINES. PPSA03685_rZ/run_223419.err (1459 lines):

[dispatch] creating a pipeline for 127329 SPIR-V words (program 0x146f38800)        (line 809)
[device-fault] checkpoint: program 0x146f38800 at stage 0x1                          (line 815)
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000                       (line 816)
[device-fault] result 5:                                                              (line 817)
[device-fault] instruction pointer unknown at 0x2fff31780 (precision 0x10)            (line 818)
FATAL: abort() (SIGABRT)                                                              (line 824)

This matches the program and word count in p3n1cillin's comment above (0x146f38800, 127329 words). As MarcZX100 noted there, reaching both stage markers does not show that this dispatch is what hangs, so I only report that the same program precedes the device loss here too; the cause is not established.

An earlier run without the checkpoint variables (PPSA03685_rV/run_214042.err, 1021 lines, main 03c4cb5e7 + #6236, about 2 minutes from start to the last log write) ends the same way: four instruction pointer unknown addresses in one range of 5632 bytes (0x2fff217f0 to 0x2fff22df0, lines 391-394), then [gpu] driver failure: vkWaitForFences present: Vulkan result -4 (line 395) and what() (line 398). It names no program.

The dump written by APS5_DUMP_COMPUTE_PIPELINES is 509,569 bytes; I do not attach it (shader data). From the source, agc_compute_pipeline_replay compiles the pipeline without dispatching it, so it separates compilation from execution; I have not run it, and it cannot show the device loss itself.

The 69 lines Shader 0x... has unsupported registered shader type 8; it is not prepared at registration in these logs are unrelated: PlanRegistered (ShaderRegistry.cpp) only logs and skips registered shaders of type 8 since #1892, and no throw for them is in these logs.

Not tested: Linux, other GPUs.

AI-assisted (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6202195340 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6202195340). Originally posted by [xXPBSXx](https://github.com/xXPBSXx) on 2026-10-15T21:01:41Z. --- An independent reproduction on other hardware: Ghostrunner (PPSA03685), Windows 10, NVIDIA GeForce RTX 4080 SUPER (the game selected it, `run_223419.out` line 84; an AMD Radeon RX 6400 is also listed as a candidate), `main` `44df21632` + #6236 (`e088fd874`) with `APS5_PLAYGO_UNLISTED_CHUNKS=absent` (without it the title stops earlier at `scePlayGo`), run with `APS5_GPU_CHECKPOINTS=1`, `APS5_PROFILE_DRAW=1` and `APS5_DUMP_COMPUTE_PIPELINES`. `PPSA03685_rZ/run_223419.err` (1459 lines): ``` [dispatch] creating a pipeline for 127329 SPIR-V words (program 0x146f38800) (line 809) [device-fault] checkpoint: program 0x146f38800 at stage 0x1 (line 815) [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 (line 816) [device-fault] result 5: (line 817) [device-fault] instruction pointer unknown at 0x2fff31780 (precision 0x10) (line 818) FATAL: abort() (SIGABRT) (line 824) ``` This matches the program and word count in p3n1cillin's comment above (`0x146f38800`, 127329 words). As MarcZX100 noted there, reaching both stage markers does not show that this dispatch is what hangs, so I only report that the same program precedes the device loss here too; the cause is not established. An earlier run without the checkpoint variables (`PPSA03685_rV/run_214042.err`, 1021 lines, `main` `03c4cb5e7` + #6236, about 2 minutes from start to the last log write) ends the same way: four `instruction pointer unknown` addresses in one range of 5632 bytes (`0x2fff217f0` to `0x2fff22df0`, lines 391-394), then `[gpu] driver failure: vkWaitForFences present: Vulkan result -4` (line 395) and `what()` (line 398). It names no program. The dump written by `APS5_DUMP_COMPUTE_PIPELINES` is 509,569 bytes; I do not attach it (shader data). From the source, `agc_compute_pipeline_replay` compiles the pipeline without dispatching it, so it separates compilation from execution; I have not run it, and it cannot show the device loss itself. The 69 lines `Shader 0x... has unsupported registered shader type 8; it is not prepared at registration` in these logs are unrelated: `PlanRegistered` (`ShaderRegistry.cpp`) only logs and skips registered shaders of type 8 since #1892, and no throw for them is in these logs. Not tested: Linux, other GPUs. AI-assisted (Claude Code).
MarcZX10 commented 2026-10-15 23:17:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-15T23:17:20Z.


The RTX 4080 report confirms that the same 127,329-word pipeline precedes the device loss, but the cause is still open. Since this run already produced its local capture, could you replay that capture once with agc_compute_pipeline_replay <capture.aps5cp> on the same GPU? Please report whether pipeline creation succeeds or fails, its pipeline_create time, and whether the driver cache was cold or warm; no shader file needs to be attached. That will separate compile-time failure from the later execution/synchronization path.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6204276423 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6204276423). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-15T23:17:20Z. --- The RTX 4080 report confirms that the same 127,329-word pipeline precedes the device loss, but the cause is still open. Since this run already produced its local capture, could you replay that capture once with `agc_compute_pipeline_replay <capture.aps5cp>` on the same GPU? Please report whether pipeline creation succeeds or fails, its `pipeline_create` time, and whether the driver cache was cold or warm; no shader file needs to be attached. That will separate compile-time failure from the later execution/synchronization path.
frankea commented 2026-10-17 23:21:41 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-17T23:21:41Z.


Third card, same signature, plus the compile-only replay @MarcZX100 asked for. Ghostrunner PPSA03685 01.000.005 on Windows 11 (26200), RTX 4090 (NVIDIA 616.92, Vulkan 1.4.341), MinGW GCC 15.2.0, Release, stock main 922dc8999 (2026-10-17, #6236 included, so APS5_PLAYGO_UNLISTED_CHUNKS=absent as in the 4080 run; this dump has no playgo files). 3/3 runs, no input at all (the title plays its intro cinematic by itself at 58 to 60 FPS, 3840x2160): after ~100 s of cinematic a burst of new compute dispatches starts ([dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits), 35 compute pipelines created in that window) and the device is lost. With APS5_GPU_CHECKPOINTS=1 APS5_PROFILE_DRAW=1 APS5_DUMP_COMPUTE_PIPELINES=<dir> APS5_DUMP_COMPUTE_MIN_WORDS=120000:

[dispatch] created a pipeline for 127329 SPIR-V words in 31 ms (program 0x0)     <- at start-up, pipeline-journal replay, before the window
... ~110 s of cinematic at 58 FPS ...
[gpu] worker at 105 s: dispatch 0.7 s, draw 0.0 s, wait 0.0 s
[dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits), us per dispatch: ... capture 206.0 recompile 678.4 ...
[device-fault] checkpoint: program 0x146f38800 at stage 0x1
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000
[device-fault] result 5:
[device-fault] instruction pointer unknown at 0x300112580 (precision 0x10)   (12 addresses, 0x300112580..0x30012bdb0)
[gpu] driver failure: vkWaitForFences present: Vulkan result -4

Two differences from the 5070/4080 logs, neither of which changes the picture: with a warm shader cache the 127,329-word pipeline is created at start-up from the pipeline journal (31 ms in run 2, 21 ms in run 3, 19 MB driver cache loaded), not right before the loss; and the cold run's first failure is AGC graphics: vkQueueSubmit recorder: Vulkan result -4 (57 fault addresses in 0x300124180..0x3001344c0), the present wait reports it a line later. No [dispatch] <phase> took line over 1 s in either profiled run.

Compile-only replay of the capture (compute-f3439387e2a8dbd5/capture.aps5cp, 509,563 bytes, the only module above the 120,000-word threshold) with agc_compute_pipeline_replay built from the same tree with -DANYPS5_ENABLE_SPIRV_TOOLS=ON, same RTX 4090:

pass application cache driver cache pipeline_create replay_total exit
run 2 capture, a fresh uncontrolled (the title had built this module earlier in the session) 2,077.2 ms 2,151.2 ms 0
run 2 capture, b imported (314,091 bytes from pass a) warm 1.5 ms 65.0 ms 0
run 3 capture (identical file), a fresh warm (new process, right after) 12.0 ms 79.0 ms 0
run 3 capture, b imported warm 1.5 ms 67.0 ms 0

spirv_words 127329, required_subgroup_size 32, pipeline_flags 16, 1 descriptor set, 1 push-constant range, 0 specialization constants; capture and replay device both the RTX 4090 (driver 2585198592, pipeline cache UUID 234d00caf7fd8b6cadcf90d3a502d334); the tool validated the module with SPIRV-Tools before creating it.

So on this card pipeline creation succeeds and validates, cold and warm, and the device loss is in the execution/synchronisation path of the dispatch burst that follows the cinematic. If a run that names the compute programs of the last submission before the loss, or one that serialises or skips the 0x146f38800 dispatch, would help, tell me the switch or branch and I will run it here. Full logs and a capture of the cinematic in the Game bring-up thread: https://github.com/boykopovar/AnyPS5/discussions/7320

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243010248 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6243010248). Originally posted by [frankea](https://github.com/frankea) on 2026-10-17T23:21:41Z. --- Third card, same signature, plus the compile-only replay @MarcZX100 asked for. Ghostrunner PPSA03685 **01.000.005** on Windows 11 (26200), **RTX 4090** (NVIDIA 616.92, Vulkan 1.4.341), MinGW GCC 15.2.0, Release, stock `main` 922dc8999 (2026-10-17, #6236 included, so `APS5_PLAYGO_UNLISTED_CHUNKS=absent` as in the 4080 run; this dump has no playgo files). 3/3 runs, no input at all (the title plays its intro cinematic by itself at 58 to 60 FPS, 3840x2160): after ~100 s of cinematic a burst of new compute dispatches starts (`[dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits)`, 35 compute pipelines created in that window) and the device is lost. With `APS5_GPU_CHECKPOINTS=1 APS5_PROFILE_DRAW=1 APS5_DUMP_COMPUTE_PIPELINES=<dir> APS5_DUMP_COMPUTE_MIN_WORDS=120000`: ``` [dispatch] created a pipeline for 127329 SPIR-V words in 31 ms (program 0x0) <- at start-up, pipeline-journal replay, before the window ... ~110 s of cinematic at 58 FPS ... [gpu] worker at 105 s: dispatch 0.7 s, draw 0.0 s, wait 0.0 s [dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits), us per dispatch: ... capture 206.0 recompile 678.4 ... [device-fault] checkpoint: program 0x146f38800 at stage 0x1 [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 [device-fault] result 5: [device-fault] instruction pointer unknown at 0x300112580 (precision 0x10) (12 addresses, 0x300112580..0x30012bdb0) [gpu] driver failure: vkWaitForFences present: Vulkan result -4 ``` Two differences from the 5070/4080 logs, neither of which changes the picture: with a warm shader cache the 127,329-word pipeline is created at start-up from the pipeline journal (31 ms in run 2, 21 ms in run 3, 19 MB driver cache loaded), not right before the loss; and the cold run's first failure is `AGC graphics: vkQueueSubmit recorder: Vulkan result -4` (57 fault addresses in 0x300124180..0x3001344c0), the present wait reports it a line later. No `[dispatch] <phase> took` line over 1 s in either profiled run. **Compile-only replay** of the capture (`compute-f3439387e2a8dbd5/capture.aps5cp`, 509,563 bytes, the only module above the 120,000-word threshold) with `agc_compute_pipeline_replay` built from the same tree with `-DANYPS5_ENABLE_SPIRV_TOOLS=ON`, same RTX 4090: | pass | application cache | driver cache | `pipeline_create` | `replay_total` | exit | |---|---|---|---|---|---| | run 2 capture, a | fresh | uncontrolled (the title had built this module earlier in the session) | 2,077.2 ms | 2,151.2 ms | 0 | | run 2 capture, b | imported (314,091 bytes from pass a) | warm | 1.5 ms | 65.0 ms | 0 | | run 3 capture (identical file), a | fresh | warm (new process, right after) | 12.0 ms | 79.0 ms | 0 | | run 3 capture, b | imported | warm | 1.5 ms | 67.0 ms | 0 | `spirv_words` 127329, `required_subgroup_size` 32, `pipeline_flags` 16, 1 descriptor set, 1 push-constant range, 0 specialization constants; capture and replay device both the RTX 4090 (driver 2585198592, pipeline cache UUID 234d00caf7fd8b6cadcf90d3a502d334); the tool validated the module with SPIRV-Tools before creating it. So on this card pipeline creation succeeds and validates, cold and warm, and the device loss is in the execution/synchronisation path of the dispatch burst that follows the cinematic. If a run that names the compute programs of the last submission before the loss, or one that serialises or skips the 0x146f38800 dispatch, would help, tell me the switch or branch and I will run it here. Full logs and a capture of the cinematic in the Game bring-up thread: https://github.com/boykopovar/AnyPS5/discussions/7320 AI-assisted: yes (Claude Code).
MarcZX10 commented 2026-10-17 23:54:25 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T23:54:25Z.


Thanks for the RTX 4090 replay and the repeated traces. This rules out pipeline creation as the immediate failure on that setup and places the loss in later dispatch execution/synchronization. Current main has a useful built-in isolation switch: run with APS5_SYNC_DISPATCH=1 to wait after each dispatch; APS5_PROFILE_DRAW=1 then records sync time by program address. That may identify the dispatch after which the device is lost, although the extra waits can alter timing. There is no existing per-program skip switch that I can verify. If the synchronized run still loses the device, please share the last [dispatch]/[device-fault] lines and the program address with the first failing wait.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6243394030 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6243394030). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-10-17T23:54:25Z. --- Thanks for the RTX 4090 replay and the repeated traces. This rules out pipeline creation as the immediate failure on that setup and places the loss in later dispatch execution/synchronization. Current main has a useful built-in isolation switch: run with `APS5_SYNC_DISPATCH=1` to wait after each dispatch; `APS5_PROFILE_DRAW=1` then records sync time by program address. That may identify the dispatch after which the device is lost, although the extra waits can alter timing. There is no existing per-program skip switch that I can verify. If the synchronized run still loses the device, please share the last `[dispatch]`/`[device-fault]` lines and the program address with the first failing wait.
frankea commented 2026-10-18 02:23:38 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by frankea on 2026-10-18T02:23:38Z.


@MarcZX100 Done: two runs with APS5_SYNC_DISPATCH=1 APS5_PROFILE_DRAW=1 APS5_GPU_CHECKPOINTS=1, same RTX 4090 setup as above (Windows 11 26200, NVIDIA 616.92, Vulkan 1.4.341, MinGW GCC 15.2.0, stock main 922dc8999, Ghostrunner 01.000.005, APS5_PLAYGO_UNLISTED_CHUNKS=absent), no input.

The synchronized run still loses the device, at the same point, and the first failing wait is the recorder fence wait of the 0x146f38800 dispatch itself, identical in both runs:

[gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4

With the per-dispatch sync every batch before this one had already been waited on (230 syncs in the burst, 0.1 s in total, none over 1 s, so no [dispatch] <phase> took line), and the loss surfaces on the wait for the batch that carries the 0x146f38800 dispatch, not on a later present or submit as in the unsynchronized runs (vkWaitForFences present in runs 2/3, vkQueueSubmit recorder in the cold run 1). The checkpoints are the same two lines as before (program 0x146f38800 at stage 0x1 and 0x2000). So this answers the earlier question whether 0x146f38800 had completed and a later command lost the device: the device is lost while waiting for this dispatch's batch. 0x146f38800 is the 676-instruction eboot-embedded shader that p3n1cillin's cold run showed being recompiled to 127,329 SPIR-V words; here (warm cache) that pipeline is created at start-up from the pipeline journal (created a pipeline for 127329 SPIR-V words in 8 ms (program 0x0)), 100 s before the dispatch.

The waits did not move the loss: the title time at the loss is 105 s in both synchronized runs and in both unsynchronized warm runs (last [pm4 ring] timestamp 105.6 / 106.2 s vs 105.6 / 105.7 s), after the same ~10 s burst of new compute work that follows ~100 s of cinematic ([dispatch] driver phases queue 0 direct (10 s, 229/230 dispatches, 0 cache hits), 35 compute pipelines created in the window, both ways). 0x146f38800 is not among the programs with measurable sync time in the [address-sync] line (its own wait threw instead). The fault report is the same shape, 83 to 110 instruction pointer unknown addresses in one ~106 KiB range (0x300112620..0x30012c770). Wall clock to the abort 2:31 and 1:57 (unsynchronized 1:57 / 1:58). The packet accounting printed at the teardown of run 1 puts the 5.3 s of the failing wait on DISPATCH_INDIRECT x3 (the 15 DISPATCH_DIRECT of the window took 16 ms), so the dispatch seems to be an indirect one; the [pm4 ring] excerpts in stderr around t=106 s decode only SET_SH_REG / RELEASE_MEM / EVENT_WRITE, not the dispatch packet. One more observation from the screenshots: the capture 4 s before the abort (frame 6085, window still reporting 59.9 FPS) is a black window, while frame 5892 (the last capture of the unsynchronized run 2, 11 s before its abort) is still the cinematic, so the compute burst and the loss coincide with the cut from the cinematic to whatever loads next.

sync-1 stderr: last [dispatch]/[address-sync]/[recorder] lines and the failure (fault addresses cut to first/last of 110)
[dispatch] created a pipeline for 127329 SPIR-V words in 8 ms (program 0x0)          <- start-up, pipeline journal
...
[gpu] worker at 105 s: dispatch 0.0 s, draw 0.0 s, wait 0.0 s
[presync] 230 dispatches checked, 0 pre-syncs waited 0 ms (cumulative)
[vk] deviceProc lookups inside the device call: 9284 (40.37 per dispatch); pre-dispatch barriers recorded 62, skipped 167; compute pipelines created 35 (0 under the GPU mutex)
[recorder] 231 syncs waited 0.1 s for the GPU in total (sources, count/wait: idle 0/0.0s, pending write 0/0.0s, recorded store 0/0.0s, address-based 230/0.1s, other 0/0.0s); hook 257967 calls, 12 locked; 0 targeted syncs left 0 batches in flight; ...
[recorder] submits 40215, vkQueueSubmit mean 22.7 us, max 941.7 us
[address-sync] 230 address-based dispatch syncs waited 0.1 s in total; by program (10 s): 0x200ec10000 x10 45ms 0x146f50800 x5 35ms 0x146f52100 x5 10ms 0x200c4b0000 x36 6ms 0x146f52900 x16 6ms 0x146f3b200 x11 5ms 0x200a910000 x14 4ms 0x146f3dc00 x35 3ms
[gpu] worker at 105 s: dispatch 0.8 s, draw 0.0 s, wait 0.0 s
[dispatch] driver phases queue 0 direct (10 s, 229 dispatches, 0 cache hits), us per dispatch: prologue 19.7 key 0.2 lookup 0.4 validate 0.0 validate GPU wait 0.0 relock 0.0 capture 10.7 recompile 640.4 insert 1.2 queued-label check 0.2 snapshots 0.3 prepare: key 1.2 prepare: find 1.1 prepare: precollect 0.0 prepare: presync 0.5 prepare: stage A (miss) 55.4 prepare: other 3.6 recipe pre-check 0.0 lock wait 0.4 labels 0.1 note writers 0.3 device call 2601.4 tail 0.1 epilogue 1.6, total 3338.8 (764.6 ms); validate 0.0 us per validation (0 validations; GPU waits inside it 0.0 us per validation apart)
[device-fault] checkpoint: program 0x146f38800 at stage 0x1
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000
[device-fault] result 5: 
[device-fault] instruction pointer unknown at 0x30011f880 (precision 0x10)
... 108 more, all in 0x300112690..0x30012c770 ...
[device-fault] instruction pointer unknown at 0x300115360 (precision 0x10)
[videoout] presentation failed: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
[packets] queue 0x0 1073 submissions, time by packet (10 s): DISPATCH_INDIRECT x3 5278ms NOP x1607 5209ms DRAW_INDEX_OFFSET_2 x770 69ms flip x356 18ms DISPATCH_DIRECT x15 16ms DMA_DATA x1252 13ms DRAW_INDEX_AUTO x175 11ms ...
terminate called after throwing an instance of 'std::runtime_error'
  what():  compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
[gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
FATAL: abort() (SIGABRT) on thread 12628
sync-2 stderr, same lines (83 fault addresses in 0x300112620..0x300123480)
[dispatch] created a pipeline for 127329 SPIR-V words in 9 ms (program 0x0)
...
[gpu] worker at 105 s: dispatch 0.0 s, draw 0.0 s, wait 0.0 s
[recorder] submits 40397, vkQueueSubmit mean 23.2 us, max 9300.9 us
[address-sync] 230 address-based dispatch syncs waited 0.1 s in total; by program (10 s): 0x146f50800 x5 33ms 0x200ec10000 x10 32ms 0x146f52100 x5 8ms 0x200c4b0000 x36 6ms 0x146f52900 x16 5ms 0x146f3b200 x11 4ms 0x146f3dc00 x35 3ms 0x200ebe0000 x12 2ms
[gpu] worker at 105 s: dispatch 0.7 s, draw 0.0 s, wait 0.0 s
[dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits), us per dispatch: prologue 22.0 key 0.2 lookup 0.3 validate 0.0 validate GPU wait 0.0 relock 0.0 capture 10.7 recompile 688.6 insert 1.2 queued-label check 0.2 snapshots 0.3 prepare: key 1.2 prepare: find 1.1 prepare: precollect 0.0 prepare: presync ...
[device-fault] checkpoint: program 0x146f38800 at stage 0x1
[device-fault] checkpoint: program 0x146f38800 at stage 0x2000
[device-fault] result 5: 
[device-fault] instruction pointer unknown at ... (83 addresses, 0x300112620..0x300123480)
[gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
[videoout] presentation failed: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
  what():  compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4
FATAL: abort() (SIGABRT) on thread 14816

If there is a branch that skips or stubs the 0x146f38800 dispatch, or dumps its descriptors and indirect arguments before it is recorded, I can run it here on the same layout; APS5_DUMP_SHADERS=1 for the .req of this program is also easy if the compare with p3n1cillin's capture would help.

AI-assisted: yes (Claude Code).

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6244689502 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/5951#issuecomment-6244689502). Originally posted by [frankea](https://github.com/frankea) on 2026-10-18T02:23:38Z. --- @MarcZX100 Done: two runs with `APS5_SYNC_DISPATCH=1 APS5_PROFILE_DRAW=1 APS5_GPU_CHECKPOINTS=1`, same RTX 4090 setup as above (Windows 11 26200, NVIDIA 616.92, Vulkan 1.4.341, MinGW GCC 15.2.0, stock `main` 922dc8999, Ghostrunner 01.000.005, `APS5_PLAYGO_UNLISTED_CHUNKS=absent`), no input. **The synchronized run still loses the device, at the same point, and the first failing wait is the recorder fence wait of the `0x146f38800` dispatch itself**, identical in both runs: ``` [gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 ``` With the per-dispatch sync every batch before this one had already been waited on (230 syncs in the burst, 0.1 s in total, none over 1 s, so no `[dispatch] <phase> took` line), and the loss surfaces on the wait for the batch that carries the `0x146f38800` dispatch, not on a later present or submit as in the unsynchronized runs (`vkWaitForFences present` in runs 2/3, `vkQueueSubmit recorder` in the cold run 1). The checkpoints are the same two lines as before (`program 0x146f38800 at stage 0x1` and `0x2000`). So this answers the earlier question whether `0x146f38800` had completed and a later command lost the device: the device is lost while waiting for this dispatch's batch. `0x146f38800` is the 676-instruction eboot-embedded shader that p3n1cillin's cold run showed being recompiled to 127,329 SPIR-V words; here (warm cache) that pipeline is created at start-up from the pipeline journal (`created a pipeline for 127329 SPIR-V words in 8 ms (program 0x0)`), 100 s before the dispatch. The waits did not move the loss: the title time at the loss is 105 s in both synchronized runs and in both unsynchronized warm runs (last `[pm4 ring]` timestamp 105.6 / 106.2 s vs 105.6 / 105.7 s), after the same ~10 s burst of new compute work that follows ~100 s of cinematic (`[dispatch] driver phases queue 0 direct (10 s, 229/230 dispatches, 0 cache hits)`, 35 compute pipelines created in the window, both ways). `0x146f38800` is not among the programs with measurable sync time in the `[address-sync]` line (its own wait threw instead). The fault report is the same shape, 83 to 110 `instruction pointer unknown` addresses in one ~106 KiB range (0x300112620..0x30012c770). Wall clock to the abort 2:31 and 1:57 (unsynchronized 1:57 / 1:58). The packet accounting printed at the teardown of run 1 puts the 5.3 s of the failing wait on `DISPATCH_INDIRECT x3` (the 15 `DISPATCH_DIRECT` of the window took 16 ms), so the dispatch seems to be an indirect one; the `[pm4 ring]` excerpts in stderr around t=106 s decode only SET_SH_REG / RELEASE_MEM / EVENT_WRITE, not the dispatch packet. One more observation from the screenshots: the capture 4 s before the abort (frame 6085, window still reporting 59.9 FPS) is a black window, while frame 5892 (the last capture of the unsynchronized run 2, 11 s before its abort) is still the cinematic, so the compute burst and the loss coincide with the cut from the cinematic to whatever loads next. <details><summary>sync-1 stderr: last [dispatch]/[address-sync]/[recorder] lines and the failure (fault addresses cut to first/last of 110)</summary> ``` [dispatch] created a pipeline for 127329 SPIR-V words in 8 ms (program 0x0) <- start-up, pipeline journal ... [gpu] worker at 105 s: dispatch 0.0 s, draw 0.0 s, wait 0.0 s [presync] 230 dispatches checked, 0 pre-syncs waited 0 ms (cumulative) [vk] deviceProc lookups inside the device call: 9284 (40.37 per dispatch); pre-dispatch barriers recorded 62, skipped 167; compute pipelines created 35 (0 under the GPU mutex) [recorder] 231 syncs waited 0.1 s for the GPU in total (sources, count/wait: idle 0/0.0s, pending write 0/0.0s, recorded store 0/0.0s, address-based 230/0.1s, other 0/0.0s); hook 257967 calls, 12 locked; 0 targeted syncs left 0 batches in flight; ... [recorder] submits 40215, vkQueueSubmit mean 22.7 us, max 941.7 us [address-sync] 230 address-based dispatch syncs waited 0.1 s in total; by program (10 s): 0x200ec10000 x10 45ms 0x146f50800 x5 35ms 0x146f52100 x5 10ms 0x200c4b0000 x36 6ms 0x146f52900 x16 6ms 0x146f3b200 x11 5ms 0x200a910000 x14 4ms 0x146f3dc00 x35 3ms [gpu] worker at 105 s: dispatch 0.8 s, draw 0.0 s, wait 0.0 s [dispatch] driver phases queue 0 direct (10 s, 229 dispatches, 0 cache hits), us per dispatch: prologue 19.7 key 0.2 lookup 0.4 validate 0.0 validate GPU wait 0.0 relock 0.0 capture 10.7 recompile 640.4 insert 1.2 queued-label check 0.2 snapshots 0.3 prepare: key 1.2 prepare: find 1.1 prepare: precollect 0.0 prepare: presync 0.5 prepare: stage A (miss) 55.4 prepare: other 3.6 recipe pre-check 0.0 lock wait 0.4 labels 0.1 note writers 0.3 device call 2601.4 tail 0.1 epilogue 1.6, total 3338.8 (764.6 ms); validate 0.0 us per validation (0 validations; GPU waits inside it 0.0 us per validation apart) [device-fault] checkpoint: program 0x146f38800 at stage 0x1 [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 [device-fault] result 5: [device-fault] instruction pointer unknown at 0x30011f880 (precision 0x10) ... 108 more, all in 0x300112690..0x30012c770 ... [device-fault] instruction pointer unknown at 0x300115360 (precision 0x10) [videoout] presentation failed: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 [packets] queue 0x0 1073 submissions, time by packet (10 s): DISPATCH_INDIRECT x3 5278ms NOP x1607 5209ms DRAW_INDEX_OFFSET_2 x770 69ms flip x356 18ms DISPATCH_DIRECT x15 16ms DMA_DATA x1252 13ms DRAW_INDEX_AUTO x175 11ms ... terminate called after throwing an instance of 'std::runtime_error' what(): compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 [gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 FATAL: abort() (SIGABRT) on thread 12628 ``` </details> <details><summary>sync-2 stderr, same lines (83 fault addresses in 0x300112620..0x300123480)</summary> ``` [dispatch] created a pipeline for 127329 SPIR-V words in 9 ms (program 0x0) ... [gpu] worker at 105 s: dispatch 0.0 s, draw 0.0 s, wait 0.0 s [recorder] submits 40397, vkQueueSubmit mean 23.2 us, max 9300.9 us [address-sync] 230 address-based dispatch syncs waited 0.1 s in total; by program (10 s): 0x146f50800 x5 33ms 0x200ec10000 x10 32ms 0x146f52100 x5 8ms 0x200c4b0000 x36 6ms 0x146f52900 x16 5ms 0x146f3b200 x11 4ms 0x146f3dc00 x35 3ms 0x200ebe0000 x12 2ms [gpu] worker at 105 s: dispatch 0.7 s, draw 0.0 s, wait 0.0 s [dispatch] driver phases queue 0 direct (10 s, 230 dispatches, 0 cache hits), us per dispatch: prologue 22.0 key 0.2 lookup 0.3 validate 0.0 validate GPU wait 0.0 relock 0.0 capture 10.7 recompile 688.6 insert 1.2 queued-label check 0.2 snapshots 0.3 prepare: key 1.2 prepare: find 1.1 prepare: precollect 0.0 prepare: presync ... [device-fault] checkpoint: program 0x146f38800 at stage 0x1 [device-fault] checkpoint: program 0x146f38800 at stage 0x2000 [device-fault] result 5: [device-fault] instruction pointer unknown at ... (83 addresses, 0x300112620..0x300123480) [gpu] driver failure: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 [videoout] presentation failed: compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 what(): compute shader 0x146f38800: AGC graphics: vkWaitForFences recorder: Vulkan result -4 FATAL: abort() (SIGABRT) on thread 14816 ``` </details> If there is a branch that skips or stubs the `0x146f38800` dispatch, or dumps its descriptors and indirect arguments before it is recorded, I can run it here on the same layout; `APS5_DUMP_SHADERS=1` for the `.req` of this program is also easy if the compare with p3n1cillin's capture would help. AI-assisted: yes (Claude Code).
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
boykopovar/AnyPS5#5951
No description provided.