Windows AMD: agc_driver_native_multisample_depth fails about one run in five since #10443 (settleImport locks a null settle-queue mutex) #26649
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 Plyxen on 2026-11-24T13:33:32Z.
What happens
agc_driver_native_multisample_depthstops in about one run in five on the AMD iGPU withFATAL: C++ exception St12system_error raised on thread N cannot be delivered: libSceAgcDriver.prx+0xd897e5 has no unwind data.Title, test or build step
ctest
agc_driver_native_multisample_depthAnyPS5 commit
maine68be05111and403fbe6fc1, nothing merged on topSystem
Windows 11 Pro 10.0.26200, WinLibs GCC 15.2.0 r7, AMD Radeon gfx1036 iGPU
1002:13c0(Adrenalin 26.11.2, Vulkan driver 2.0.353). The RTX 5080 (621.24) in the same machine does not fail.Steps to reproduce
Run it 20 times; each run takes under 3 s.
Log
The names are from
nmon the403fbe6fc1build.What was checked
403fbe6fc1e68be05111403fbe6fc1withAPS5_SETTLE_FLOOR_KIB=1024403fbe6fc1Every failure is the same exception at the same address.
Cause.
settleImportbegins withstd::unique_lock queueLock(*context.settleQueueMutex), and the throw is the null check of that lock: the disassembly loadscontext.settleQueueMutex, tests it and jumps to__throw_system_error(EPERM). The call comes fromimportRunAt, which on Windows settles a private writable import at the import wheneverstate.watchPrivateImportsis set and the import is at or abovePrivateSettleFloorBytes(), without asking whether the context has a settle queue.decideImportWatchkeeps that decision under theVkDevicehandle (state.watchDevice) andClearHostImportsdoes not drop it. The test opens three driver devices (CheckDrawFeedback,CheckDepthAttachmentAlias,CheckStorageAliasRetirement), which have a settle queue and decide "private imports are settled", and afterwards a bareDevicewhoseContexthas none. When the driver gives that bare device the handle of the last driver device,decideImportWatchreturns early and the bare context inherits the decision. With temporary logging in a failing run:In a passing run the bare device has a handle of its own and decides again. The AMD driver reused the handle in 12 of 40 runs. I did not log handles on the RTX 5080; it never failed, although the deterministic form below fails there too.
Since #10443. The import is 128 KiB. Before
71dad17b46only imports of 1 MiB and more settled at the import, so the test did not reachsettleImportthrough the bare context.Deterministic form. A copy of a driver context with
settleQueueandsettleQueueMutexcleared, importing 128 KiB of private writable memory, throws the same exception every time, on both GPUs (3 of 3 each).Not known.
has no unwind datafor the cold part ofsettleImport). I did not look into that; with a catchable exception the test would still fail.A fix for the settle path follows as a pull request.
AI-assisted: yes (Claude Code)