Jump to content

Y2k for the Linux world is the year 2038

ahhming

It's partly because of mans confidence/arrogance and partly because so far we've managed to avoid major disaster because of prevention, so the standard response is simply "Oh we fixed it before, we'll do it again".

But if we don't fix it then all hell will break loose, see my post above for a possible scenario that could very well happen if we don't protect against it.

One fix we can do is push an update that resets to the 32bit integer to start from a much later time, so instead of resetting to 1/1/1901 it could set it to 2001 and count up from there while keeping the current date, and that would give us roughly another 100 years or so to completely replace every machine this affects. If you're a bit confused by my poor explanation it's basically this.

Currently the 32bit integer starts at 10000000 00000000 00000000 00000000 which to the computer equates to 1/1/1901 and would count up to 31/12/2038 and then reset to 1/1/1901, if we set that same binary number to equal 1/1/2001, and leave it to continue counting with the current date it wouldn't reset until around 31/12/3038, but that might not work for all systems and could break the software being run. (I hope you get it, I know what I mean, but I don't know if I explained it correctly)

 

If this can actually be done, then that is awesome. I actually understood this, which is impressive. Good job, good sir. :D

Main rig on profile

VAULT - File Server

Spoiler

Intel Core i5 11400 w/ Shadow Rock LP, 2x16GB SP GAMING 3200MHz CL16, ASUS PRIME Z590-A, 2x LSI 9211-8i, Fractal Define 7, 256GB Team MP33, 3x 6TB WD Red Pro (general storage), 3x 1TB Seagate Barracuda (dumping ground), 3x 8TB WD White-Label (Plex) (all 3 arrays in their respective Windows Parity storage spaces), Corsair RM750x, Windows 11 Education

Sleeper HP Pavilion A6137C

Spoiler

Intel Core i7 6700K @ 4.4GHz, 4x8GB G.SKILL Ares 1800MHz CL10, ASUS Z170M-E D3, 128GB Team MP33, 1TB Seagate Barracuda, 320GB Samsung Spinpoint (for video capture), MSI GTX 970 100ME, EVGA 650G1, Windows 10 Pro

Mac Mini (Late 2020)

Spoiler

Apple M1, 8GB RAM, 256GB, macOS Sonoma

Consoles: Softmodded 1.4 Xbox w/ 500GB HDD, Xbox 360 Elite 120GB Falcon, XB1X w/2TB MX500, Xbox Series X, PS1 1001, PS2 Slim 70000 w/ FreeMcBoot, PS4 Pro 7015B 1TB (retired), PS5 Digital, Nintendo Switch OLED, Nintendo Wii RVL-001 (black)

Link to comment
Share on other sites

Link to post
Share on other sites

For those arguing about bit-width and counting systems, here is some perspective. The maximum positive number you can represent with 32 bits is (2^32)= 4294967295 (because 0 is one of the represented numbers). 

This number happens to be the number of bytes a 32-bit system can address in RAM (Intel uses some address extensions in the 32-bit architectures in order to mitigate this).

This happens to be the number of bytes in 4 GiB (Gibibytes), the amount of memory in a 4GB RAM stick.

64-bit machines have (2^64) addresses. This happens to be 18,446,744,073,709,551,616 bytes. 18 exbibytes!

We will not be addressing this much RAM for at least a decade even in the largest supercomputers. There is absolutely no point in 128-bit computers.

Software Engineer for Suncorp (Australia), Computer Tech Enthusiast, Miami University Graduate, Nerd

Link to comment
Share on other sites

Link to post
Share on other sites

It's partly because of mans confidence/arrogance and partly because so far we've managed to avoid major disaster because of prevention, so the standard response is simply "Oh we fixed it before, we'll do it again".

But if we don't fix it then all hell will break loose, see my post above for a possible scenario that could very well happen if we don't protect against it.

One fix we can do is push an update that resets to the 32bit integer to start from a much later time, so instead of resetting to 1/1/1901 it could set it to 2001 and count up from there while keeping the current date, and that would give us roughly another 100 years or so to completely replace every machine this affects. If you're a bit confused by my poor explanation it's basically this.

Currently the 32bit integer starts at 10000000 00000000 00000000 00000000 which to the computer equates to 1/1/1901 and would count up to 31/12/2038 and then reset to 1/1/1901, if we set that same binary number to equal 1/1/2001, and leave it to continue counting with the current date it wouldn't reset until around 31/12/3038, but that might not work for all systems and could break the software being run. (I hope you get it, I know what I mean, but I don't know if I explained it correctly)

 

I think your math is a little off here. A 32 bit integer can count to ~4 billion and according to the gift in the OP it is being used to count every second as an integer, meaning a 32 bit integer can count 2^32 seconds or about 136 years. Switching to a 64 bit integer would obviously solve the problem as it could count ~4 billion squared seconds but it won't solve the real problem. There is a reason we don't need 64 bit for everything. Small integrated systems have no need to store data in 64 bits and it would be a waste of money to use 64 bit processors in everything.

 

The simplest solution would probably be to reset the initial date every time the time_t integer reaches it's maximum and instead of having time_t values equate to a date, have it be a count from some other stored date value.

i7 4770k, 16GB Corsair Vengeance

Gigabyte z87, Phanteks Enthoo Primo

7970

Link to comment
Share on other sites

Link to post
Share on other sites

The simplest solution would probably be to reset the initial date every time the time_t integer reaches it's maximum and instead of having time_t values equate to a date, have it be a count from some other stored date value.

That is IMHO not a good long-term solution. What if you have a system that needs to be running 24/7 and you don't have the option to reset it?

Link to comment
Share on other sites

Link to post
Share on other sites

by that time I would hope we have moved on to 256 or 512 bit. if not 1024

