Slashdot Mirror


2016 Bug Hits Text Messages, Payment Processing

An anonymous reader writes "It seems some systems are suffering from a Y2K16 bug. When 2009 ticked over to 2010, some Australian EFTPOS machines skipped to the year 2016. Coincidentally, some Windows Mobile users are also having issues with their new year SMSes coming from 2016. What function could cause this kind of error?"

53 of 340 comments (clear)

  1. Why by Anonymous Coward · · Score: 5, Funny

    Uncle Bill decided to do some coding. That's why.

    1. Re:Why by TheLink · · Score: 2, Interesting

      Nah, it's more likely the same bunch that did excel 2007... Anyone remember the infamous 77.1 * 850 = 100000 Excel 2007 bug? :)

      --
  2. Some kind of... by msauve · · Score: 5, Insightful

    BCD/binary mismatch?

    0x09 = 9 decimal when interpreted as either binary or BCD.

    0x10 = 10 decimal when interpreted as BCD, as 16 when interpreted as binary.

    --
    "National Security is the chief cause of national insecurity." - Celine's First Law
    1. Re:Some kind of... by Anonymous Coward · · Score: 5, Informative

      I don't think you quite have the hang of binary (10 would be 2, not 3).

    2. Re:Some kind of... by kalidasa · · Score: 2, Interesting

      Do *you* often work with years as floats?

    3. Re:Some kind of... by kalidasa · · Score: 4, Funny

      Facepalm. I'm gonna get mauled for this one.

    4. Re:Some kind of... by RichardJenkins · · Score: 2, Informative
      • The decimal number '10' would be encoded in BCD as '1010 0000'
      • '10' is not a valid BCD bitstring
      • When writing in base 2 (binary), '10' is the same number as '2' when writing in base 10
      • putting '0x' before a number indicates that it is written base 16 (hexadecimal)
      • '0x10' is 16 in decimal
    5. Re:Some kind of... by msauve · · Score: 5, Informative

      No, I meant exactly what I said. I didn't say 0b01. 0x10 is the hexadecimal notation for "00010000" binary, which is 16 decimal.

      I used 0x10 because that's standard ANSI C (and ECMA-334 C#), and C is what seems to be spoken on /.. 0b00010000 is non-standard (but allowed by some compilers).

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
    6. Re:Some kind of... by oskard · · Score: 3, Funny

      Take it easy on him. After all, there are only 10 kinds of people in this world.

      --
      Sigs are for Terrorists.
    7. Re:Some kind of... by Anonymous Coward · · Score: 2, Funny

      Give him a break. This whole thread is made of such epic fail that it could only be unforged in Mount Doom.

      10 is 3 in binary indeed...

    8. Re:Some kind of... by ta+bu+shi+da+yu · · Score: 2, Funny

      You know, only yesterday on slashdot did I read a comment that said (in all seriousness) that there "are 11 kinds of people in the world, those who understand binary and those who don't". Facepalm indeed!

      --
      XML is like violence. If it doesn't solve the problem, use more.
    9. Re:Some kind of... by clone53421 · · Score: 3, Insightful

      0x10 is 16 in hexadecimal, not binary

      0x10 is still 16 in binary.

      (0x10 always means 0001 0000 in binary. The question is whether that number is interpreted in BCD, i.e. 10, or as a binary integer, i.e. 16.)

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    10. Re:Some kind of... by clone53421 · · Score: 4, Informative

      Let me see if I can straighten it out, then.

      0x10 is a hexadecimal number, 0001 0000 binary, 16 decimal.
      0x10 is a BCD number, 0001 0000 binary, 10 decimal.

      (BCD is an encoding system, not a base system. In hex or binary it’s given in encoded form, but in decimal it’s given in decoded form.)

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    11. Re:Some kind of... by xaxa · · Score: 3, Informative

      0x10 means 0001 0000.

      0001 0000, if that's a binary number, means decimal 16
      0001 0000, if that's binary coded decimal (BCD), i.e. decimal 0-9 represented as 0000 to 1001, means decimal 10.

      (If 0001 0000 was little endian (with 4-bit groupings) it would mean binary 1)

      1234 in binary (4D2 in hexadecimal) is 0000 0100 1110 0010
      1234 in BCD is 0001 0010 0011 0100

    12. Re:Some kind of... by Mikkeles · · Score: 2, Insightful

      Er, the "11" was in unary!

      --
      Great minds think alike; fools seldom differ.
    13. Re:Some kind of... by mrslacker · · Score: 2, Interesting

      Well, certainly BCD confusion caused a similar problem for RISC OS. Machines have been skipping to 2012. More here:

      http://www.riscository.com/

    14. Re:Some kind of... by Skapare · · Score: 2, Interesting

      Someone obviously reverse engineered it. They saw 0x02 in 2002 and 0x03 in 2003 and assumed it was an 8-bit binary number of years since 2000. They should have read the specs instead to learn it was BCD (a leftover relic from the mainframe era that needed to die over a decade ago). OTOH, the spec designers should have use plain unsigned binary (which would have lasted until 2255 instead of 2099). Or better yet, don't even break up dates into bytes and nybbles; leave them encoded as number of nanoseconds since the epoch, times some scaling factor to fit less resolution in fewer bits as needed.

      --
      now we need to go OSS in diesel cars
    15. Re:Some kind of... by Bigjeff5 · · Score: 2, Interesting

      Just nit-picking here, but the decimal number 10 and the BCD number 0001 0000 would be incorrectly written in hexadecimal as 0x10. The correct conversion, had the programmer kept better track of the formatting he was using is 0x0A. It would have been avoided with a practice like converting everything to binary before converting to hex, even if you think it's already binary. Really though he probably just needed better comments in the code.

      It's basically just a result of not keeping track of your units - it's the same kind of error that destroyed a mars probe a few years back. One guy was talking inches, another guy centimeters, and nobody bothered to write down which units the numbers were for. Calculations for the landing were of by hundreds of yards and the probe smacked into the surface of the planet instead of floating down gently.

      In this case, one guy is talking BCD, another guy assumed binary, and it was no big deal until 2010 rolled around and 10 suddenly became 16.

      --
      Security is mostly a superstition... Avoiding danger is no safer in the long run than outright exposure. - Helen Keller
    16. Re:Some kind of... by Vintermann · · Score: 4, Informative

      > (a leftover relic from the mainframe era that needed to die over a decade ago)

      No no no. Binary coded decimal is necessary and useful. When you divide 1 by 10, you should get 0.1, not 0.10000000000000001 (which is what you get if you for instance open up a python interpreter and ask for 1.0 / 10.0).

      Monetary amounts, and currency conversion rates are examples of something you should never, ever use standard binary floats for.

      Fact: Many major databases use some form of BCD for representing currency values. Enough so that IBM added a dedicated decimal FPU for their power6 series - it's so common on business database servers that it actually saves a lot.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    17. Re:Some kind of... by Mr+Z · · Score: 4, Interesting

      I wouldn't say it's incorrect. It's quite common to represent binary strings as hexadecimal strings regardless of the underlying format. After all, what units would you apply to an x86 opcode? what about a portion of an H.264 bit stream? Or heck, even a floating point number? 0x3F800000 is the hexadecimal representation of the IEEE 754 single precision floating point number 1.0. (And if you don't think people write floating point numbers in hex, think again.

      Now the integer 10 encoded in standard binary format would be 1010, which written in hexadecimal would be A (or 0x0A in C syntax). It also happens to be the same as if you directly went from base 10 to base 16 and ended up with 0x0A. If the decimal number were encoded as BCD, though, the resulting binary string would be written 00010000 (or 0001 0000 if you so choose--the spaces are insignificant!), and that binary string is equivalent to the hexadecimal string 0x10. Note that "hexadecimal string" does not imply base-16 number. It's just a shorter representation than the binary string. It is not equivalent to the hexadecimal number 0x10. When I said "written in hexadecimal", I meant "when written as a hexadecimal string."

      Look at it this way: If I were trying to hex-dump a file full of BCD values and the file had nothing but the value "10" (decimal) over and over in each byte, I would see 0x10 in every byte, not 0x0A. Try it. Go write a 6502 or x86 program that uses that processor's BCD mode, and then do a hex dump of memory. Or better yet, go get a BCD number, and pass it to the "%x" format specifier in your favorite C compiler (or other language that uses C's format specifiers).

      In this case, one guy is talking BCD, another guy assumed binary, and it was no big deal until 2010 rolled around and 10 suddenly became 16.

      I think you mean to say "one guy is talking BCD, another guy assumed standard binary integer. The "B" in BCD is "Binary" after all... Every number stored in the computer is in one binary format or another. Saying "assumed binary" is roughly the same as "assumed the number was stored in a computer." You have to say which format.

    18. Re:Some kind of... by Enter+the+Shoggoth · · Score: 2, Informative

      > (a leftover relic from the mainframe era that needed to die over a decade ago)

      No no no. Binary coded decimal is necessary and useful. When you divide 1 by 10, you should get 0.1, not 0.10000000000000001 (which is what you get if you for instance open up a python interpreter and ask for 1.0 / 10.0).

      Monetary amounts, and currency conversion rates are examples of something you should never, ever use standard binary floats for.

      Fact: Many major databases use some form of BCD for representing currency values. Enough so that IBM added a dedicated decimal FPU for their power6 series - it's so common on business database servers that it actually saves a lot.

      Here's a useful document from Sun on the matter (warning: pdf). The title is absolutely spot on: "What Every Computer Scientist Should Know About Floating-Point Arithmetic"

      --
      Andy Warhol got it right / Everybody gets the limelight
      Andy Warhol got it wrong / Fifteen minutes is too long.
  3. 4-bit years? by Anonymous Coward · · Score: 2, Insightful

    A 4-bit year field? Wrapping from 9 to 0 (16) ?

  4. Microsoft by sopssa · · Score: 5, Informative

    Seems Microsoft is supplying some code for EFTPOS machines that is common with Windows Mobile, so it's most likely the same bug in both.

    1. Re:Microsoft by sopssa · · Score: 3, Informative

      Yes they do (almost in every atm actually).

  5. My wireless landline phones all failed 1/1/2010 by Gorobei · · Score: 4, Interesting

    No dial tone, no incoming calls.

    Had to reset the internal datetimes back to 2007, then they started working again. Nice job, Panasonic.

  6. Text messaging from the future by nurhussein · · Score: 3, Funny

    Imagine that, the ability to text to the past. We could get warnings about impending events! New Text Message From Marty McFly: I HV TO TELL U ABT TEH FUTURE Reply from Doc Brown: WHAT? New Text Message From Marty McFly ON THE NIGHT YOU GO BACK, YOU GET SH*message text missing*

  7. 10 hex is 16 decimal by Anonymous Coward · · Score: 5, Informative

    Could be botched string parsing. Could be binary coded decimals interpreted as binary numbers: BCD encodes two decimal digits in the high and low nibbles of a byte. Therefore BCD 10 is 0001 0000 in binary, which is 16 in decimal.

    1. Re:10 hex is 16 decimal by nycguy · · Score: 5, Informative

      This is almost certainly what it is. The year is stored in an SMS message as a two-digit BCD value, according to this spec. (Click on the link for the "timestamp" field.) Some phones must be treating it as a hex field. (Note that most other fields in the SMS message are in hex.)

    2. Re:10 hex is 16 decimal by Posting=!Working · · Score: 3, Interesting

      Can someone tell me what the advantage of swapped nibble encoding are? Other than just being annoying as fuck when you're trying to decode it?
      For those too lazy to read the link , swapped nibble encoding is
      "BCD code where nibbles within octet is swapped. E.g.: 0x31 Represents value of 13"

      So for the format YY MM DD HH MM SS TZ (Time zone in 15 minute increments from GMT) instead of 10 01 03 10 11 43 24 for 2010 Jan 3 10:11:43 time zone 24 (GMT +6) you get the identical data but in the less readable form of 01 10 30 10 11 34 42 (and now it can be confused for 2001 Oct 30 10:11:34 AM. Bonus!)

      It's just complete idiocy to me. Is there some reason you'd want the date/time stamp slightly harder to read?

      --
      This sentence no verb.
    3. Re:10 hex is 16 decimal by Anonymous Coward · · Score: 2, Insightful

      That may be an attempt to distinguish the BCD values from normal binary numbers. The only value for which swapped nibble encoding equals binary encoding is 0, so a test-case would catch a misinterpretation easily. I've seen a unit test which tests the algorithms with 2005 for the year. That test will not catch an error in a single-byte-year algorithm which mistakes non-swapped BCD for binary or vice versa.

    4. Re:10 hex is 16 decimal by Pembers · · Score: 4, Informative

      The specification for the SMS message format pre-dates Y2K by about 15 years. I came across it in 1995 (and thought it was useless - what sort of idiot would try to fit a message into 160 characters? And who would want to type it on a 12-button keyboard?). Where I worked, nobody worried about Y2K until about 1998.

    5. Re:10 hex is 16 decimal by clone53421 · · Score: 2, Informative

      It makes a lot more sense in little endian.

      --
      Alexander Peter Kristopeit bought his basement from his mommy for one dollar.
    6. Re:10 hex is 16 decimal by Vintermann · · Score: 3, Funny

      > what sort of idiot would try to fit a message into 160 characters?

      If we find the answer, twitter will finally make sense.

      --
      xkcd is not in the sudoers file. This incident will be reported.
    7. Re:10 hex is 16 decimal by Anonymous Coward · · Score: 4, Informative

      The endianness may make it more sensible. If you have 0x12345678 represented using the correct endianess (the Intel one, not the Sun one), it'll be stored as 0x78563412. Using reverse nibble notation, it'll be 0x87654321.

      But as far as I remember, it is caused by oldold ties to the 4004, which was a 4-bit CPU, inherited via the 8008 and 8080 by the 8086 and 8088.

    8. Re:10 hex is 16 decimal by Megane · · Score: 2, Interesting

      What? I looked at someone else's link showing the SMS data format, and it is quite clear and consistent. Dates are six nibbles of BCD, with the low nibble coming first in both the date and phone number. The year is in exactly the same format as the month and day: two BCD digits. It's not their fault that so many programmers were morons and couldn't comprehend to process the year (before adding the century) in exactly the same way as the month and day.

      As for "lessons learned from Y2K", this is not a situation where you are keeping old data for years and years, nor are you doing date arithmetic or sorting of 50+ years range, not even ten years. Nobody's birthdate will be in the timestamp of an SMS message, nor will the expiration date of their credit card. As a timestamp, the century is explicitly implied* by context, the context being that of the calendar that's hanging on the wall of your cubicle.

      If someone were to make a database with years of SMS messages and not include the century as messages were added to the database, then yes, that would be a problem. But it would not be a problem with the SMS message format. When the year 2100 rolls around, and assuming we're even still using SMS, the worst that would happen is "hundred year old" text messages. At least then the low two digits would still be right, unlike the current "2016" stupidity.

      *that's an awesome combination of words

      --
      #naabhaprzrag, #sverubfr-000, #agi-fcbafberq, negvpyr[pynff*=' negvpyr-ary-'] { qvfcynl: abar !vzcbegnag; }
    9. Re:10 hex is 16 decimal by hawk · · Score: 2, Funny

      somany ppl mock the bran-dead twits just for having n0thing 'mportant to say, fu
      elishly beleafing that 160 char messagesis senless. In fact, the explanation is

  8. Official explanation by Anonymous Coward · · Score: 5, Funny

    It's to avoid the world ending in 2012 by skipping straight to 2016. We've left a few years either side of the fateful date as a safety buffer.

  9. Its the LHC! by rescendent · · Score: 2, Funny

    The beam collisions have opened a portal into the future...

  10. Re:Future SMS by CharlyFoxtrot · · Score: 4, Funny

    I did but all they told me was that I talk like a fag and my shit's all retarded.

    --
    If all else fails, immortality can always be assured by spectacular error.
  11. * points finger at Duct Tape Programmers by amn108 · · Score: 5, Funny

    Time to quote Joel (from www.joelonsoftware.com):

    Jamie Zawinski is what I would call a duct-tape programmer. And I say that with a great deal of respect. He is the kind of programmer who is hard at work building the future, and making useful things so that people can do stuff. He is the guy you want on your team building go-carts, because he has two favorite tools: duct tape and WD-40. And he will wield them elegantly even as your go-cart is careening down the hill at a mile a minute. This will happen while other programmers are still at the starting line arguing over whether to use titanium or some kind of space-age composite material that Boeing is using in the 787 Dreamliner.

    When you are done, you might have a messy go-cart, but it’ll sure as hell fly.

    Hey, Jamie! Your proprietary date datatype didn't fly! Would you please turn around and fix it?

    1. Re:* points finger at Duct Tape Programmers by daveime · · Score: 4, Insightful

      Yes, but that's just the point isn't it ?

      There are 10 types of people ...

      1. Those who will make a solution that will work for perhaps 30 or 35 years, because it is "good enough" for the foreseeable future, ala Y2K, 2032 for linux etc ...

      2. Those who will want to do unit tests to see if the date function still works in the year 9500, and won't pass it through QA until it does.

      Now, consider the PHB, when you tell him that solution 1 will be up and running in 5 minutes, whereas solution 2 will be up and running in about 5 years, once the specification has been formalized and ratified by the UN security council.

      Which solution will the PHB choose I wonder ? Programming has always been a compromise, no one *really* expects that something they code today will still be around in 35 or 40 years, it's only occasionally that something *does* survive that long (COBOL legacy systems etc), and come and bite us in the ass when the new millenia arrives.

      Having said that, I wonder how many of the "buzzword" languages we see today will still be around in the next 40 years ? The concept of longevity might have been relevant in the 60's, these days it's more a case of a complete rewrite every year or so.

    2. Re:* points finger at Duct Tape Programmers by Blakey+Rat · · Score: 2, Informative

      It is just that I do also think the type of error the 2016 bug is can indeed be attributed to the "duct tape programming" attitude.

      But that's exactly what Jamie *isn't* talking about. He never said anything about not designing the system, or doing the design ad-hoc, all he's saying is two things:

      1) If your code is too complex, uses too many obscure language features, or has a structure that can't easily fit in the average person's head, it's likely to be more buggy since some of your team will never fully understand it. (Or, if they do now, future maintainers may not.) Basically, the coding equivalent to Keep It Simple, Stupid.

      2) The number one feature of any application is "it shipped." It doesn't matter how great your program is if it's vaporware.

      Neither of those two points have anything at all to do with this bug.

      The word "duct-tape" leads people to think that the philosophy has something to do with coding by the seat of your pants. "Oh this function isn't designed right, I'll just put a couple globals in this file to get the right params" or something like that. Not only is that not in the interview with Jamie, but even Joel's article doesn't say anything like that.

      When you choose a name like "duct-tape programmer" you're basically guaranteeing that people are going to misread the article, as I believe you have. Anyway, best to ignore that particular work of Joel's and go straight to the interview with Jamie in the first place, if you want the real story.

      This particular bug is simply a case of misreading a confusing spec in a subtle, and nobody catching it for years. That could happen regardless of your method or philosophy. Anybody coming into this and saying "oh unit tests would have nailed this!" or "oh that would never happen with Scrum!" is just cheerleading their favorite concept.

  12. You could mess with people! by olsmeister · · Score: 3, Funny

    Bob- Happy Nw Yr! What a decade so far. Cubs winning the series, and who would have predicted that the Mayan calendar was really right? Glad I loaded up on all the MSFT back in '10. Are you going to visit your wife's grave next week for the 6th anniversary? kthx!

  13. Re:Future SMS by Runaway1956 · · Score: 4, Funny

    Should have fed them a politician. Al Gore comes to mind.

    Msge to fleet command: Avoid the 3rd rock, the inhabitants taste like shit!

    --
    "Windows is like the faint smell of piss in a subway: it's there, and there's nothing you can do about it." - Charlie Br
  14. and they can bill you the future rate as well by Joe+The+Dragon · · Score: 2, Funny

    and they can bill you the future rate as well. In the Year 2016 texts are $2 each way. and your bill in 6 years past due.

  15. WHY DO PEOPLE INSIST UPON REPLACING THE FIRST ZERO by Anonymous Coward · · Score: 2, Interesting

    It is 2016, not 2k16. Is there something cool about replacing a zero with a k now?
     
    Any EE will tell you that 2k16 means 2.16k or 2160. How does this garbage continue making it to the front page?

  16. Re:WHY DO PEOPLE INSIST UPON REPLACING THE FIRST Z by Chabil+Ha' · · Score: 3, Interesting

    No to mention Y2K was a pun of sorts for shortening 2000 to three bytes from four. Now we're taking more space than the original; Y2K16 vs 2016. Those COBOL programmers would be rolling in their graves.

    --
    We're all hypocrites. We all have hidden parts, it's the contrast between them that make us more a hypocrite than others
  17. MESSAGE FROM THE FUTURE by ub3r+n3u7r4l1st · · Score: 2, Insightful

    This is an indication that the human race will survive 2012! Rejoice!

  18. no that's a Y210 bug by rubycodez · · Score: 3, Informative

    Y bugs are named for the year in which they occur, not the year they jump....otherwise Y2K would have been Y1.9K, or even better YMCM

    1. Re:no that's a Y210 bug by Dimitrii · · Score: 2, Insightful

      Mod points, I wish I had them.

  19. This is a comment from 2016 by Anonymous Coward · · Score: 2, Funny

    Hi, guys!

    Due to a glitch in your space-time continuum, some of us have found ways to contact you. I just wanted to let you guys know that we are yet to invent flying cars.

    Please plan your expenses accordingly. That is all. Goodbye, past-commenters!

  20. Re:WHY DO PEOPLE INSIST UPON REPLACING THE FIRST Z by osu-neko · · Score: 3, Insightful

    Any EE will tell you that 2k16 means 2.16k or 2160. How does this garbage continue making it to the front page?

    Actually, most EE's I know are smarter than that. The fact that X means Y in some contexts does not mean X means Y in all contexts. Most competent speakers of the language have no trouble determining meaning, taking context into account. It's rare that someone manages to get an EE while lacking the level of intelligence required to do that.

    --
    "Convictions are more dangerous enemies of truth than lies."
  21. Re:Just shows... by Nefarious+Wheel · · Score: 2, Funny
    Oooh you had LED displays? Sheer luuxury, mate. We used Nixie tubes and loved it. 256 bytes of memory? You gotta be jokin, mon. Who could afford that much memory?

    I don't think I have a lawn any more.

    --
    Do not mock my vision of impractical footwear