Before, at offset 0x38, the "bad" cache files have a non-zero 32 bit number. The number is different in every "bad" cache file. It is always zero in the "good" files. This is the only difference. The rest of each file is identical.
I don't know what this field represents. Need a fontconfig expert to look at this.
Some more: touching the system cache files doesn't make it work.
Binary diff on the cache files before and after running fc-cache shows this:
63 c7 c3 5a 00 00 00 00 47 72 ce 15 00 00 00 00
63 c7 c3 5a 00 00 00 00 00 00 00 00 00 00 00 00
Before, at offset 0x38, the "bad" cache files have a non-zero 32 bit number. The number is different in every "bad" cache file. It is always zero in the "good" files. This is the only difference. The rest of each file is identical.
I don't know what this field represents. Need a fontconfig expert to look at this.