fix(shader): remove expired disk-cache trees without the remove_all hang #16088
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/16088"
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 nabil88 on 2026-11-05T16:26:29Z.
What
ShaderDiskCache::housekeeping()deleted expired cache directories withstd::filesystem::remove_all. On Windows, MinGW libstdc++ up to GCC 16 does not treat a reparse point as a link, soremove_allrecurses through it and never terminates; the libstdc++ fix is only in GCC 17 (commit 88856ad855ae). The eviction now callsRemoveTree, the helper added in #7039: it removes a reparse point as the link it is, clears the read-only attribute and retries, and reports the first native error. Other hosts still callremove_all. The header is added toshaderCacheKeySourcesso the disk-cache key covers it, as it already does for the other libc headers the cache includes.Tested
Windows, WinLibs GCC 15.2.0 (the supported toolchain), full
build-fulltree.ctest --test-dir build-full -R agc_shader_disk_cache: 5/5 passed.agc_shader_disk_cache9.5 s,agc_shader_disk_cache_pack_ownership,agc_shader_disk_cache_large_file,agc_shader_disk_cache_long_pathsandagc_shader_disk_cache_host_stderr.ctest --test-dir build-full -R "shader_cache_runtime_sources|agc_shader_disk_cache": 12/12 passed, including the shard split. The key-source fixture now stubsRemoveTree.hppnext to the other libc headers the cache key hashes.VULKAN_SDK, noVkLayer_khronos_validation.dll), so theVK_LAYER_KHRONOS_validationcomparison could not be run.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)