GNOME Bugzilla – Bug 768717
Possible race condition with fontconfig cache update mechanism
Last modified: 2017-01-16 11:38:28 UTC
During a package upgrade done in a graphical terminal, the update of the fonts-cantarell package can lead to a desktop showing squares instead of the expected text labels. The reason is that dpkg unpacks files with .dpkg-tmp extensions and when it has unpacked all the files, it renames them back into their definitive name. Unfortunately, it seems that the gnome-settings-daemon monitoring of the directory can trigger in during this process and fontconfig will happily register the .dpkg-tmp files which are then removed shortly afterwards. For some reason (and that's what I call the race condition), the removal of those .dpkg-tmp files is not caught by gnome-settings-daemon and the cache is not updated a second time. In parallel, the Debian packaging will run "fc-cache -s" after the unpack has been finished. Somehow I have the feeling that the removal of the timeout in https://bugzilla.gnome.org/show_bug.cgi?id=748776 makes this race condition much more likely to happen... Related links/bugs: https://bugs.freedesktop.org/show_bug.cgi?id=96896 (asking fontconfig to ignore .dpkg-tmp files) https://bugs.debian.org/828037
The patch from bug 773556 probably helps. Please see whether you can reproduce the problem with that patch. There's a reason why we don't support online updates though...
Sorry, I don't have the time to check this and it's not 100% reproductible since it's a bit timing dependent (and we made our fontconfig configuration a bit more robust as well). Feel free to close the ticket as the fix for #748776 looks likely to fix this issue as well.