Debian manages to squash a nasty Y2K-esque bug with only 13 years to spare

Summary

  • Debian transitions to a 64-bit time system to avoid the Y2K38 bug in 2038.
  • Developers identified the culprit, time_t, used thousands of times in Debian’s source code.
  • The transition was crucial as many existing and new systems potentially rely on Debian in the future.

Were you around during the big Y2K scare? There was a huge amount of panic as computers were primed to change their internal dates from 2000 to 1900 when the new year turned over, which would have caused a lot of systems to fall over. Fortunately, there were a ton of efforts to get the issue fixed, and when the ball finally dropped on January 1st, 2000, everything kept standing.

However, there was a second issue: the Y2K38 bug, which would have struck systems in 2038 based on a similar issue. Well, anyone who’s using Debian will no longer need to worry about what their PC will do in just over 12 years’ time. Phew, cutting it a little close there, folks.

Related


5 reasons I use SteamOS instead of Windows on the ROG Ally

Sorry, but SteamOS is just better.

Debian has finally moved away from 32-bit time systems

Running VS Code on Ubuntu

In an entry on the Debian wiki, the developers detail the problem. While the world has generally transitioned to 64-bit operating systems and hardware, Debian continued to use a 32-bit system to track the time. This meant that, on January 1st, 2038, these systems would have encountered a timekeeping issue not unlike what we avoided in Y2K.

But 2038 is still a ways away; why did they bother now? Well, as they document on the wiki, there was a very good chance the hardware released today will hang around for another 13 years:

This is now less that 15 years away and plenty of system that will have problems have already been shipped. We should stop adding to the problem. Most computing, especially computing using Debian or its derivatives, is now done on 64-bit hardware where this issue does not arise. However there is quite a lot of cost-sensitive 32-bit computing still out there, and still shipping new devices (automotive, IOT, TVs, routers, plant control, building monitoring/control, cheap Android phones). Some of that hardware will probably be running Debian or its derivatives. Other binary distros are dropping 32-bit support (RedHat/Fedora have already done so, SUSE’s support is unofficial), so what is left is more likely to end up in the Debian ecosystem.

While the wiki notes that some devices will rely on other distributions that have solved the 32-bit timekeeping issue, there may still be systems in use a decade from now that will rely on Debian. As such, the community had to go through the system and update the time tracker to make it 64-bit.

The good news was that the developers knew the culprit’s name: time_t. The bad news was that “6429 of Debian’s 35960 packages” used time_t in their source code, so it was deeply rooted within the operating system. Fortunately, they’ve managed to squash every single instance they find, albeit they’re still wary that they’ve missed a few. Here’s hoping they manage to catch them all. In the meantime, check out the best beginner-friendly distros for you to try.

Source link

Leave a Comment