Y292B bug The article discusses the "Y292B bug," a future overflow issue in Unix time where a signed 64-bit integer used in Linux will roll over in approximately 292 billion years, causing the date to jump back billions of years before the Big Bang. The author proposes solutions using dynamically typed languages or the GNU Multiple Precision Arithmetic Library in C to allow arbitrary precision, though these are not compatible with kernel space. The piece humorously notes that while the problem is not urgent, it highlights ongoing challenges in timekeeping systems and memory allocation. Y292B bug 26 Jun 2024 - We're doomed Again... Timekeeping is bitch. I found out the hard way while trying to program extendable time keeper for other celestial bodies in the Solar system. The problem is that, every calendar system is flooded with so many rules and exceptions that the calendar builder basically becomes another programming language. I am well aware of the Zawinski's Law however, I wanted to avoid creating another Emacs. Common timekeeping obstacles include inconsistent leap intervals, ever changing time zones and conversions from one timekeeping system to another. In addition to these algorithmic problems, there are device limitations like precision of the oscilator or memory capacity. In modern age, these are usually overlooked, especially memory allocation is not considered a serious problem since the Y2K bug came and went. Y2K, Y2038 and other Y2xx bugs are not really "bugs" but simple overflow of reserved memory space. You see, Unix and unix-like computer systems measure time by incrementing seconds in single integer variable time t. Naturally, this timekeeping is named the Unix time and its 0 is equal to midnight, 1st of January 1970. Different implementations of the Unix time, use different data type for time t. When the data type reaches its upper limit, it will "flip", either to its opposite negative value or to the 0. Current, main branch of the Linux kernel uses signed 64-bit integer. This solution has rollover point in year 292,277,026,596. That is roughly 292 billion, 277 million, 24 thousand years into future. The number overflows and the date will jump back 278 billion years before the Big Bang ? Needles to say, this needs to be fixed. Luckily, we have 33 life times of our Sun to solve this problem but we could propose some solutions even today. The obvious solution is to use dynamically typed language. use strict; use warnings; my $time f = 9223372036854775809; out of long int range my $year s = 31536000; seconds in year while 1 { my $year = int $time f / $year s + 1970 ; print "unix time: $time f \tyear: $year\n"; $time f++; sleep 1 ; } Problem solved. Devoted fans of parentheses can use Lisp. Now the variable will increment indefinitely with only limitation being the physical memory. The time f f stands for fix can consist of slightly over 1 billion digits per 1GB of memory. However, Linus Torvalds would rather use Debian than program in anything other than C, so if we want to put this into the kernel, we need to get more static. include