Stories
Slash Boxes
Comments

SoylentNews is people

SoylentNews is powered by your submissions, so send in your scoop. Only 6 submissions in the queue.
posted by martyb on Wednesday January 22 2020, @05:18PM   Printer-friendly
from the here-we-go-again dept.

Steven Bellovin, Professor of Computer Science at Columbia University writes briefly with a concrete example of how the Y2038 threat works.

[...] just as with Y2K, the problems don't start when the magic date hits; rather, they start when a computer first encounters dates after the rollover point, and that can be a lot earlier. In fact, I just had such an experience.

A colleague sent me a file from his Windows machine; looking at the contents, I saw this.

$ unzip -l zipfile.zip
Archive: zipfile.zip
Length Date Time Name
——— ——— ———
2411339 01-01-2103 00:00 Anatomy...
——— ———

Look at that date: it's in the next century! (No, I don't know how that happened.) But when I looked at it after extracting on my [MacOS] computer, the date was well in the past:

$ ls -l Anatomy...
-rw-r-r-@ 1 smb staff 2411339 Nov 24 1966 Anatomy...

Huh?

After a quick bit of coding, I found that the on-disk modification time of the extracted file was 4,197,067,200 seconds since the Epoch. That's larger than the limit! But it's worse than that. I translated the number to hexadecimal (base 16), which computer programmers use as an easy way to display the binary values that computers use internally. It came to FA2A29C0. (Since base 16 needs six more digits than our customary base 10, we use the letters A–F to represent them.) The first "F", in binary, is 1111. And the first of those bits is the so-called sign bit, the bit that tells whether or not the number is negative. The value of FA2A29C0, if treated as a signed, 32-bit number, is -97,900,096, or about 3.1 years before the Epoch. Yup, that corresponds exactly to the November 24, 1966 date my system displayed. (Why should +4,197,067,200 come out to -97,900,096? As I indicated, that's moderately technical, but if you want to learn the gory details, the magic search phrase is "2's complement".)

While attention is paid to desktops and servers, they are easy to replace and have very short lifetimes. In contrast embedded systems should be receiving special action already since they are seldomly or never updated and have lifespans measured in decades.

Previously:
Reducing Year 2038 Problems in curl (2018)
The Time Is... 1500000000 (2017)


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
(1)
  • (Score: 3, Funny) by Snow on Wednesday January 22 2020, @05:46PM (8 children)

    by Snow (1601) on Wednesday January 22 2020, @05:46PM (#946908) Journal

    I remember reading an article just before Y2K that listed things that should work or not work after the rollover. There were things like lawnmowers and toasters and blenders on that list.

    Will my Bic pen be affected by Y2038? (Seriously though, it wouldn't be out of the question to have a microchip embedded into pens in the future... This pen is valid for 10,000 words and must not be used for hate speech!)

    • (Score: 0) by Anonymous Coward on Wednesday January 22 2020, @05:49PM (6 children)

      by Anonymous Coward on Wednesday January 22 2020, @05:49PM (#946909)

      In 2038 I'll be 79 years old and won't give a flying f*ck about computers.

      • (Score: -1, Troll) by Anonymous Coward on Wednesday January 22 2020, @06:56PM

        by Anonymous Coward on Wednesday January 22 2020, @06:56PM (#946944)

        You may, if there is a computer doing "AI" on your death panel.

      • (Score: 1) by ze on Wednesday January 22 2020, @07:03PM

        by ze (8197) on Wednesday January 22 2020, @07:03PM (#946950)

        How do you figure? You think you'll be spending your time running around risking falls when you're old and feeble and VR is perfected?

      • (Score: 2) by edIII on Wednesday January 22 2020, @11:29PM (1 child)

        by edIII (791) on Wednesday January 22 2020, @11:29PM (#947089)

        Uh-huh. Old farts used to say that about the Internet too. However, just about everything runs on computers these days. Fuck, farming now even involves computers on these massive tractors.

        When I'm a little older perhaps I won't care, but that's because I'm getting ready to live out in the middle of nowhere where we've been practicing living without technology.

        In other words, unless your Amish now, you're going to have to care about the state of computing.

        --
        Technically, lunchtime is at any moment. It's just a wave function.
        • (Score: 0) by Anonymous Coward on Thursday January 23 2020, @01:38AM

          by Anonymous Coward on Thursday January 23 2020, @01:38AM (#947157)

          In other words, unless your Amish now, you're going to have to care about the state of computing.

          Why should I care about something I can't change?
          Besides, it's more likely that the state of computers (or is it "computers of the state"?) will care about me until then.

      • (Score: 0) by Anonymous Coward on Thursday January 23 2020, @04:18AM

        by Anonymous Coward on Thursday January 23 2020, @04:18AM (#947228)

        I'll be long gone, but i would be under 60, so am unable to give a flying fuck about computers.

      • (Score: 3, Insightful) by maxwell demon on Thursday January 23 2020, @02:14PM

        by maxwell demon (1608) on Thursday January 23 2020, @02:14PM (#947386) Journal

        Are you sure? You might need to visit the hospital. Lots of computerized machines there. Or maybe you'll have a medical implant (like a pacemaker) that contains a small embedded system.

        You almost certainly will need to have money. And you most likely will have most of it on a bank account. Managed by computers. You also might want to use your credit card. Where all transactions go through computers. And even if you only use cash stored at home (assuming that will still be possible), what do you think controls all those cash tills? Right, computers.

        You might still want to drive around in a car. All cars will be controlled by computers, even if not self-driving. Indeed, cars built today are full of computers, so even if you just keep a current car, you may be affected as well.

        Depending on where you live, you will want to have heating in the winter. Which most likely will be controlled by a computer.

        When did you buy your microwave oven? Unless it's pretty old, it almost certainly has a computer inside.

        Oh, and what do you think controls that power plant you get your electricity from?

        --
        The Tao of math: The numbers you can count are not the real numbers.
    • (Score: 2) by janrinok on Wednesday January 22 2020, @06:56PM

      by janrinok (52) Subscriber Badge on Wednesday January 22 2020, @06:56PM (#946945) Journal
      No, but your smart printers might not work anymore. I'm still using a laser printer purchased second hand in 2002. HP4050 and it just keeps on going.
  • (Score: 3, Informative) by Anonymous Coward on Wednesday January 22 2020, @06:05PM (2 children)

    by Anonymous Coward on Wednesday January 22 2020, @06:05PM (#946916)

    Cheap capacitors in modern electronics will overflow and kill the devices well before the date.

    • (Score: 2) by DannyB on Wednesday January 22 2020, @07:31PM (1 child)

      by DannyB (5839) Subscriber Badge on Wednesday January 22 2020, @07:31PM (#946967) Journal

      Ceramic capacitors will not overflow if you make their internal volume large enough. This will depend on the ceramic spinning wheel and, the skill of the artist, and the type of kiln used.

      --
      When trying to solve a problem don't ask who suffers from the problem, ask who profits from the problem.
      • (Score: 2) by maxwell demon on Thursday January 23 2020, @02:16PM

        by maxwell demon (1608) on Thursday January 23 2020, @02:16PM (#947389) Journal

        But what about flux capacitors?

        --
        The Tao of math: The numbers you can count are not the real numbers.
  • (Score: 1) by chuckugly on Wednesday January 22 2020, @06:43PM (3 children)

    by chuckugly (2910) on Wednesday January 22 2020, @06:43PM (#946931)

    When everyone was in a panic about Y2K I told anyone who asked that it was 2038 we needed to think about, Y2K was not a big deal. With 18 years to go and people being aware of it now I don't expect 2038 to be a big deal but I expect a few old gizmos to break in entertaining ways.

    • (Score: 2) by DannyB on Wednesday January 22 2020, @07:26PM (1 child)

      by DannyB (5839) Subscriber Badge on Wednesday January 22 2020, @07:26PM (#946965) Journal

      I don't expect 2038 to be a big deal but I expect a few old gizmos to break in entertaining ways.

      Old gizmos maybe. But if those old gizmos had been IoT gizmos, then there would be nothing to worry about based on my observations of the high standards of quality and reliability present in IoT firmware.

      --
      When trying to solve a problem don't ask who suffers from the problem, ask who profits from the problem.
      • (Score: 0) by Anonymous Coward on Thursday January 23 2020, @04:00PM

        by Anonymous Coward on Thursday January 23 2020, @04:00PM (#947470)

        There will never be anything to worry about with "old IoT gizmos", because the cloud servers they rely on will be shut down to force consumption of new gizmos long before the gizmos get "old".

    • (Score: 2) by driverless on Friday January 24 2020, @02:35PM

      by driverless (4770) on Friday January 24 2020, @02:35PM (#947939)

      There was a vast amount of stuff in 2000 that wasn't affected because it didn't use decimal dates, in particular SCADA and embedded.

      This is the exact stuff that uses 32-bit time fields that end in 2038.

  • (Score: 5, Insightful) by DeathMonkey on Wednesday January 22 2020, @06:44PM (3 children)

    by DeathMonkey (1380) on Wednesday January 22 2020, @06:44PM (#946934) Journal

    Just a reminder that Y2K wasn't a disaster because we identified the problem then fixed it.

    The fact that no disasters happened is not evidence that the threat was fake.

    • (Score: 1) by chuckugly on Wednesday January 22 2020, @08:03PM (1 child)

      by chuckugly (2910) on Wednesday January 22 2020, @08:03PM (#946983)

      I disagree. It would never have been a disaster, it would have been a series of minor inconveniences.

      • (Score: 2, Insightful) by Anonymous Coward on Wednesday January 22 2020, @08:17PM

        by Anonymous Coward on Wednesday January 22 2020, @08:17PM (#946988)

        it would have been a series of minor inconveniences

        When one bank loses its retail transaction services, for four hours that happen to include lunch-time, it's a shit-storm of soshalmeedya flurry and headline national news. As someone who shops with cash I find it endlessly entertaining. As someone who has seen bank IT up close and personal, I find it disturbing to see people *that* dependent on that much poorly run tech. I fear that a three day inconvenience to me would be catastrophic to many.

    • (Score: 2) by DavePolaschek on Thursday January 23 2020, @01:06PM

      by DavePolaschek (6129) on Thursday January 23 2020, @01:06PM (#947359) Homepage Journal

      What you mean "we," Kemo Sabe? I sure wasn’t working on y2k stuff.

  • (Score: 2) by Mykl on Wednesday January 22 2020, @09:13PM (5 children)

    by Mykl (1112) on Wednesday January 22 2020, @09:13PM (#947017)

    ...but have any distros moved the system date to a 64-bit integer yet?

    • (Score: 1, Informative) by Anonymous Coward on Wednesday January 22 2020, @11:59PM (3 children)

      by Anonymous Coward on Wednesday January 22 2020, @11:59PM (#947105)

      Post C11, it should be a Real [cppreference.com].

      • (Score: 2) by jb on Thursday January 23 2020, @05:38AM (2 children)

        by jb (338) on Thursday January 23 2020, @05:38AM (#947259)

        Post C11, it should be a Real [cppreference.com].

        A floating-point representation of time? No thanks, with timestamps accuracy matters far more than precision.

        • (Score: 2) by maxwell demon on Thursday January 23 2020, @02:34PM (1 child)

          by maxwell demon (1608) on Thursday January 23 2020, @02:34PM (#947402) Journal

          A floating-point representation of time? No thanks, with timestamps accuracy matters far more than precision.

          “Real” does not imply floating point; also integer types are real types. Note that it replaced the former “arithmetic” which also didn't rule out, but also didn't imply floating point.

          My guess is that this is related to the introduction of complex number types which would also be included in “Arithmetic”. You don't want the time to be stored in complex number variables.

          Anyway, storing time in floating point isn't that bad if the floating point type is large enough. For example, the IEEE double has a 52 bit mantissa (this doesn't include the sign bit), therefore it can represent all numbers up to 252 exactly (note that there's no “−1” missing, the smallest positive integer that cannt be represented exactly is 252+1). That is, the first second that cannot be represented exactly would be more than 142 million years after the epoch. And for the next about 142 thousand years, times can be stored accurately down to the millisecond.

          I think it is a safe bet that until then, no current system will still be in use.

          --
          The Tao of math: The numbers you can count are not the real numbers.
          • (Score: 2) by maxwell demon on Thursday January 23 2020, @02:44PM

            by maxwell demon (1608) on Thursday January 23 2020, @02:44PM (#947411) Journal

            Correction: The mantissa of IEEE double is 53 bits (although only 52 get stored because the initial one is always 1), therefore I underestimated the maximal times by a factor of 2.

            --
            The Tao of math: The numbers you can count are not the real numbers.
    • (Score: 2) by jb on Thursday January 23 2020, @05:36AM

      by jb (338) on Thursday January 23 2020, @05:36AM (#947255)

      ...but have any distros moved the system date to a 64-bit integer yet?

      Yes, responsible OSes do exist. At least one switched to 64bit time_t way back in 2014 [openbsd.org].

(1)