Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror
×
Bug The Internet IT News

Amazon Explains Why S3 Went Down 114

Angostura writes "Amazon has provided a decent write-up of the problems that caused its S3 storage service to fail for around 8 hours last Sunday. It providers a timeline of events, the immediate action take to fix it (they pulled the big red switch) and what the company is doing to prevent re-occurrence. In summary: A random bit got flipped in one of the server state messages that the S3 machines continuously pass back and forth. There was no checksum on these messages, and the erroneous information was propagated across the cloud, causing so much inter-server chatter that no customer work got done."
This discussion has been archived. No new comments can be posted.

Amazon Explains Why S3 Went Down

Comments Filter:
  • by thrillseeker ( 518224 ) on Saturday July 26, 2008 @04:34PM (#24351385)
    a single bit?! I think there are some serious design deficiencies ...
    • by Daimanta ( 1140543 ) on Saturday July 26, 2008 @04:37PM (#24351415) Journal

      It was the evil bit...

    • by Ctrl-Z ( 28806 ) <(tim) (at) (timcoleman.com)> on Saturday July 26, 2008 @04:43PM (#24351465) Homepage Journal
      Thank you Capt. Obvious. A single bit is enough to cause a cascading failure, and someone overlooked this instance. It's not the first time, nor will it be the last. See New York City blackout of 1977 [slashdot.org], The Crash of the AT&T Network in 1990 [dmine.com], et al.
      • by Ctrl-Z ( 28806 ) <(tim) (at) (timcoleman.com)> on Saturday July 26, 2008 @09:13PM (#24353811) Homepage Journal
        Actually, that should have been Northeast Blackout of 1965 [wikipedia.org]. But you already knew that.
        • I thought that was caused by the bouncy-ball "gift" from the Great Collector. (He thought it was funny as hell....)

          • I thought that was caused by the bouncy-ball "gift" from the Great Collector. (He thought it was funny as hell....)

            He apparently thought we WERE hosting an intergalactic kegger down here.

      • ECC memory, anyone? (Score:4, Interesting)

        by Maxmin ( 921568 ) on Saturday July 26, 2008 @09:35PM (#24353981)

        I hafta wonder if the bit flipped due to a bad RAM stick?

        We use MD5 checksums throughout the system, for example, to prevent, detect, and recover from corruption that can occur during receipt, storage, and retrieval of customers' objects. However, we didn't have the same protection in place to detect whether this particular internal state information had been corrupted.

        Nothing specific about *what* caused the bit to flip.

        This comes to mind only because bad RAM on a new server at work caused installation of a stock Perl module to throw excessive errors during the XS compile phase - the same package installed without error on an identical machine 20 minutes earlier. Took over an hour before we realized it was probably hardware. Memtest86 [memtest86.com] quickly turned up the problem.

        Would hashes and the like protect against RAM suddenly going south? Wouldn't any piece of data that passes through main memory be vulnerable to corruption? Makes me wonder why ECC memory [wikipedia.org] isn't being used much anymore... we have various flavors of RAID to protect slow memory from corruption, but not many machines I see have ECC anymore.

        • by this great guy ( 922511 ) on Saturday July 26, 2008 @10:26PM (#24354399)
          Even ECC memory isn't a panacea. ECC can only correct 1-bit errors. It can't correct 2-bit errors (only detect them) and can't even detect nor correct 3-bit (or more) errors. To the poster that seemed to think a 1-bit error causing a downtime is a sign of a defective design: the truth is that 99.9% of the software out there doesn't even try to work around data corruption issues. One can easily introduce 1-bit errors capable of crashing virtually any app. For example by flipping 1 bit of the first byte of the MBR (master boot record) of an OS, it can make it unbootable (it changes the opcode of what is usually a JMP instruction to something else).
          • by Maxmin ( 921568 ) on Sunday July 27, 2008 @12:13AM (#24355029)

            ECC can only correct 1-bit errors. It can't correct 2-bit errors (only detect them) and can't even detect nor correct 3-bit (or more) errors.

            No, that's just one kind of memory system. There are a number of designs, and recovery also depends on the kind of error. IIRC, one design is somewhat similar to the CD Red Book spec, in that the bits for a given byte are distributed around - a physical byte is composed of bits all from different memory locations. If part or all of one byte goes bad, the rest of the bits and the parity code are unchanged, and the affected bytes can be reconstructed.

            Also like Red Book CDs are multiply redundant memory systems, with -just what it sounds like- multiple copies of each byte, and the memory controller arbitrates differences. CDs effectively contain three copies of the data, striped and parity encoded. That's how scratched CDs can still operate error-free (sometimes.) The space shuttle's computer systems are relatively fault-tolerant - multiple redundant computers all running the same programs and data, with a fourth computer evaluating the output of the other computers, looking for failures.

            Where there's a will, there's a way, but the will in the mainstream x86 server industry to build truly fault-tolerant computers is slim. It's a specialty, and that makes it very expensive. Stratus [stratus.com], for example, makes a line of fault-tolerant servers [stratus.com], with some of the fail-over in hardware, so they make their 99.999% uptime claim (about 5 minutes downtime per year.)

            "Five nines [wikipedia.org]" is a claim I've heard from most top-dollar *nix hosting companies, but have *never* experienced - it's generally been hours of downtime per year. Not even their network infrastructure gets close to 99.999% uptime! Cadillac prices, but downtime contingency planning is all up to the client, even with "managed hosting." They all suck.

            • Re: (Score:3, Informative)

              by iluvcapra ( 782887 )

              No, that's just one kind of memory system. There are a number of designs, and recovery also depends on the kind of error. IIRC, one design is somewhat similar to the CD Red Book spec, in that the bits for a given byte are distributed around - a physical byte is composed of bits all from different memory locations.

              Red Book audio CDs, Sony MiniDisks and DATs all use a form of Cross-Interleaved Reed-Solomon [wikipedia.org] coding, which is has the nice characteristic of being able to use the fact that a piece of information i

              • by Maxmin ( 921568 )

                That's a really interesting distinction. If I'm reading right at this hour, you're saying that the read device is able to distinguish between on, off and bad media? Something a RAM chip or memory controller can't do, I imagine, because it's receiving a signal from deep inside ... good or bad, the media's read indirectly.

                FSM-damn, there are knowledgeable folk here on /.

          • Re: (Score:3, Informative)

            by afidel ( 530433 )
            All decent servers use multibit ECC and the better ones are using IBM's chipkill technology which is basically RAID for ram, it uses an extra memory chip to do parity calculations.
    • For want of an unflipped bit a server was lost.
      For want of a server gossip was lost.
      For want of gossip clusters were lost.
      For want of clusters revenues ceased.
      All for want of an unflipped bit.
           

    • You have no idea... (Score:1, Interesting)

      by Anonymous Coward

      As someone who worked at Amazon as a software engineer for over three years in various backend areas, I can say that without a doubt, Amazon's code and production quality is so horrible, that it's hard to believe.

      Engineers carry pagers and, in many groups, are constantly paged. The only thing that keeps the systems running is a bunch of junior engineers responding in the middle of the night, fixing databases, bouncing services, etc., etc. Engineers are rarely, if ever, given the chance to actually *fix* thi

    • by iamhassi ( 659463 ) on Saturday July 26, 2008 @08:38PM (#24353593) Journal
      FTA:
      "On Sunday, we saw a large number of servers that were spending almost all of their time gossiping and a disproportionate amount of servers that had failed while gossiping. With a large number of servers gossiping and failing while gossiping, Amazon S3 wasn't able to successfully process many customer requests."

      sounds like a restaurant, gossiping servers were failing to process customer requests
  • Simple (Score:3, Insightful)

    by gardyloo ( 512791 ) on Saturday July 26, 2008 @04:46PM (#24351511)

    S3 is a total slut.

    • Aw. And it appears that this has been posted from the not-mere-sluttiness dept. It appears that slashdot editors already stooped to the lowest from of humor in posting the headline, and I've just fallen into their redundancy trap. Tricky, tricky!

  • by fahrbot-bot ( 874524 ) on Saturday July 26, 2008 @05:03PM (#24351681)

    A random bit got flipped in one of the server state messages...

    Cosmic Rays perhaps? I guess they could line the room with lead, or simply re-market S3 as a Neutrino detector [wikipedia.org]. :-)

    • Re: (Score:3, Insightful)

      by erc ( 38443 )

      Or they could checksum their UDP packets. The entire packet, not just the customer payload. Duh.

      • Re: (Score:3, Interesting)

        by spinkham ( 56603 )

        There's probably information that changes as the packets move around, and they probably wanted to avoid the overhead. I'm guessing it was a deliberate design decision, but it turned out to be the wrong one. It's easy to see that after a failure, but it's hard to design large distributed systems and foresee every possible way things can break, and where the computation overhead is worth it. The number of interactions between servers here makes any small design flaw a big thing.

        • If by "deliberate design decision" you mean "laziness," yeah, I'll buy that.
          • by spinkham ( 56603 ) on Saturday July 26, 2008 @09:43PM (#24354047)

            No, I mean favoring speed and computational simplicity over error detection.
            It is often a valid trade off. For example, most filesystems do not validate the stored data at all for size and computational reasons. As hard drives and arrays get bigger, that trade of no longer makes much sense, and most all new filesystems being designed have hash based error detection built in at some level.
            Good design takes experience. There aren't that many systems like S3 that have been built in the past, and there are many tricky decisions to be made. No system gets it all correct out of the gate.

      • by xRizen ( 319121 )

        Or they could use TCP.

      • by Sique ( 173459 )

        It is quite simple to prove mathematically, that it is in general impossible to devise a protocol that guarantees 100 percent correctness of a signal on an independable line.

        (You simply do it by recursive reduction: If the protocol works even if the last bit is missing, then you could send the message without the last bit anyway. If the second last bit can go missing without damaging the integrity of the message, you can leave out that one also... etc.pp. until you don't need to send any bit at all to deliv

        • Re: (Score:3, Insightful)

          by TheRaven64 ( 641858 )

          True, but not particularly informative. The point is to detect errors. Error correction is nice, but error detection is enough if the sender can then retransmit. Oh, and your 'proof' is flawed, since you are completely ignoring the fact that any correction scheme contains redundant information, so the while n bits might work instead of n+1 bits, n-1 might not.

          If the last bit is missing, then your receiver knows that there is an error. If the last bit is flipped, then it knows that there is an error. A

          • Re:...make lemonade. (Score:5, Interesting)

            by Sique ( 173459 ) on Saturday July 26, 2008 @07:05PM (#24352803) Homepage

            I see you completely miss the point of the proof. I know that you can minimize the impact of a bit error by checksums, and that you can improve reliability by adding redundance. But what is the consequence of error detection? Normally the protocol then asks for resending the message. But how do you (as the sender) know that the message finally arrived correctly? You wait for an aknowledgement. But what if the aknowledgement gets lost or scrambled? You add redundancy in the handshaking. But how does redundancy help reliability? You can ask for a resend due to detected errors etc.pp.

            Your protocol never finds an end because it has to secure the correctness of the security of the correctness of the security...

        • Re: (Score:1, Interesting)

          by Anonymous Coward

          That there's nothing you can do to get the correct message to the other end if the lower level connection doesn't send anything (e.g. someone unplugged the ethernet cable) or corrupts everything sent, is spectacularly uninteresting.

          What people actually care about it given a connection with some statistical level of unreliability you can build a reliable connection out of it. The less reliable the real connection the more overhead you need. Obviously the "reliable connection" isn't actually perfectly reliabl

      • by Z34107 ( 925136 )

        Or they could checksum their UDP packets. The entire packet, not just the customer payload. Duh.

        Not a network engineer, but I believe that UDP packets contain the source MAC address. When a router receives that packet, it will blow away that MAC address, replace it with it's own, and forward it out the right interface. (This is assuming they're using UDP, TCP/IP, or something else entirely to transmit whatever state fields were corrupted.)

        If they did checksum the entire packet, they would have to rebuil

        • by jandrese ( 485 )
          The MAC address is stored down at the ethernet frame level. The UDP checksum only covers the UDP header, it won't change due to changes at the ethernet frame level. That said, the UDP checksum is notoriously weak and relying on it at all is just asking for failure.
          • by Z34107 ( 925136 )

            Interesting. And who knows how the failed bit got toggled anyway? Perhaps the checksum would have been built around the bad information anyway, and all the other machines would have picked it up as valid.

  • By 11:05am PDT, ..., the system's state cleared.
    At 2:57pm PDT, Amazon S3's EU location began successfully completing customer requests.

    So WTF happened during the four hours between 11:05AM and 2:57PM?

    And... have they learned nothing from the TIBCO fiasco?

    • Re:Lost time? (Score:5, Informative)

      by Anpheus ( 908711 ) on Saturday July 26, 2008 @05:14PM (#24351771)

      Read "the system's state cleared" as "we turned everything off" and they proceeded to turn every server on one by one until around 3PM when the EU location was complete and not showing any symptoms.

    • They programmed a checksum into their message-passing?

  • by Manip ( 656104 ) on Saturday July 26, 2008 @05:10PM (#24351753)

    Other large businesses could learn a lot from Amazon's example.

    How often do you have the problem really explained to you, an apology, and a reasonable set of changes to stop it occurring again?

    Most businesses would never explain the root of any problem. They simply list "hardware issues." And they NEVER say sorry anymore - supposedly it opens them up to more liability or something.

    If I was an Amazon customer I would be happy with their explanation and apology even if obviously the downtime is still an issue.

    • Re: (Score:2, Insightful)

      by FalcDot ( 1224920 )

      Looking back, I feel that the one thing all our technological progress has given us more than anything else, is more and better means of communication.

      You can talk to people on the other side of the world, heck, on the other side of the solar system if you don't mind the delay. Video feeds, planes that'll actually get you there in less than a day, ...

      And yet, with all of this, it seems that we're not actually doing it. A company explaining what went wrong is the exception. Internet forums without flamers an

    • by Anonymous Coward on Saturday July 26, 2008 @05:34PM (#24351969)

      Other companies could learn something from this, unfortunately they won't be able to do anything similar as Amazon has patented the process of explaining technological problems to customers.

    • by anti-NAT ( 709310 ) on Saturday July 26, 2008 @06:18PM (#24352367) Homepage

      Vulnerabilities of Network Control Protocols: An Example [ietf.org], published in January 1981.

      What do they say about those who ignore history?

    • Re: (Score:3, Insightful)

      Well, technically speaking, there isn't an apology there:

      Finally, we want you to know that we are passionate about providing the best storage service at the best price so that you can spend more time thinking about your business rather than having to focus on building scalable, reliable infrastructure. Though we're proud of our operational performance in operating Amazon S3 for almost 2.5 years, we know that any downtime is unacceptable and we won't be satisfied until performance is statistically indistinguishable from perfect.

      Allow me to translate:

      We screwed up. We'll do better next time.

      Nowhere in the document do the words "I'm sorry" appear. That's entirely implied.

      • by Alpha830RulZ ( 939527 ) on Saturday July 26, 2008 @10:41PM (#24354497)

        The words may not be there, but there is a pretty clear message there for me to see that they are not happy or smug about this event, and are agreeing with the consumer that this shouldn't have happened, and won't happen again if they can help it. That's enough for me.

        And I'm actually one of their consumers, compared to some of the dilletantes here. We use S3 and EC2 to manage training and demo instances of our software, and are pretty pleased so far.

    • by brxndxn ( 461473 )

      Ya, seriously.. Honesty!! In this post-911 day and age, we have honesty!

      I'm gonna go buy something from Amazon.com now.

    • I agree. A little transparency goes a long way toward reinforcing credibility. This is a very smart business move. It demonstrates two things. Amazon respects its customers enough not to insult them with some lame, vague 'hardware problem' excuse. And it validates that they actually troubleshoot their problems and understand them before they apply a solution. The combination of these two responses makes the apology even more sincere.

  • was trying to hold onto a man?

    I'm just guessing here.

  • by Anonymous Coward

    I remember at least one similar incident:

    Early (or earlish) arpanet, the network controllers did not implement checksum on messages. A bit flip caused the whole shebang to keep on forwarding the same message over and over, to the point that nothing else would flow, not even a reset command. Some one had to be sent to the culprit box and manually reset it.

    I remember this being discussed on some technical circles for a while (I think Software Engineering Notes from the ACM had a go on it).

  • by j. andrew rogers ( 774820 ) on Saturday July 26, 2008 @05:44PM (#24352053)

    It has been generally well-known for a number of years now that any time you have a large cluster you cannot count on hardware checksums to catch every bit flip that may occur during copies and transmission, particularly with consumer hardware which has many internal paths with no checksums at all. Google learned this the hard way, like the supercomputing people before them, and now like Amazon after Google. And some of the better database engines also do their own internal software checksums as well to catch uncaught errors introduced as the data gets copied across the silicon, disks, and network -- it is one way they get their very high uptime and low failure rate.

    It does not reflect well on the software community that most people *still* do not know to do this for very large scale system designs. The performance cost of doing a software CRC on your data every time it is moved around is low enough that it is generally worth it these days. If your system is large enough, the probability of getting bitten by this approaches unity. Very fast implementations of Adler-32 and other high-performance checksum algorithms are widely available online.

    • by James Youngman ( 3732 ) <jay&gnu,org> on Saturday July 26, 2008 @06:17PM (#24352351) Homepage

      Adler-32 wouldn't be a great choice. It's fast but it's weak for short messages [ietf.org] and I've seen it fooled by multi-bit errors on large messages too.

      See Koopman's paper 32-bit cyclic redundancy codes for Internet applications [ieee.org] for some better ideas.

      • For these purposes, a CRC that is fast and weak is generally superior to one that is slow and strong because the CPU load of the implementation does have a measurable impact on system performance. Remember, the software CRC is supposed to catch failures in the other layers of CRC and error detection, so it does not have to be perfect. If it reduces the probability of an uncaught problem from a few times a year to a few times per millenium, that may be sufficient if using a stronger CRC means burning 10% of

        • by James Youngman ( 3732 ) <jay&gnu,org> on Saturday July 26, 2008 @07:22PM (#24352981) Homepage

          I've seen Adler-32 fail twice, so your assumption of "a few times per millennium" doesn't seem to work for me (I'm under 40). In fact in those cases it was even stacked on top of at least one other checksum mechanism, too.

          One of the problems with it is poor spreading of the input bits into s2. There are other algorithms which don't have that weakness but don't (IIRC) cost any more to compute.

          • It does not surprise me at all that there are better algorithms out there or that Alder-32 failed, but the failure probability is compound. It only has to work a few times a year in many cases, and Adler-32 *is* used in some respectable systems as the error trap of last resort. Out of curiosity, not being a topical expert, what would be the best CRC algorithm to use on modern silicon? It is also worth noting that some places are starting to use cryptographic hashes instead of CRC for software checksum pu

            • Honestly I'm not the best person to ask about that. But if I were choosing one without external help, I'd start by reading the Koopman paper. However, it contains no implementations AFAIK.
      • by v1 ( 525388 )

        For those not familiar with checksums, the "ideal" checksum algorithm will toggle approximately 50% of the bits in the checksum for any one bit in the source material toggled. This makes it highly unlikely for several errors in an otherwise correct message to combine to produce the same checksum. Ideally, two messages that produce the same checksum should be wildly different, not nearly identical.

    • I agree with you,

      particularly with consumer hardware which has many internal paths with no checksums at all.

      but, are there any hardware checksums AT ALL in the Intel PC architecture, aside from add-on cards such as HBAs which only protect external data?

      PCIe, and ECC ram at least do some kind of error correction, what, two and one bits worth respectively? I think that's it.

      This is one of the biggest differences between cheapo Intel hardware and proprietary stuff from Sun, Fujitsu, IBM, HP, etc.
      I can't really feel sorry for people who saved a few bucks implementing critical systems on cheap hardwa

      • You are correct, Intel processors and chipsets have limited CRC in the internal pathways. In fact, if this matters to you, it is one of the areas where AMDs silicon is better, having more comprehensive error detection. HyperTransport, for example, has CRC.

    • It does not reflect well on the software community that most people *still* do not know to do this for very large scale system designs.

      This sort of knowledge gap exists in many arenas. A classic error in client-server software: never trust the client. So many "hacks" in online games boil down to the game server trusting the game client to obey the rules, when it's really the server's responsibility to handle all the rule enforcement.

      So, yes, software developers as a group frequently fail to learn from tho

      • This sort of knowledge gap exists in many arenas. A classic error in client-server software: never trust the client. So many "hacks" in online games boil down to the game server trusting the game client to obey the rules, when it's really the server's responsibility to handle all the rule enforcement.
        Unfortunately for a game to be popular it needs to be responsive. Often that means the client doing some of the movement and hit calculations and then the server adjusting those to keep the world somewhat in sy

      • Modern games have rather a lot of rules, enough that it's inefficient to have the server run all of them.
        It's not a knowledge gap - everyone knows it already - it's a compromise for performance in a field (unlike online shopping) where performance > security.

  • by Anonymous Coward

    It providers a timeline of events

    It provideRS? PROVIDERS?!?

    I'TS PROVIDED!

  • What Solid Snake Simulation?
  • Anybody else noticed that these major problems always occur when no one is around to fix them?
    • by innerweb ( 721995 ) on Saturday July 26, 2008 @09:41PM (#24354031)

      After working in a production environment as a developer, I can assure you that the correct interpretation is "Anybody else noticed that these major problems always occur when no one is around to catch them (before they get out of hand)?"

      InnerWeb

  • Byzantine failure (Score:3, Interesting)

    by ge ( 12698 ) on Sunday July 27, 2008 @09:15AM (#24357655)

    So the whole cloud is in trouble if one node starts spewing nonsense? So much for redundancy. Amazon developers would be well advised to read up on the "Byzantine Generals" problem.

  • I work for a company that uses Amazon S3 for our customer's data storage for the same reasons that many other companies do - they're reliable and inexpensive. We have a couple hundred terabytes of data stored on Amazon's servers and, aside from this one instance, we haven't had a major problem in three years.

    Because we're in Seattle and a few blocks from Amazon's headquarters, we got a personal visit last week from one of the senior managers of Amazon's hosted platforms group. In addition to being able to
  • "The server is down, purple monkey dishwasher"

"Our vision is to speed up time, eventually eliminating it." -- Alex Schure

Working...