Keep in mind how long 16 to 32 took, and that we haven't gone to 64 universally in software yet. I doubt we'd be at 512, and especially not 1024. Most data doesn't need massive word size. We'll probably just have much better multi-precision hardware acceleration, for the limited cases we need it.

 

Keep in mind word size, memory size, and bandwidth are all different things.

CPU: 5820k 4.5Ghz 1.28v, RAM: 16GB Crucial 2400mhz, Motherboard: Evga X99 Micro, Graphics Card: GTX 780, Water Cooling: EK Acetal CPU/GPU blocks,


240mm Magicool slim rad, 280mm Alphacool rad, D5 Vario pump, 1/4 ID 3/4 OD tubing, Noctua Redux 140/120mm fans. PSU: Evga 750w G2 SSD: Samsung 850 Pro 256GB & Seagate SSHD 2TB Audio: Sennheiser HD558s, JBL! speakers, Fiio E10k DAC/Amp Monitor: Xstar DP2710LED @ 96hz (Korean Monitor) Case: Fractal Node 804

Link to comment
Share on other sites

Link to post
Share on other sites

I think your math is a little off here. A 32 bit integer can count to ~4 billion and according to the gift in the OP it is being used to count every second as an integer, meaning a 32 bit integer can count 2^32 seconds or about 136 years. Switching to a 64 bit integer would obviously solve the problem as it could count ~4 billion squared seconds but it won't solve the real problem. There is a reason we don't need 64 bit for everything. Small integrated systems have no need to store data in 64 bits and it would be a waste of money to use 64 bit processors in everything.

 

The simplest solution would probably be to reset the initial date every time the time_t integer reaches it's maximum and instead of having time_t values equate to a date, have it be a count from some other stored date value.

I know it's off, it's just the easiest way to explain it (I didn't actually run the maths on it, I just shifted the dates forward by 100 years) and switching to 64bit would give us a date millions of years into the future, but it's not that simple for embedded system to use a 64bit integer without rewriting the code for the embedded system to use that 64bit integer and doing so could potentially breaking everything, and while it doesn't really make sense for many embedded systems to use 64bit, it is so cheap to use 64bit systems that we might as well eventually replace the current systems over time and just jerry rig a fix in the meantime. and 32bit actually supports 4billion unique numbers if it's an unsigned integer, and 64bit supports 18 quantillion unique numbers, not 4billion, so the date is something like over a billion years for a true 64bit system :)

Thank you though for giving me the actual number of years a 32bit integer can count to, I actually wasn't sure how many it was :)

And besides, the issue isn't about simply updating the systems, it's that most simply can't be updated in the first place, many don't have rewritable firmware/software, many use ROM storage and the amount of RAM is so tiny they might not have the resources spare to store the code required to fix the issue properly.

CPU: Core i5 2500K @ 4.5GHz | MB: Gigabyte Z68XP-UD3P | RAM: 16GB Kingston HyperX @ 1866MHz | GPU: XFX DD R9 390 | Case: Fractal Design Define S | Storage: 500GB Samsung 850 EVO + WD Caviar Blue 500GB | PSU: Corsair RM650x | Soundcard: Creative Soundblaster X-Fi Titanium
Click here to help feed our lasses Pokemon

Link to comment
Share on other sites

Link to post
Share on other sites

by that time I would hope we have moved on to 256 or 512 bit. if not 1024

That's a dumb idea... 

Link to comment
Share on other sites

Link to post
Share on other sites

there is no reason any time soon to go over 64 bit, it would be a waste of space and resources.

Having the clock reset in a few decades seems like a good reason to switch. Not the whole program, just the part responsible for time keeping.

My posts are in a constant state of editing :)

CPU: i7-4790k @ 4.7Ghz MOBO: ASUS ROG Maximums VII Hero  GPU: Asus GTX 780ti Directcu ii SLI RAM: 16GB Corsair Vengeance PSU: Corsair AX860 Case: Corsair 450D Storage: Samsung 840 EVO 250 GB, WD Black 1TB Cooling: Corsair H100i with Noctua fans Monitor: ASUS ROG Swift

laptop

Some ASUS model. Has a GT 550M, i7-2630QM, 4GB or ram and a WD Black SSD/HDD drive. MacBook Pro 13" base model
Apple stuff from over the years
iPhone 5 64GB, iPad air 128GB, iPod Touch 32GB 3rd Gen and an iPod nano 4GB 3rd Gen. Both the touch and nano are working perfectly as far as I can tell :)
Link to comment
Share on other sites

Link to post
Share on other sites

by that time I would hope we have moved on to 256 or 512 bit. if not 1024

We probably would be on either quantum or haven't moved at all.

Computing enthusiast. 
I use to be able to input a cheat code now I've got to input a credit card - Total Biscuit
 

Link to comment
Share on other sites

Link to post
Share on other sites

It's a bigger number. Bigger = better :)

That does not work, because console fan boys say resolution is just a number, 1080p PC < 900p conmsole :D I hate when console fan boys say that. 

 

hope in 2038 there will only be PC.

Computer users fall into two groups:
those that do backups
those that have never had a hard drive fail.

Link to comment
Share on other sites

Link to post
Share on other sites

That's just weird. Why will the OS have a problem when its the BIOS that handles the clock? I know from experience that my old 1992 386 was able to keep running without a hitch through 1999-2001. People panic over nothing.

"We also blind small animals with cosmetics.
We do not sell cosmetics. We just blind animals."

 

"Please don't mistake us for Equifax. Those fuckers are evil"

 

This PSA brought to you by Equifacks.
PMSL

Link to comment
Share on other sites

Link to post
Share on other sites

Change the signed integer to an unsigned integer. That prolongs the issue until 2106. We'll all be dead by then so let someone else fix it.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×