I have been working in the embedded world for some time. What worries me is that even new embedded systems come with ancient kernels and stdlibs, most of which won't be y2k38 compatible.
Many of these devices will still be operating in 2038, but long forgotten. Think HVAC control systems, kitchen appliances, security systems, etc. Cars, trains, information signs, traffic lights, many of these public infrastructure systems will fail.
And these systems are very, very hard to update, if possible at all. We'll be having a lot of e-waste in 2038.
Having worked in embedded, I'm perfectly comfortable with horrible kludges that nonetheless solve the problem:
In 2036, factory reset to wipe all state, and keep using the same ancient kernel with a tiny hotpatch to assume 1/1/2035 as time base. If your kitchen appliance is still around by the time that is a problem, you'll get an award ;)
But don't tell anybody, I plan to hawk my consulting skills from 2030-2038 to pad my retirement income. Just like the good old Y2K days & COBOL.
How does the hot patch solve the logistical challenge of installing firmware updates on thousands of devices that generally receive no updates at all?
Am I supposed to pull my microwave out of the wall and ship it back to GE? Does it have a USB port for installing this hot patch? How does GE tell me about it?
Do you care about your microwave showing the correct date? Does your microwave even keep track of the date?
Devices like your microwave won't magically stop working in 2038. For most non-networked and, in 2038, ancient appliances, there shouldn't be that much of a problem.
I think most people replying haven't shopped for appliances in the past 5 years. For example, you have to choose the most basic HVAC system these days to avoid communicating systems with built in smart controls. A fair number of fridges now come with integrated screens. A lot of new homes come with ring door bells and smart security systems. Even washing machines and driers now have built in systems for notifying you when your clothes are done and other such things.
Pedantics would say "well just don't buy this IOT crap," but the problem is that only the bottom line devices come this way in a lot of cases.
What's more, most smart devices will not last until 2038. Planned obsolescence is a standard feature of smart devices product development plans today, especially since fewer and fewer of them are doing anything without cloud integration. If this trend continues, I would bet a kidney that no smart product launched in 2025, regardless of target audience, will still be operating (and be incapable of receiving updates automatically) in 2035.
Protocols would change way before then. 2038 is 19 years in the future. What devices from 2000 are still running, that wasn't running long before 2000?
We've bought one of the cheapest dishwashers we could find, and it came with a feature to connect it to an app using NFC. Granted, the whole EU is "very upper class" compared to most of the world, but it's still quite a huge number of machines.
I think we're all both underestimating and overestimating the problem :)
There are way more "smart" devices (devices with some kind of embedded software and clocks) than we assume, and there are way less of these devices than we fear.
Yeah, but I specifically said non-networked appliances. Most microwaves I know don't even let you input the date. For those that do, and that you still want to keep in 2038, you can just enter a fake, old date.
I understand that there might be some smart microwaves with Wifi and whatever (setting all sentiments about that aside), but those are not what are meant.
I can set the date on my microwave. I just set it to 2040 and it seems to be working fine, so I guess if anyone's really worried about this buy a Kenmore Elite while you still can.
Maybe so it can display the correct time when daylight savings rolls around?
(I'm just trying to guess. Personally I think it's an absurd feature, and on the rare occasion I've had a microwave that even displayed the time, it was always wrong anyway)
First thing that comes to mind is maybe more complicated than anything you can do, but something like running at a certain time 5 days a week to heat up a meal for your kids to eat after school while you're at work. You'd prep said meal and let it sit in there, heated right before it would've been eaten. Although there are a couple issues I can already think of. The microwave is not a fridge. This limits food that could sit there all day. Also, the kids could hit 'start' when they get in the door, so main appeal would be something cooking plus cooling enough to eat by the time they get home, or something with a long cooktime, which would maybe be mashed potatoes or something, and we're still just talking around 5 minutes most likely.
I don't think the Zune was really a networked device. It just literally wouldn't turn on for a day.
Having a date on your microwave could be useful for things like updating the clock for daylight savings time. Or it may be that the clock overflow causes the entire firmware to crash in 2038, bricking an otherwise still functioning device.
"the station's future is in doubt, because it, along with WWVB and WWVH, has been recommended for defunding and elimination in the NIST's Fiscal Year 2019 budget request."
And yet, they're all that way! Hardware RTCs are horrible.
(Well, almost all of them are that way. There are a few, precious few, sane parts that are just a 32-bit counter counting up at one second per second. These, of course, are rare, obscenely expensive, large, and missing useful features like trimming. Sigh.)
I’m willing to accept “the device will function without update” and “the device will be outside its useful life in 2038” as reasons to not be concerned. I am not willing to accept “install a hot patch” as a solution unless it comes with an explanation of how the hot patch will be distributed.
Lets get real. Most of such if not all things will fail and have to be replaced before then. Modern engineering ensures a death date agreeable with the financial department.
> Most of such if not all things will fail and have to be replaced before then.
I'm looking back at the things that I own today that I owned in 2000. (Or, if you're young, consider the things your parents own that they owned in 2000). It's not a ton, but it's not zero either. And we're equidistant to 2038 and to 2000.
I think you (and most of the other replies below) miss the point. The newer the device, the shorter the lifespan. You year 2000 device was built to last much longer than the average equivalent device built today. Planned obsolescence is a staple of consumer society, you have to have a guaranteed reason to replace the item. Breaking down will do that better than anything else.
20 or 40 years ago most people expected their devices to last a lot longer than today. Now if you TV breaks down after 5 years most never bother fixing it and just think "I was due for a new one anyway".
Exactly. My 2013(?) microwave started failing in 2018 - I keep it’s power strip off when it’s not in use and frequently have to cycle it. It replaced a microwave from possibly the mid 90s around 2013. Reliability engineering seems to have matured for planned life cycles.
I gotta say that my middle sister made a nice living polishing COBOL turds for something like a decade. We all thought it would be a sorta of last hurrah but it turned out to be lesson in not underestimating how much folks want to do things in the most painful way possible.
Anyway, I'm sorta skeptical that a whole lot of things that have been running deeply embedded code for a while now will still be running in 2038. Tech changes faster now, hardware isn't designed to last many decades much any more (at least it's the exception rather than the rule), and there's so much of industry that is going to have to change to overcome future challenges that I expect a great many things to taken out of service before then.
Kitchen appliances are the easy and almost ignorable bit. What about:
* controls for railroad track switching
* hardware in air traffic control radars
* hardware that controls elevators
* firmware for traffic lights
* guidance systems in old oil tankers
* pipeline control systems
* oil refinery systems
* industrial food refridgeration systems
Embedded systems are everywhere, and they’re not all trivially dismissed.
Yes, what most programs are interested in is duration from boot time or process start time. Not some human level duration from some arbitrary point in the past.
Programs should just use time since boot. And only bother to convert when offered for human or external consumption.
I dont think is even remotely true; certainly is patently fall for anything involving a financial time. Your claim might be true for logs, but even then, its far more relatable to the person looking at the logs if it is wall clock time. I dont want to have translate every log statement I'm looking at from when the system or process started.
Personally, I deal with trading systems in the US; we record all timestamps in EPT down to microsecond resolution. Currently only deal with US equities, so dont need to worry about DST. I would prefer timestamps were in UTC, but well, legacy systems...
I cover all that in my mention of human consumption.
The point is that there is no necessary _strong_ _low-level_ connection between 'how long ago something happened on this computer' and how many years since the birth of JC.
I wonder how many of these systems would really be sensitive to the clock overflowing to 1901. HVAC, kitchen applications, information signs, traffic lights... they all seem relatively low-risk to me. As long as things still happen in regular intervals, it's hard to imagine a crisis. (I would be surprised if many of these even have synced clocks in the first place, I can imagine them happily thinking it's somewhere in the 1980s and nobody is the wiser.)
Does your system need to connect to a service on the internet? Does that service use an SSL cert?
If so, it almost certainly has a not-before time, and overflowing back to January 1st, 1970 will be before that not-before time. And so any behavior relying on that IoT device connecting to a service will fail.
There is another theory which states that this has already happened.
Recently I brought up an emulated PPC running Mac OS 9. The included copy of Microsoft Internet Explorer couldn't connect to any site that used https -- and virtually everybody uses https these days.
Not supporting SNI will get you a certificate error, but you’ll still be able to connect. What’s more likely is that old IE only supports SSLv3, which is disabled on most servers in light of POODLE.
I’d always assumed they must be connected to support the ability of fire engines to setup route plans or the central traffic management teams to be able to override light sequences.
I see now there are other novel ways of supporting preemption for emergency vehicles, although I’m still unconvinced that’s what our city uses as the lights often preempt several minutes in advance and from over a kilometre away.
Most US preemption devices are just a visible (and sometimes optional infrared) stroke at 80Hz. Visibility to the sensor/receiver device is largely subject to prevailing light (bright day, more challenging, night/shade, then it's easy to pick out the strobe).
In Queensland, Australia it's all an (internal) networked thing, relies on a lot of hardware interacting on IP networks. I can't imagine what'll happen in the 2038 situation - hopefully they've got a good vendor :)
Question, since I've always been curious about this: How difficult would it be to make your own preemption device? Are such things available on online stores?
I'm assuming it's illegal to use one obviously, but I wonder what precautions are used to prevent unauthorized usage, if that can even be disclosed to the public. What's stopping the average joe from getting one from Alibaba?
Honestly, pretty little, other than the risk of being observed. There may be systems that allow for authentication, but I've not seen them (though I'm not an expert).
There is an encoding standard for prioritization that some larger systems use, that mass transit may utilize, but can be overrode by Fire/EMS/LE.
Even if the system isn't calendar aware, if all of a sudden you have negative timestamps you can have strange boundary conditions where loops might run forever, hanging the system.
I imagine that most of those applications are very much tied to the calendar — traffic lights and HVAC systems need to behave differently on different days.
Trying to minimize the amount of broken code that's still running in 2038 is a big part of why people are working hard to fix the problem now.
Maybe we could set them to 1907 and remain happy that near-future leap years and weekdays will align perfectly well. At least until 2100 needs to be skipped as a leap year ;)
Unix epoch: the number of seconds passed since 1 January 1970 and storing it as a signed 32-bit binary integer
The minimum representable date turns out to be on 1901 and zero is a valid value (1 January 1970)... I wonder what problems people with that birth date have? Similar to the person named Null, or Bobby Drop Tables?
The first-generation Zune had a leap year bug that caused it to get stuck in an infinite boot loop on December 31, 2008. Not exactly the kind of thing you want happening to traffic infrastructure.
Even if it has no issues rolling over, a big problem could be that anything that works on a weekly cycle (I imagine traffic lights, HVAC, etc have different schedules for workdays compared to weekends) will skip some days, as Jan 19th 2038 is a Tuesday and Jan 13th 1901 is a Friday.
Following up with this, it is highly unlikely the overflow will happen at midnight, or at the top of an hour. Even if a timezone or clock adjustment is possible on the system leap years and other calendar offsets will be different that can cause some continuing frustration for any workaround with an out of sync clock.
You never know, some devices may start incorporating AI algorithms that make behaviors based on past data, so a consistent timeline can become important even if there should be no inherent reliance on absolute dates.
The rule I follow is the same one I had for Y2K. If there is no interface to enter a date, you don't have to worry about it.
For example, on the sensationalized "documentaries" we had leading up to Y2K, they showed a stream of appliances and gadgets that had processors in them -- hair dryers, microwave ovens, dishwashers, food processors, etc saying they all would be vulnerable. Some of these display the time, but I haven't run across a microwave yet that accepted a date input.
This is great for thinking about the non-internet connected devices. What's also interesting about this idea is that we can test what 2038 will be like by slowly shifting the time for certain networks forward to see if a subset of stuff will fail. If it does, we can resort to turning off systems.
Traffic lights were a concern for Y2K... but it turns out that in the real world, traffic lights just need a day-of-week so they continue to work fine.
I don't think you would need a complete date for that. I would think the modulo 7 of a day counter, with a little extra logic to handle leap year, would be enough.
The 32-bit Unix 2038 end has already been an issue in some fields. For instance, in finance, it was already an issue in 2008 when calculating risk, payments, etc on say a 30 year bond.
"This may seem like a distant problem, but, as Tom Scott recently observed, the year-2038 apocalypse is now closer to the present than the year-2000 problem."
Wow, I knew it was approaching soonish, but that's an eye-opening way of putting it.
I wonder how many pre-2000 kernel versions are being used in devices right this moment.
Well don't insult the people that fixed it and kept it from being a giant problem.
It wasn't a non-event, because it took a lot of effort to make everyone aware of the need to fix the bugs.
It's like routine maintenance except that every single device involved is going to hit problems right about at the same time, with almost no signs of trouble until the exact second it falls over. So it's not harder to fix, but if it's not fixed then it hits vastly harder.
My dad worked for an IT consulting firm in that era - so Y2K literally put a roof over my head and clothes on my back. I didn't see it as insulting. It was important work, everyone understood the urgency, worked diligently on fixing it, and got the job done with a minimum of fuss. The fact that so many people today think of Y2K as an overrated problem is testament to how good of a job everyone did.
“Supporting 32-bit time system calls after 2038” will serve future generations as an example of the lengths that developers are supposed to go to in order to ensure backwards compatibility, even in the face of apparent absurdity.
Alternately, it will serve as a joke about how scared everyone was of breaking things written with our primitive and brittle 21st century programming techniques.
Also, how "X" will always be enough. It May be sufficient for the foreseeabke future, but software engineers are horrible about underestimating how long the software we write will stick around.
Pretty sure I made some short sited decisions as an intern, and most of that code is approaching 20 years old, and I bet it hasnt been fixed or rewritten, because for the time being, it works.
When it comes to the kernel, "We don't break userspace" is explanation enough. Feel free to add swearwords in English or Finnish depending on how you think 68-year-old Linus will feel about the matter.
We launched a crime based RPG game on iOS back in the day that had a leaderboard which tracked in game net worth (cash, investments, etc).
I still remember the day we woke up to multiple emails and lawsuit threats from our top player whose net worth suddenly went negative on the leaderboard.
Our players were very competitive and loved pushing the boundaries by trying to find vulnerabilities, shortcuts, etc so we assumed the worst and thought we had a bug in our system! Turned out to be our JSON parsing library was using integerValue on our NSNumber instances causing the ints to overflow. It was a tough week waiting for Apple to review the app while our players lost faith in us.
Lesson learned :)
(Luckily the player and our community was understanding and stay around)
I really don't like the _NEW suffix, as in SO_TIMESTAMP_NEW, opposed to the normal SO_TIMESTAMP64 naming scheme, as in the function names. But it renders the existing names as old and outdated, so it does make some sense.
It only makes sense from a shortsighted "today's" perspective. What happens if there is another API change? Do you call the new new suffix _NEWER? _NEWNEW?
Thanksfully 64 is the endpoint. "We'll never need 128bit time_t struct's!" Famous last words. But really, we don't. We don't need to mix low precision with high precision times, "one for all" . Calculating in ns does not make sense in the year scale.
This is only for 32-bit systems. 64-bit systems have always used a 64-bit timestamp.
The difficulty is that the ABI defines a 32-bit timestamp on 32-bit kernels so that can't easily be changed without breaking backwards compatibility. That's what this post is about.
So for desktops and servers this has been solved for years already. I don't know how prevalent 32-bit is in embedded versus 64-bit.
The popular Raspberry Pi platform only started shipping with a 64-bit ARM cpu in 2016, and ARM chipsets with 64-bit support only started appearing around 2012/2013. So I'd expect many new embedded platforms to continue using 32-bit systems well into the next decade.
There are still probably billions of devices made each year with 8 bit microcontrollers that are decades old designs. We won't be free of 32bit ARM until the turn of the century.
How much time does moving to 64 nits buy us? it's likely considerable, but I cant help but imagine a time when we have to address this problem for a third time. It seems to me like a more robust solution is possible.
Really? I'm not sure if this is bait or not, but 64b time_t extends the epoch over 200 billion years into the future. I figure we'll handle it in Linux 7.0 or 8.0 at the earliest :P
It's probably not bait. It's easy to intuitively think 64 bits is only double. I do these calculations regularly as security professional (password strength for example) but not everyone does.
> ~2^93 is enough to individually address every subatomic particle on Earth.
IPv6 address exhaustion is very unlikely, but it's more likely than some may have thought about.
Only 64-bit of the 128-bit address space was fully utilized, it means the utilization rate is less than 0.0000000000000000055%. And no, it's not a bug, it's a feature. The huge address space was intended to make address assignment, configuration, and routing easier. That is, in the real world, the first 64-bit part becomes the network identifier, and the last 64-bit becomes the device identifier. Ideally, everyone's home, business, institution, datacenter, etc, will get a unique, globally routable 64-bit network prefix.
So no, every subatomic particle on Earth will not get its own IPv6 address. But, everyone of the 7 billion people on Earth can have prefixes for their 263,524,915 personal computer networks.
Where did you get 2^93? I seem to get 3.6 × 10^51 which is about 2^171. Meanwhile the 128-bit addresses are only enough to give one to each cubic-micron nanobot on Earth (https://www.xkcd.com/865/).
Well, what if you want to measure small fractions of a second? If your timestamps have significantly higher resolution than a nanosecond, you've used up your extra 32 bits. And there is technology that operates on much shorter intervals, like about 10^-18 seconds. While it may not be very relevant today, if you really want to future proof things for the next 1000 years, I think you need around 90 bits or more.
"12 attoseconds is the world record for shortest controllable time"
After further consideration, the ultimate timestamp would be able to denote any point in time measured in Planck units (10^-44 seconds) between the beginning of the universe and its ultimate heat death in about 3 x 10^21 seconds. Therefore 218 bits should be enough for anyone.
Many of these devices will still be operating in 2038, but long forgotten. Think HVAC control systems, kitchen appliances, security systems, etc. Cars, trains, information signs, traffic lights, many of these public infrastructure systems will fail.
And these systems are very, very hard to update, if possible at all. We'll be having a lot of e-waste in 2038.