[Fontconfig] Race condition on updating cache

Akira TAGOH akira at tagoh.org
Sun Sep 29 20:54:34 PDT 2013


I think this may be a long standing issue and worked around with
waiting for a few sec after updating the cache. but I've got a report
and still reproducible and finally tracked it down and created 100%
reproducible test case by having a logic to get rid of that
conditional state.

Let me explain how it happens first. fc-cache reads the directory to
update the directory cache. as you may know this affects reading the
sub-directories to find out fonts.
If one is installing a new font while updating and finished reading
the sub-directories on it. it won't updates the cache even if a
directory is created/removed/renamed. and the cache is created without
a directory where being installed a new font and won't be updated so
that the cache's timestamp is newer than it.

We may need to watch the changes on the directory while updating
though, I just want to discuss the possible and the simple solution on
this here.



More information about the Fontconfig mailing list