Surround Sound Studio (PPSA99051) exits 3 s in since #5049 ("submission retirement failed") #5876
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T14:33:02Z.
Since #5049 (
fix(shader): ignore unused descriptor fields for scalar buffer loads, mergec654b199b), Surround Sound Studio (PPSA99051, catalog release 01.000.003) exits about 3 s after start on Windows. Its own log (download0/hui/dev/app.log) ends with:On the merge's first parent
eecf90953it starts, draws its menu, and keeps running. Through its menus it plays clips (Windows 11, RTX 5070, MinGW GCC 15, Release, 30 s runs driven by key presses).git bisect --first-parentbetween1209d3707(good) and131171e77(bad) gave:7963f16d1eecf90953c654b199b(#5049)submission retirement failed23e93c054,1b127d4df,7d4f34c6e,23be5a02bIt's still bad on
main066b58fa1.#5049 changes
snapshot.buffers[i]in place inmaterializeTables: it clears bit 30 of word 1 and zeroes word 3 for buffers that only scalar loads use. I haven't narrowed down which of the title's shaders or submissions is affected. The title's "submission retirement" check runs in its own GL layer (theps5-openglstack PPSA99005 also uses), and it fails right after the first frames. One thing worth checking is whether the snapshot change reaches anything other than the scalar-only binding, such as a cached snapshot reused for another stage or draw.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-14T14:42:17Z.
I traced the current path on
main(f3434892b).ResourceMaterializer::Materializebuilds a freshnextSnapshotfor the plan, andmaterializeTablesnormalizes that snapshot before it is stored in the per-shaderResourceCapture; captures are then exposed asshared_ptr<const ResourceCapture>. I do not see this normalization mutating a snapshot shared across stages or later draws. The remaining code-level possibility is that the failing shader was classified as scalar-only even though another path in that shader needs the descriptor fields that #5049 clears. Could you capture the failing shader address/stage and, if possible, the resource plan or SRT access for the descriptor? That would distinguish a classification gap from another cause in the title’s submission-retirement check.Imported from boykopovar/AnyPS5. Originally posted by eljackjoestar-cmd on 2026-10-14T15:03:58Z.
I tested the exact first parent
eecf90953and mergec654b199blocally with Surround Sound Studio PPSA99051 release 01.000.003 (ZIP SHA256fcb4e3cb794d36b30b9dee9ed86f0eea317e7c0071d193c18d9a07734e7beb69).Windows 11, Ryzen 7 7800X3D, RTX 5070 / driver 617.14, WinLibs GCC 15.2, Release, SPIRV-Tools OFF. The same relinked executable, app data, GCC DLLs and input settings were used, with no input. GPU trace/profile logging was enabled in both runs. For the merge comparison, I retained the first parent's other runtime modules and replaced only the rebuilt AGC module, matching this merge's sole production-file change.
eecf90953eecf90953c654b199bBoth enabled-cache runs end during submission serial 3, after registration of the 21,652-byte pixel shader
f8d1fab9, with[ps5-agc] submission retirement failed; terminating application before cleanup. Current mainf3434892b, with only #5049's normalization removed locally, also reaches the same failure with shader caching disabled.I therefore haven't reproduced the reported working pre-merge baseline or established a regression introduced by #5049. These results don't disprove your bisect; the difference between our setups remains unresolved. I also haven't established whether the unfinished submission is compiling, stuck or failed, so I am not claiming a compile-timeout cause or a verified fix.
Could you provide the exact build configuration, cache conditions and a GPU trace of the working parent versus the failing merge? In particular, was SPIRV-Tools enabled, and were both runs using equivalent shader/pipeline cache states?
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-14T19:54:02Z.
Thanks for testing, @eljackjoestar-cmd. I reran it to rule out cache state: the title's
shader_cache(pipeline cache included) was deleted before every run, and only the library set changed between runs.Setup:
CMAKE_BUILD_TYPE=Release,ANYPS5_ENABLE_SPIRV_TOOLS=OFF.app.exe, no input, 40 s runs, no trace or profile variables.eecf90953(first parent)app.logc654b199b(#5049 merge)submission retirement failedSo here it's deterministic with a cold cache on both sides. The visible differences from your setup are:
If you'd like a specific trace from both commits, tell me the variables and I'll run them the same way.
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T20:05:52Z.
A Linux data point, where #5049 is not what stops it: Ubuntu 24.04, RTX 4070 Ti, NVIDIA 595.99.02, GCC 13.3, Release, 30 s runs, catalog release 01.000.003. Homebrew UI Lab (PPSA99050), which uses the same GL stack, behaves the same.
[ps5-agc] submission retirement failedonmain411e5e6d9, onmainwith #5049 reverted, and on #5049's first parenteecf90953.APS5_TRACE_GPU=1 APS5_DUMP_QUEUE=0, submissions 1 and 2 (a 4-vertexDRAW_INDEX_AUTO, then the end-of-submissionRELEASE_MEMof0x474c3301/0x474c3401) complete. Submission 3 reuses submission 1's buffer, draws 3 vertices with user SGPR 0 at 0, and never reaches itsWAIT_REG_MEM. Its fence0x474c3501is never written, and the title gives up about 1.9 s later.exit_groupshows the AGC queue thread inDriver::draw→Graphics::CachedPipeline→LinkPipelineFromLibraries→ NVIDIA's compiler (libnvidia-glvkspirv_nv002nvvm→libnvidia-gpucomp). WithAPS5_NO_GPL=1it still fails, so the pipeline's shader compile takes longer than the title waits. A temporary timer around the fast link logs only the first pipeline's link (0.0 ms) before the exit.compile-shaderlog, becomes 445,980 SPIR-V words. Most of that isOpSelect(107k words),OpBitwiseAnd(104k),OpBitcast(55k) and integer compares. #5814 (BDA lookup sites) does not change its size.So at least on this machine the failure is a time budget: the title waits for a submission whose draw is still compiling a very large shader. If the same holds on Windows, #5049 could be what pushes that compile over the title's budget there, by changing that shader's code, rather than breaking the draw itself.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T20:26:08Z.
More on the Linux side. I think this explains both bisects: whether the title survives depends on NVIDIA's own shader cache, not on #5049's code.
The compile time. With temporary timers around
vkCreateGraphicsPipelines, and anLD_PRELOADshim that holds the title's exit for 25 s so the call can finish:main, the fragment-shader pipeline library for the 21,652-byte pixel shader takes 2,244–2,273 ms on an RTX 4070 Ti with 595.99.02. Every other library takes under 12 ms.NVIDIA's driver cache decides the result. These runs share one
__GL_SHADER_DISK_CACHE_PATH, in this order (30 s runs, no input):eecf90953(first parent)main411e5e6d9mainwithout #5049eecf90953mainThe slow compile never finishes inside the 1.9 s, so a normal run never caches it. Once anything caches it, that build keeps working. The cache entry only matches the exact module bytes. On this shader, #5049 changes one baked constant: the scalar-only buffer's descriptor word 3 goes from
0x30042facto0, with the size unchanged. So a driver cache that holds the parent's compile misses on #5049. On Windows that cache is under%LOCALAPPDATA%\NVIDIA\DXCache(orGLCache). Clearing it before both runs should make the parent fail too, if this is what happened.What makes the shader slow. I dumped the request and replayed it offline with
agc_shader_replay --prepare:nanResultF32adds after eachv_add/v_mul/v_fma_f32(1910d1456). With that selection skipped in a local build, the shader is 311,412 words and its library compiles in 1,219 ms. Both PPSA99051 and PPSA99050 then run 30 s with a cold cache.I'm not suggesting dropping the NaN rule. That's a correctness choice. The real fix is probably to not compile at the first draw at all: build the fragment library when the shader is registered, or let the title's wait run while the pipeline compiles. I haven't tried either.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-14T22:37:38Z.
AMD data point, where #5049 makes no difference either: Windows 11 (26300), Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), WinLibs GCC 15.2.0, Release, catalog release 01.000.003 relinked with
--windows --trap-sdk-syscall-stubs, 40 s per run.maineea428ca8maineea428ca8with #5049 (c654b199b) revertedAll eight runs exit with code 1 and end
download0/hui/dev/app.logwith[ps5-agc] submission retirement failed; terminating application before cleanup. The last shader the title compiles before that is the runtime's large pixel shader,compile-shader stage=5 ... bytes=21652 hash=f8d1fab9. That's the shader of #4399: on this GPU its pipeline link took 19.8 s there, against the runtime's 2 s retirement wait (2000 ×sceKernelUsleep(1000)).Keeping the caches doesn't help, because the title calls
_Exitbefore the Vulkan pipeline cache (shader_cache/vk-pipelines-*.bin) is saved at teardown, so every run is a first run for that pipeline. That fits @milescoviello's finding that the outcome follows the pipeline caches (his NVIDIA shader cache) rather than #5049's code.blackbearreloaded/ps5-opengl#12 raised that wait to 30 s (SDK 1.0.2). This catalog release predates it, so a rebuild of the title with the newer SDK should get past this regardless of the emulator.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by screamm on 2026-10-14T23:54:02Z.
On Windows I get the same answer: #5049 isn't what decides it. Builds from before #5049 fail the same way once NVIDIA's driver cache is cold.
Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Release, NVIDIA RTX 4070 (driver 596.21), catalog release 01.000.003 relinked with
--windows, no input, 40 s per run. Each run started from a new output folder (emptyshader_cache) and a new, empty__GL_SHADER_DISK_CACHE_PATH; NVIDIA's Windows Vulkan driver writes itsGLCachethere.c2565f014(before #5049)main6239ceffcmain6239ceffcwith #5049's normalization removed locallyEvery failure ends
download0/hui/dev/app.logright aftercompile-shader stage=5 ... bytes=21652 hash=f8d1fab9with:Runs that survive leave about 900 KB in the driver cache directory; failures leave about 100 KB, so a failed run never caches the slow pipeline. With the driver cache copied from a run that survived, 8 of 8 runs survived, including crossed pairs (
mainwith a cache fromc2565f014, and the reverse). The machine was busy during these runs, so the time to exit varies and the pass rates aren't a speed comparison between builds.This matches @milescoviello's and @LeandroLP23's results: the outcome follows the driver cache and the first-run pipeline build of
f8d1fab9against the runtime's ~2 s wait (#4399), not #5049. My own run of this title onc2565f014two days ago (1,733 frames in 60 s) had a warm driver cache from earlier runs. Looks like a duplicate of #4399 from here; the title-side fix is a catalog rebuild with the longer wait.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by nicolasabosch on 2026-10-16T03:00:27Z.
Data point on NVIDIA Ada, Windows: RTX 4070 Laptop (driver 616.92), Windows 11,
main5d9dcc42d, catalog release 01.000.003 (SHA256 matches the one above), relinked with--windows, 40 s runs, newshader_cachefor every run.__GL_SHADER_DISK_CACHE_PATHper runsubmission retirement failed__GL_SHADER_DISK_CACHE_PATHreused%LOCALAPPDATA%\NVIDIA\GLCache(111 MB, populated by other titles)So #5049 isn't what decides it here either, in line with the comments above.
Where the time goes (local instrumentation, not proposed for
main): the slow part is the fragment-shader pipeline library of a 447,627-word SPIR-V module. WithnanResultF32bypassed in a local build it is 313,059 words (−30.1 %), the library is created in 1311 ms and 1460 ms cold, the title survives 40 s in 2 of 2 runs and the driver cache grows to 668 KB. With the NaN selection the library had not finished when the title aborted (runs of 3.8 s and 5 s), so I have no duration for that case.The NaN tests are ~8.6k sites and each tests a distinct value (no duplicates to share), so I found no reduction that keeps the hardware-measured semantics, and I changed nothing in the recompiler.
Title side: ps5-opengl v1.0.2 raises the retirement wait to 30 s (blackbearreloaded/ps5-opengl#12, merged 2026-10-13), and release 01.000.003 (2026-10-09) predates it. A rebuild of the title with 1.0.2 should get past this.
Not tested: a warm driver cache that holds this compile, and a build from before #5049.
AI-assisted: yes (Claude Code).
Imported from boykopovar/AnyPS5. Originally posted by DavidSamir on 2026-10-16T17:50:55Z.
Another title on this stack: Afterglow (PPSA47770, release 01.000.006, added to the catalog today).
Windows 11 Pro build 26300, Intel i7-11700F, NVIDIA GeForce RTX 3070, WinLibs GCC 15.2, Release,
main82ddae75b6, relinked with--windows, 40 s runs, a new output folder (emptyshader_cache) each time. It exits by itself with code 1 after 12 to 21 s, with no message in the process's stderr. Its own log (download0/hui/dev/app.log) ends with:How I found it (these are local tools, none of this is in a PR):
app.exewithhandle SIGILL nostop:TerminateProcess(-1, 1)is reached fromLibcTerminate_nid_no_patchcalled by_Exit_nid_postfix, and the return address after that is inapp.exe(app.exe+0x1413292). So the title itself calls_Exit(1).APS5_TRACE_CALLS=all, relinked with--trace-imports) whenLibcTerminate_nid_no_patchruns: the last five calls aresceKernelUsleep,clock_gettime,fwrite,fflush,_Exit. Over the whole run the counts aresceKernelUsleep2,000 andclock_gettime2,417, plus about 12.4 millionmemcpyandmemset.insertq(SSE4a) the title runs on this Intel CPU is emulated and is not the cause: withAPS5_NO_SSE4A_EMULATION=1the title faults 4 s in instead.What I did not test: a warm NVIDIA driver cache, other GPUs, or whether the 95,468-byte shader's pipeline build time is what the title's deadline is waiting on. That comparison is the one milescoviello and screamm already made on Surround Sound Studio.
AI-assisted: yes
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T03:31:05Z.
The Afterglow report adds another title that exits through the same
submission retirement failedpath, but it does not yet tie the 95,468-byte shader to the timed submission. This resembles #4399, wheref8d1fab9was traced through the title’s ~2 s wait to a slow cold pipeline-library build on several AMD/NVIDIA setups. Could you capture the final draw/submission number and shader hash, then time its pipeline-library creation (or confirm it is still invkCreateGraphicsPipelineswhen_Exitruns)? Without that link I would treat this as a related symptom, not a separate fix candidate.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-17T15:27:13Z.
Update after reviewing the later reports against #4399: this does not look like a distinct #5049 regression or an AnyPS5-side submission bug. The same cold-cache failure is reproduced across NVIDIA/AMD and Windows/Linux; the failing draw compiles pixel shader
f8d1fab9, and #4399 traces it to the ps5-opengl runtime's ~2 s retirement wait expiring during a long first pipeline build. Warm-cache runs pass that point, and the runtime's upstream 1.0.2 change raises the wait to 30 s; this catalog release predates it. Afterglow's similar exit is not yet tied to a specific submission or pipeline, so I would keep that as an unconfirmed related symptom.I don't see a distinct AnyPS5 code change supported by this evidence. #4399 tracks the shared cause; a title rebuild with the newer runtime is the demonstrated path for this catalog version.
Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-17T15:54:33Z.
Agreed, and thanks to everyone who ran it: this was my error. I deleted AnyPS5's
shader_cachebetween runs but not NVIDIA's own driver cache, so the pre-#5049 build kept hitting warm driver-cached pipelines while #5049's slightly different SPIR-V missed it. That reproduced a cold-cache slow build as a deterministic "regression". #4399 tracks the actual cause (the ps5-opengl runtime's 2 s retirement wait expiring during a long first pipeline build). Closing.AI-assisted: yes (Claude Code)