You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FileCacheStorage uses copy() instead of rename(), corrupting cache files on parallel cold-cache runs #9876
copy() truncates the destination and streams into it, so it is not atomic. On a cold cache every
analysed file writes a cache entry while the parent process and the workers read those same files; a
reader that lands on a partially copied file loads a truncated PHP file and dies with a parse error
whose message depends on where the truncation falls. The worker's non-zero exit is then surfaced as Child process error: with empty stderr (ParallelFileProcessor.php:181), which is why no file is
reported and the run fails at 100% with every file already processed.
Activity
samsonasik commentedon Sep 1, 2026
using
rename()seems was cause bug on windows, see original issuethat was resolved by using
copyas back to
rename()may cause old bug show again on windows.dragosprotung commentedon Sep 1, 2026
Hmm..., then we might be needing some kind of locking mechanism ?
Or maybe to a OS check before ?
Switch to a new library like https://github.com/php-standard-library/php-standard-library/blob/next/packages/file/src/Psl/File/write.php ?
samsonasik commentedon Sep 1, 2026
I tried create PR to support both on:
rectorjob failed once with a syntax error naming a string in no file, and passed on re-run robot-council/cli#156