Repository navigation
fix(shader-cache): remove stale temporary files from the cache root - #7731
tibzejoker wants to merge 1 commit into
Conversation
Housekeeping removed temporary files older than one hour only in the current version subdirectory. The Vulkan pipeline cache is written in the cache root, so a run stopped during its save left the temporary file there for good (2.5 GB each for a large title). Housekeeping now applies the same rule to the root. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Overlap with #6771 (@XairRrR): that PR moves So: if #6771 is going in, I'm fine closing this one; it may be worth adding the root cleanup there instead. If #6771 stalls, this is the smaller fix for the leak. The USAGE.md line conflicts textually either way. I'll rebase whichever stays open. Written with AI assistance (Claude Code). |
What
The shader cache's housekeeping removes
*.tmp.*files older than one hour, but only in the current version subdirectory. The Vulkan pipeline cache (vk-pipelines-*.bin) is saved withWriteFileAtomicallyin the cache root, one level up. A run that stops while that file is being saved (killed, crashed, closed during the save) leaves its temporary file in the root, and nothing ever removes it.For a large title the pipeline cache is big: here it is 2.5 GB, and three runs stopped during the save left 7.2 GB of
vk-pipelines-*.bin.tmp.*files inshader_cache/. Housekeeping now applies the same one-hour rule to the root as well. Only regular files whose name contains.tmp.are removed; recent ones are kept because another run may still be writing them. USAGE.md now describes this.Tested
Windows 11, MinGW GCC 15.2:
agc_shader_disk_cache(--housekeepingchild process). The cache root holds a pipeline cache file, a temporary file two hours old, and a recent temporary file. A process looks up a shader there and shuts the cache down. The old temporary file must be gone; the other two must remain. Onmainit fails witha temporary file left in the cache root by an interrupted write survived housekeeping.ctest -R "agc_shader_disk_cache|agc_driver_graphics|agc_driver_pipeline|agc_driver_recorder|agc_driver_shutdown": 26/26.tools/check_conventions.py --base upstream/main: passed.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)🤖 Generated with Claude Code
https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P