13 ms·
Investigating why Steam started picking a random font
- shadowgovt 4y ago(me before opening the link) "... on Linux." click "Hm, yes."
- the_af 4y agoThis is a corner case which could have just as well occurred on Windows (or a similar kind of bug), though. It's not the expected usage.
- shadowgovt 4y agoThe 2038 bug is definitely expected, and unlike in Linux, with its highly distributed and composable architecture, management of fonts on Windows is a responsibility of the monolithic operating system maintained by one company. It's not out of the realm of possibility, but I'd be a little startled if Windows hasn't already been gone over with a fine tooth comb for Y-2038 issues.
- lazide 4y agoConsidering how many crazy bugs are getting introduced now in windows, I wouldn’t be that surprised.
- taeric 4y agoPretty sure one of the things they did in windows land was to just stop supporting 32 bit software.
- asddubs 4y agobut windows still supports 32 bit executables, I'm pretty sure?
- taeric 4y agoYou could probably guess I don't claim to be authoritative here. :D I just recall there was a story not long ago about them doing some hard decisions going into 64 bit. https://learn.microsoft.com/en-us/troubleshoot/windows-server/performance/compatibility-limitations-32-bit-programs-64-bit-system https://learn.microsoft.com/en-us/troubleshoot/windows-serve... seems to indicate that you should mostly expect it to work. Odds are high I just saw the headlines about how they are stopping 32 bit sales of their OS. Though, I couldn't tell you for sure what I was misremembering.
- sgerenser 4y agoWindows stopped supporting 32-bit Windows (i.e., Windows 11 is 64-bit only). They still fully support 32-bit apps, of which a lot still exist. Visual Studio 2022 is the first version of Microsoft’s flagship IDE that is 64-bit, for example!
- asddubs 4y agoyup, which is different from the claim that was made. TFA incidentally also was caused because of 32 bit software running on a 64 bit linux system.
- rbanffy 4y agoApps will still overflow if they try to parse a 64-bit Unix timestamp using a 32-bit integer. If that's the case, I imagine they'll break in interesting ways.
- userbinator 4y agoWindows' native API for dates consists of the types FILETIME and SYSTEMTIME which will handle 5-digit years, and even the old MS-DOS FAT timestamp goes up to 2107. The 2038 problem came from Unix and applications which use 32-bit Unix epoch time.
- naikrovek 4y ago
- CaliforniaKarl 4y agoHoly heck I love that. Try to cheese a Stanley Parable achievement, and one dependency deep down inside Steam breaks.
- account42 4y agoIf you are going to cheat those achievements then you might as well use Steam Achievement Manager to get all of them without messing with your system time. Or just don't bother, but can't fault anyone for succumbing to Steam's psychological manipulation. Even without the Y2038 issue, lots of things use timestamps for cache invalidation and might mess up when things are updated while you are in the future.
- deleted 4y ago[deleted]
- develatio 4y ago> 2038 is going to be a lot of fun Indeed it will be!
- gary_0 4y agoWe're gonna party like it's 1999!
- deathanatos 4y agoActually, we'll probably be partying like it's Fri Dec 13 1901 20:45:52 GMT. Ooh, Friday the 13th too, ominous.
- hoosieree 4y agoOh jeez, it's going to be so much worse than y2k.
- CodesInChaos 4y agoAt least we won't have to suffer though the 2106 problem.
- kevin_thibedeau 4y agoNTP epoch in 2036 is going to be better since it isn't getting any attention and there's going to be no shortage of broken IoT devices that fail.
- mkl 4y agoFor the curious: https://doc.ntp.org/reflib/y2k/ https://doc.ntp.org/reflib/y2k/. 2^32 seconds since 1900-01-01 00:00 ends on 7 Feb 2036. The 2038 problem is 2^31 seconds since 1970-01-01 00:00, the Unix epoch.
- ryandrake 4y agoY2038 programming is my retirement plan. I’ll be around 60 and probably kicked out of Silicon Valley employability due to ageism. Like the cobol programmers in the 90s, in 2038 they will be scrambling to find old farts who still know C and UNIX.
- Twirrim 4y agoShades of the fun yet to come, I guess. I don't _see_ any issue against it in their repo? https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issue..., but trying to search for that can be tricky.
- nickphx 4y agoI've used https://github.com/gibbed/SteamAchievementManager https://github.com/gibbed/SteamAchievementManager. To unlock game achievements on steam.
- branon 4y agoVery useful tool, I have used a rewrite/spiritual successor: https://github.com/PaulCombal/SamRewritten https://github.com/PaulCombal/SamRewritten
- serf 4y agowhy? genuine question -- no snark intended. Is there some benefit other than completion?
- branon 4y agoSometimes games are bugged and won't properly unlock achievements. For example achievements will work fine on Windows, but be broken in the native Linux port. The software can also re-lock achievements you've already gained, like if a family member plays on your account and unlocks some that you were planning on earning during your playthrough. Or if you just want to reset your achievement progress for some reason. The other day I was playing around with modding a game, and inadvertently unlocked some achievements I didn't truly earn, so I re-locked them with the achievement manager. I'll wind up unlocking them in the future during normal play. Of course you could also use it to cheat, and instantly gain 100% completion in a title.
- thesnide 4y agoNice. Spoiler ahead: But I'd use faketime in userspace to avoid messing up the system ;)
- donio 4y agoAnd don't even need to run Steam under it, just put it in the "Launch Options" field of the game.
- appleflaxen 4y agoWhat an amazing anecdote. 2038 will likely be very crazy.
- ericyd 4y agoI don't understand the issue. Is there an ELI5 of what is breaking?
- damiante 4y agoI have a similar issue with Caprine, the desktop frontend for Facebook Messenger. I have not however messed with my datetime settings, not is it such a big issue that I have taken the time to try to fix it (I don't use Messenger often and on desktop even less).
- nyanpasu64 4y agoSimilarly I had a bug where KDE's zip unpacker would extract empty(?) folders but interpret uninitialized memory as the folder date, creating folders with a modification time after 2038 that Wine couldn't open.
- dylan604 4y agoWe had a computer dedicated to encoding video that had a misconfigured date that was in the future so all of the encodes from it had the incorrect date. It played havoc with another program on a different system with the correct date. It took a few days for that program's support team to recognize the issue. There was nothing wrong with the file as in the video/audio data was not corrupt or anything. Doing a stream copy to a new file with a sane date made the program happy again. Never did understand why the software even looked at dates, and support couldn't explain it either.
- joosters 4y agoIt seems odd that the problem is in the access time of the files - why does a font library (or, almost any program) care about the last read time of a file? Sure, the modification time is important, but it's pretty rare that code should care about when a file has been read before. The only program I have heard of that broke when access times are unreliable was mutt, the email client.
- cesarb 4y ago> why does a font library (or, almost any program) care about the last read time of a file? Sure, the modification time is important, but it's pretty rare that code should care about when a file has been read before. There's no separate system call for the modification time; a single system call (https://man7.org/linux/man-pages/man2/stat.2.html https://man7.org/linux/man-pages/man2/stat.2.html) returns the three times (atime, mtime, ctime) together. The font library probably wanted just the modification time (to check whether the font cache is stale), but it cannot get the mtime without also getting the atime (and ctime).
- joosters 4y agoSure, but EOVERFLOW isn't coming from stat() in this case, is it? The man page states that this is returned for problems with file sizes too big for 32 bits, not for struct timespecs. Something else must be doing things with the atime, I would guess?
- quietbritishjim 4y agoI think stat() in the 32bit version of libc is making the 64 bit system call to get the value from the kernel and noticing that it would overflow. The man page for stat() [1] says that EOVERFLOW is a possible error value so that lines up. [1] https://man7.org/linux/man-pages/man2/lstat.2.html https://man7.org/linux/man-pages/man2/lstat.2.html
- joosters 4y agoYes, I read that man page. It states: EOVERFLOW: pathname or fd refers to a file whose size, inode number, or number of blocks cannot be represented in, respectively, the types off_t, ino_t, or blkcnt_t. This error can occur when, for example, an application compiled on a 32-bit platform without D_FILE_OFFSET_BITS=64 calls stat() on a file whose size exceeds (1<<31)-1 bytes. None of off_t, ino_t or blkcnt_t are to do with times, they are related to file size. The man page has nothing to say about EOVERFLOW and times. Perhaps the man page is out of date, or perhaps it is another syscall that is returning EOVERFLOW? I'd be surprised if it was actual userspace code in the font library that was generating that errno. After all, if you care enough to spot an overflow in your calculations, you probably care enough to handle that error case better (and know enough about the situation to handle it properly). Something must be making a specific syscall, getting EOVERFLOW, then throwing it back up to the user. But is it really the ubiquitous stat() ?
- notafraudster 4y agoCheating to get the Stanley Parable achievement devalues the hard work that all the rest of us did to earn it.
- labster 4y agoUsername checks out.
- js8 4y agoBetter play it today, because after 2028, you're never getting the achievement.
- WJW 4y agoUnless steam updates their font dependencies somewhere in the upcoming 16 years, of course?
- mrighele 4y agoOn the other side this post reminded me that is has been several years since I last played it, so I will check if I am eligible for the achievement.
- theandrewbailey 4y agoI continuously spent over 25 years of my life not playing the Stanley Parable. If I have to twist the Narrator's arm to force him to realize it, so be it.
- johnchristopher 4y agoA long time ago, I was playing Far Cry. Console was opened. Then all of a sudden IRC chat messages from the IRC client I was running in the background would appear in-game, with fronts and effects (shadows) from the game. shrugs
- MichaelZuo 4y agoMaybe no one understands how computers really work.
- kevin_thibedeau 4y agoThey're magic. The question is will we become Asgardians or Eloi.
- npteljes 4y agoDefinitely a case of emergence, which yeah, we can't really predict. Although there are scenes which proliferate on it, the demoscene for example. https://en.wikipedia.org/wiki/Emergence https://en.wikipedia.org/wiki/Emergence
- cpeterso 4y agoSounds like a graphics driver bug, as if it was reusing some GPU textures in both applications.
- daguava 4y agoOh man, this just unlocked a cool memory - I was in my computer graphics course in college and was trying to write a shader that would generate a wood-grain texture. I messed something up about it, and must have been pulling from the wrong graphics memory, and noticed That the brown wood didn't have a swirl pattern but had what looked like text in it? After staring a bit closer, I noticed it was the text that was written to the console in visual studio, I had somehow brought that graphics buffer in to use as my "swirl pattern". I had to sit back and think a bit about how data on your computer isn't always as safe as you think sometimes after that...
- TillE 4y agoIs Linux really not commonly using 64-bit file times yet? I know there are some years left, but it seems like a relatively straightforward problem that needs to be solved for everyone.
- cesarb 4y ago> Is Linux really not commonly using 64-bit file times yet? It is, and that was the problem. The legacy 32-bit API the library loaded within Steam was using, or more precisely, the legacy 32-bit system call used by that library, could not represent the 64-bit time, so the kernel returned the EOVERFLOW (Value too large for defined data type) error. The root cause of the problem seems to be that Steam is still a 32-bit application (and hasn't been recompiled to used the Latest and Greatest version of glibc, which allows for 64-bit timestamps even on 32-bit processes). If his Linux installation did not use 64-bit file times, the timestamp stored for the file would have fit in 32 bits, and the error wouldn't have happened (though other things would probably have broken first). (Well, actually, Linux is using 34-bit file times, at least on ext4 and xfs, but that's a bit of a nitpicking: what matters is that it doesn't fit in 32 bits.) Edit: it seems that it's actually glibc that's returning the error, not the kernel, see https://news.ycombinator.com/item?id=33675526 https://news.ycombinator.com/item?id=33675526
- Gigachad 4y agoThe Steam client is super old and crusty. Ubuntu tried to remove 32 bit libraries like Apple a while ago but Valve told them if they did that, Steam would no longer be supported so the plan was scrapped.
- account42 4y agoEven if Valve finally get around to updating the client to 64-bit (it already is on macOS AFAIK), most old games are not going to be updated so insisting on keeping the 32-bit libraries around is the right thing to do. Keep in mind that the distro just needs to supply the base system (libc, OpenGL drivers, etc.) in 32-bit and Steam already comes with copies of everything else via the steam runtime.
- M4v3R 4y ago2038 is going to be an interesting year that’s for sure. I’m big into Final Fantasy VII modding/speedrunning and while reverse engineering the game I stumbled upon some code that actually checks if the current date is before 2038. If it’s not it refuses to run. I have no idea why they put this kind of check in the game's code, I tried to remove it but the game actually still didn’t start so there is probably some issue that prevents it from working when the date overflows. I can only imagine that a lot of other legacy software will have similar issues when we reach year 2038.
- cesarb 4y ago> I stumbled upon some code that actually checks if the current date is before 2038. If it’s not it refuses to run. I have no idea why they put this kind of check in the game's code, That's actually very clever. Instead of crashing in unexpected ways or doing odd things, just cleanly exit. If you really want it to run after 2038, you have to emulate the clock, which would then avoid these potential Y2038 bugs.
- account42 4y agoClever would be fixing the Y2038 bugs. This sounds more like a lazy/overworked programmer getting a QA bug report and marking it as WONTFIX because 2038 is going to be someone else's problem.
- MintPaw 4y agoYeah, but at least they actually typed //WONTFIX
- zyx321 4y agoTo clarify: Clever would be to to spend several days hunting down a bug that will affect 0.0001% of your users, and has an easy, well-known workaround?
- account42 4y agoIt's going to affect 100% of your users in 2038. So yeah, if you see the game as just a product with a limited lifecycle then sure you can make excuses for cutting corners. If you see the game as a piece of art then you should have some interest in it working in the future. It's not like time_t overflows are rocket science. Although the most clever solution would be to not have any bugs in the first place ofc ;)
- hoppla 4y agoWhen i first learned of the 2038 problem, i changed the date on my computer and watched it tick up to 2^32. All sorts of things crashed, most notably, the Norton antivirus software. This was on a windows XP if I recall correctly
- DoughnutHole 4y agoSounds like a great way to finally disable Norton if it's found a way onto your system.
- jw1224 4y agoInteresting that Norton seems to use Unix timestamps. I’ve never developed for Windows, is it common for Windows devs to use them too? Or just some niche feature causing a more widespread problem?
- mastax 4y agoUnix timestamps are common in windows software, though the standard timestamp used by the operating system is the number of ticks (100ns) since 1601-01-01 UTC. I vaguely remember a few different timestamp formats in use in different places, but the 100ns-tick is very common in Microsoft APIs.
- jonny_eh 4y agoWhen does the 100ns-tick overflow?
- mastax 4y agoThere are a few different time types in Win32, the one I was talking about is FILETIME: https://learn.microsoft.com/en-us/windows/win32/sysinfo/about-time https://learn.microsoft.com/en-us/windows/win32/sysinfo/abou... FILETIME is a nominally unsigned 64-bt value. 1601-01-01 + 2^64 * 100ns = 60056-05-28. That is, Sunday May 28, 60056.
- 4y ago
- wentin 4y agoThis is catching a bug early. Eventually this will happen to all gamers of steam when the year 2038 comes. Hopefully developers can fix it before then
- yyyk 4y agoSteam client fonts are a mess even without y2038 bugs. There's no good way to change size globally - despite the entire client being based on HTML/CSS tech! The current 'solution'* is to edit stylesheets manually as if it were a new skin, and find/modify every invocation of font-size. * Or use Big Picture mode, which has other issues.
- deleted 4y ago[deleted]
- account42 4y ago> despite the entire client being based on HTML/CSS tech! It used to be VGUI and last I checked there were still some dialogs that weren't updated.
- Scalene2 4y agoQuick question, do most OSes need admin/root/whatever perms to change the system time? If not, I wonder if there are any potential serious exploits that could take advantage of this ability.
- tolciho 4y agoReplay attacks come to mind (a credential valid for five minutes oh hey it's valid again now) but if an attacker can change the system time you probably have more important things to worry about, such as them having root or worse.
- butterNaN 4y agoThe post doesn't solve the mystry for me - Why did 32 bit time cause in Steam picking that specific font?
- eqvinox 4y agofontconfig is the library responsible for indexing and looking up fonts (e.g. by name - note that most software doesn't specify fonts by file name but rather by font name) If fontconfig fails to stat() a font file, it presumably aborts trying to record any information about that font file. Notably, it doesn't know what the font file's actual font name is. If all fonts fail due to stat(), no information will be available about any font. fontconfig has multiple levels of fallback (e.g. "similar" fonts first), but in this case since nothing is known about any font you just get whatever font happens to be first in the list of all fonts.
- db48x 4y agoOr possibly you just get whatever font _didn’t_ have an atime too far in the future. Of course, now that you have actually opened and read the file, you will have changed the atime and thus might have made it unavailable the next time you run Steam. Honestly, everyone should run their filesystems with the `noatime` option set, so that they never record access times at all. We very rarely care about when files are accessed. Usually we care most about when a file was last _modified_, the mtime, so this loses us almost nothing and saves a huge amount of writes to the filesystem at the same time.
- ux 4y agoIt's funny because I'm actually actively using the atime: when I need to know what's the last video file I watched in a series, I use `ls -ult [--time-style=full-iso]` or `stat -c '%x %n' *.mkv | sort -r` to show files by order of access time: last accessed (played) will appear first.
- db48x 4y agoI usually just go back to my shell and press up :) atimes aren’t completely useless, just useful less often than mtimes.
- Sunspark 4y agoOn an older Windows version, one day I lost internet connectivity on my machine and I didn't understand what had happened because the network interface was reporting that it was ok and the external connection appeared to be operating correctly. Virus? Possible, but unlikely. A virus wants to spread, not limit its opportunities to do so. After investigating, I was able to determine that the system clock somehow had gotten set past 2038 and this was sufficient to destroy network connectivity. As soon as it was corrected, everything was fine again. Not the first time I have run into a clock issue breaking software. We are lucky 2038 is still 16 years away and not next month.
- mlindner 4y agoSemi-related question, but on Linux how does one get to sane font handling like on MacOS where you can basically completely forget that fonts exist? I've had so many problems getting fonts looking good on Linux that I practically gave up on the problem as it seems completely intractable.
- adrian_b 4y agoI have stopped using MacOS many years ago, so I do not know if the font handling has improved meanwhile. When I was still using MacOS, I have not noticed anything special about its font handling. The difference in comparison with Linux or any other free OS was that MacOS included a very good set of high quality fonts, much better than those provided by default in any Linux distribution, not that it had some special font handling. Because of that, even after I have ditched MacOS, I have kept a few of its typefaces. Even today I am still using a couple of them. On Linux, it should be possible to obtain any complex or weird font matching behavior that might be desired, by editing the fontconfig rules, which should be located in some directory like "/etc/fonts/conf.d/", but the exact place might vary between Linux distributions. However, I have never attempted to do that, beyond establishing nice defaults or replacements for the fonts that might be specified in Web pages, e.g. "serif", "sans-serif", "Arial", "Times New Roman" and so on (i.e. by editing 60-latin.conf, 60-generic.conf, 45-latin.conf, 45-generic.conf and the like). The main method by which I have ensured that everything is displayed with beautiful typefaces on my Linux computers has been simply by uninstalling all the default fonts and installing other nicer fonts in "/usr/share/fonts/". If you omit to uninstall some ugly font, there would always be some application or Web page that might insist to use that, despite your attempts to suggest better fonts. Many years ago, I have bought a number of beautiful typefaces from some on-line stores like Linotype, Adobe and others, and I am using mostly those on Linux. Nowadays it is much easier to replace the default fonts with better ones, because, unlike a decade ago, now there are a relatively large number of good fonts that are open-source or at least free of charge.
- rcthompson 4y agoHow long until a game adds a Steam achievement for opening the game after the 2k38 overflow date?
- chayesfss 4y agojust couldn't fake the game out like that with stanley game. Why mess with clock? Just turn it off for 5 years, like that seems to be the point of the entire game. You just playing yourself...thinking too hard about it
- account42 4y agoI agree that cheating this achievement is silly and if you do that you might as well be hones with yourself and use Steam Achievement Manager instead of messing with the system time. But remember that Steam does push you "complete" games by showing achievement progress as a percentage and listing ones you don't have yet right on the game page in the client - and that (as well as the immersion-breaking achievement notifications) cannot be turned off.
- strenholme 4y agoIt’s good this came up here. I just spent the last week or so going through the MaraDNS code base and fixing all of the little Y2038 issues. I know, time_t is 64-bit with pretty much any new Linux distro out there, so why are people seeing Y2038 issues? It’s because the Windows 32-bit POSIX compatibility layer handles Y2038 very poorly. Once Y2038 is reached, the POSIX time() call in a 32-bit app fails with a -1. It doesn’t use a rolling timestamp somewhere in 1901 the way 32-bit Linux applications with 32-bit time_t do. It fails hard, returning -1 for every call to time(). Now, it’s true that Microsoft does have proprietary calls for time and date which are Y2038 compliant, and, yes, native Windows32 apps should use those calls instead of the POSIX ones, but in the real world, it’s sometimes a lot easier to, say, just use stat() to get a file’s timestamp instead of having to use CreateFile() followed by GetFileTime(). This is why a lot of Windows apps are still seeing Y2038 issues. In terms of Linux apps, the Y2038 stuff is mainly seen in old 32-bit binary only apps. Since that stuff is mainly games, where an inaccurate datestamp isn’t a serious issue, I think we will see emulation libraries which give old games a synthetic time and date so they aren’t outside of the Y2038 window. New apps will use a 64-bit time_t even if compiled as a 32-bit binary.
- deleted 4y ago[deleted]
- snoshy 4y agoFor those of us that chuckle at it at this time, this is likely to be far far far bigger than Y2K. The reason is because software that runs critical aspects of human life will have proliferated to a greater degree when compared to >2000, and <2038. Before 2000, we had software running our systems, yes. But it was not as distributed, and not as ubiquitous, and not as deeply ingrained into human culture as it is today. This proliferation will obviously continue past today, and while hardware and low-level OS/software mitigations (as well as a herculean effort to clean up the mess) will make up the gap, it's not hard to see that this is likely to be much more impactful upon failure because of the "embeddedness" of these systems. A box that has just been doing its thing for 40-50-60 years and all of a sudden fails, is likely to be more impactful than one that was 20-30 years old even.
- globalise83 4y agoAlso, any system old enough to be affected is likely to be doing something so critical that no-one wanted to risk touching it.
- WorldMaker 4y agoY2K38 is a "standard Unix functions" problem. I don't think the surprises this time are going to be mission critical software doing date math, I think the surprises are going to be "non-mission critical apps" that "don't do date math" where it is not that "no one wants to risk touching it" but more "no one has thought to touch it in years because it isn't mission critical and it's just some random thing in the stack". Case in point, this article's pointing a finger at fontconfig. Who considers fontconfig mission critical software? fontconfig has been open source forever, is it just "too boring" that no one has bothered to do a Y2K38 audit on it? It probably doesn't even really care about dates for the most part, so maybe no one even realizes it needs a date math audit? Multiply that across the very long tail of Unix apps and libraries since 1970. That's the weirder risk of Y2K38 than Y2K: the huge amount of "non-mission critical"/"non-date math" code that potentially exists in every Unix-derived tool. (With all non-Windows OSes in common usage today themselves being Unix-derived, that's a lot of surface area.) Y2K was looking for everything that did date math with varchar(2) or 2-digit BCD. Those were needles in haystacks certainly, but the needles were sharp enough to know when you found one. Y2K38 is looking for subtle differences in (mostly) C macros and C library function calls and making sure that time_t structs are appropriately sized for modern platforms. That almost sounds to me more like looking for particularly colored straws in a haystack.
- grammers 4y agoWhen I first heard about the issue, I changed the system clock to one day before 2038. Once day later, all sorts of things crashed. It's amazing how dependent we are on these things. Hopefully, we'll get it fixed, we've got less than 26 years...
- Josh5 4y agoIf you run Steam in a container, you wont need to worry about it touching and messing up your system files.