[ccache] FATAL: Could not create ... (permission denied?)

Joel Rosdahl joel at rosdahl.net
Wed May 30 12:52:01 MDT 2012

On 30 May 2012 20:09, Andy Lutomirski <luto at amacapital.net> wrote:
> Looks like a straight-up race: one ccache invocation is cleaning up
> files that are still in use by another invocation.  I bet the
> precompiled headers triggered it because they take a long time to
> generate.

Yes, spot on.

When doing cleanup in one of the 16 subdirectories, ccache deletes
temporary files that are older than one hour in a pre-step, assuming
that no compilation takes more than one hour. It doesn't look that
this happens to you, though.

The next step is that the 20% oldest files in the subdirectory are
removed. It sounds strange if at least 80% of the files in the
subdirectory have been put there (or used, which results in an updated
mtime) after the compilation of the precompiled header begun. Unless
your max cache size limit is way too low, that is... Could this be the
case? (Still, ccache should handle this more gracefully, of course.)

-- Joel

More information about the ccache mailing list