Out of the blue my Steam started picking a random font I had in my user fonts dir: Virgil, the Excalidraw font.
That triggered me all sorts of emotions, ranging from laugh to total incredulity. I initially thought the root cause was a random derping from Valve but the Internet seemed quiet about it, so the unreasonable idea that it might have been my fault surfaced.
To understand how it came to this, I have to tell you about The Stanley Parable, an incredibly funny game I highly recommend. One of the achievement of the game is to not play it for 5 years.
To get it, I disabled NTP, changed my system clock to 2030, started the game, enjoyed my achievement and restored NTP. So far so good, mission is a success, I can move on with my life.
But not satisfied with this first victory I soon wanted to achieve the same in the Ultra Deluxe edition. This one comes with the same achievement, except it's 10 years instead of 5. Since 2022+10 is too hard of a mental calculation for me I rounded it up to 2040, and followed the same procedure as previously. Achievement unlocked, easy peasy.
Problem is, Steam accessed many files during that short lapse of time, which caused them to have their access time updated to 2040. And you know what's special about 2040? It's after 2038.
Get it yet? Here is a hint: Year 2038 problem.
This is the kind of error I was seeing in the console: "/usr/share/fonts": Value too large for defined data type
.
What kind of error could that be?
% errno -s "Value too large"
EOVERFLOW 75 Value too large for defined data type
Nice, so we're triggering an overflow somewhere. More precisely, fontconfig 32-bit (an underlying code to be exact) was going mad crazy because of this:
% stat /etc/fonts/conf.d/*|grep 2040
Access: 2040-11-22 00:00:04.110328309 +0100
Access: 2040-11-22 00:00:04.110328309 +0100
Access: 2040-11-22 00:00:04.110328309 +0100
...
In order to fix this mess I had to be a bit brutal:
% sudo mount -o remount,strictatime /
% sudo mount -o remount,strictatime /home
% sudo find / -newerat 2039-12-31 -exec touch -a {} +
% sudo mount -o remount,relatime /
% sudo mount -o remount,relatime /home
The remounts were needed because relatime
is the default, which means file
accesses get updated only if the current time is past the access time. And I
had to remount both my root and home partition because Steam touched files
everywhere.
Not gonna lie, this self-inflicted bug brought quite a few life lessons to me:
- The Stanley Parable meta-game has no limit to madness
- 2038 is going to be a lot of fun
- 32-bit games preservation is a sad state of affair