The Museum of Software Disasters

Small pieces of code have lost rockets and fortunes, and in a few cases they cost people their lives. Walk through the hall to see what went wrong each time.

By Bogdan Sandu for TMS Outsource

Enter the hall

Everything in this hall really happened, and each case was written up afterwards in the inquiry, court case or postmortem that followed it.

The damage varies a lot. Most of these cost money or a mission, and a few cost lives.

What I notice going through them is that almost all trace back to an assumption nobody wrote down.

Therac-25

From June 1985 to January 1987, at four clinics in the United States and Canada.

What failed
The control software in a radiation therapy machine built by AECL
The bug
A race condition between the operator's keystrokes and the routine that set up the beam
Harm
There were six massive overdoses, and at least three of those patients later died of causes attributed to them.
Outcome
The machine was recalled in 1987 and fitted with interlocks that work independently of the software

Hardware checks moved into software

The Therac-25 treated patients either with a low-current electron beam or with X-rays. X-ray mode needs a beam current about 100 times higher, and a metal target and a flattening filter have to sit in the beam path. Both were mounted on a turntable. Eleven machines were installed, five in the US and six in Canada.

The earlier Therac-6 and Therac-20 had independent hardware interlocks that stopped the beam if anything was out of place. On the Therac-25, AECL left most of that checking to the software. Some of that software was carried over from the older machines, where the hardware had been catching problems the software never saw.

The console

In Tyler, Texas, in March and April 1986, an experienced operator typed a prescription quickly. Out of habit the operator entered X for the mode, then used the cursor keys to change it to E. You can try the same sequence here.

Prescription: electron beam, 22 MeV, 180 rad


        

Bending magnets idle

Beam parameters
-
Turntable position
-

This screen is a simplified version. The key sequence, the 8-second magnet window, Malfunction 54 and the dose monitor reading are taken from Leveson and Turner's investigation of the accidents.

What the software did

The mode and energy the operator typed went into one shared two-byte variable. A task that loaded the beam parameters read the high byte, while a separate task read the low byte and moved the turntable.

Once data entry was finished, a routine loaded the beam parameters and then spent about 8 seconds setting the bending magnets. It checked for edits only on its first pass through a delay loop. An edit made after that point changed the screen and moved the turntable, but the beam parameters were never reloaded, and no part of the software compared the two.

The hospital's physicist could reproduce the fault only when he typed as fast as the operator. Data-entry speed turned out to be the key factor, and AECL was unable to reproduce it until he told them.

The last accident, in Yakima, Washington, in January 1987, had a different cause. A one-byte counter rolled over to zero on every 256th pass, and if the operator gave the set command at that moment, a collimator check was skipped.

The record

  1. The first known overdose, in Marietta, Georgia. What caused it was never established.
  2. The first overdose in Tyler, Texas. Malfunction 54 appears on the console twice.
  3. A second overdose in Tyler. The physicist and the operator reproduce the fault within days.
  4. The US Food and Drug Administration declares the Therac-25 defective.
  5. A second overdose in Yakima, this one caused by the counter rolling over to zero.
  6. The FDA issues a Notice of Adverse Findings, and routine use stops until August 1987.

Cryptic errors and thin testing

Error messages such as Malfunction 54 were not explained anywhere in the manual. Treatment pauses were frequent and nearly always harmless, so operators pressed P to proceed as a matter of routine.

The software was written in assembly by a single programmer, with little documentation and mostly system-level testing. A 1983 safety analysis did not include software errors, and it put the chance of the computer selecting the wrong mode at 4 in a billion.

Each time an injury was reported, AECL told the clinic that the machine could not have caused it.

If a safety check moves from hardware into software, nothing else is left to catch the software's mistakes, so the hardware interlocks should stay.

Sources

Nancy G. Leveson and Clark S. Turner, An Investigation of the Therac-25 Accidents. IEEE Computer, vol. 26, no. 7, July 1993, pages 18 to 41.

Deaths: Leveson and Turner describe deaths and serious injuries without giving a total. Two patients in Tyler died of the overdoses. A patient in Yakima, already terminally ill, died of complications related to the overdose.

It took one switch in New York to start the next failure, four years on, and it spread across AT&T's long-distance network.

AT&T, 15 January 1990

From about 2:30 pm to 11:30 pm Eastern, on the long-distance telephone network of the United States.

What failed
Recovery software on AT&T's 114 4ESS long-distance switches
The bug
The code mishandled two messages if they arrived less than a hundredth of a second apart
Lost
Press estimates put the calls that failed to connect at roughly 50 to 70 million
Cost
The figure usually quoted is more than $60 million in lost revenue. AT&T never published one.
Switches down
0 of 114
Resets
0
Signaling load
Normal

An illustrative model: 114 switches, with the links and timing simplified.

Switches resetting each other

AT&T loaded new software into all its 4ESS switches in mid-December 1989. The idea was to let them react faster when the signaling network had trouble. It had been tested in the lab.

At about 2:30 pm on 15 January, a switch in New York had a minor hardware fault. It told the switches connected to it to stop sending calls, and after 4 to 6 seconds of recovery it came back and began sending call attempts again.

One neighbour received the first of those attempts and started updating its records to show New York back in service. The processor doing that work, the Direct Link Node, was vulnerable for several seconds. If a second attempt arrived within a hundredth of a second, data was damaged and the processor took itself out of service. Its duplicate then took over, received the next close pair and failed in the same way.

That left the neighbour cut off. It went through its own recovery, came back, sent its own call attempts and passed the failure on. With the afternoon's traffic on the network, the switches kept taking each other down.

The misplaced break

AT&T only ever called the cause a software flaw, and it never published the code. Later accounts mostly repeat one explanation, in which a C break statement meant to leave an if left the whole switch instead, so the code skipped ahead and overwrote data it was still using. It's a very ordinary mistake, which I find more unsettling than an exotic one would be.

switch (message) {
case INCOMING_MESSAGE:
    if (sender_out_of_service) {
        if (write_buffer_empty) {
            mark_in_service(sender);
        } else {
            break;
        }
    }
    process_message();
    break;
}
do_optional_parameter_work();

This only illustrates the pattern that Bruce Sterling (1992) and Dennis Burke (1995) describe. It is not AT&T source code.

Shutting off the backup links

The standard restoration procedures did not work. Engineers at Bell Labs and at AT&T's network operations centre in Bedminster, New Jersey, brought the message load down by suspending signaling on the backup links, and the last link was cleared at 11:30 pm.

On the next day AT&T pulled the update and put the previous program back on the switches. Then it reproduced the failure in the lab and corrected the code.

I'd test recovery code harder than anything else, because it only runs after something has already gone wrong and so it gets exercised least. On 15 January this code ran over and over, in switch after switch.

Sources

AT&T, Technical background on AT&T's network slowdown, January 15, 1990. Reproduced in RISKS Digest, vol. 9, issue 63, 29 January 1990.

Cause of AT&T network failure, quoting Telephony, 22 January 1990, page 11. RISKS Digest, vol. 9, issue 62, 26 January 1990.

Bruce Sterling, The Hacker Crackdown, part one, 1992.

Dennis Burke, All Circuits are Busy Now: The 1990 AT&T Long Distance Network Collapse. California Polytechnic State University, 1995.

Call counts and cost come from the press and later accounts, not from AT&T, and vary between them.

In Dhahran, a year later, a clock that had drifted by a third of a second left a barracks undefended.

Patriot missile, Dhahran

During the Gulf War, on 25 February 1991, at about 8:30 pm local time.

What failed
How the Patriot's weapons control computer calculated time
The bug
Time was kept in tenths of a second and multiplied by a value of 1/10 chopped to 24 bits
Lost
The system never tracked an incoming Scud, which hit a US Army barracks and killed 28 soldiers.
Uptime
The battery had been running without a restart for about 100 hours

Counting time in tenths

The Patriot's computer kept the time since it was switched on as a whole-number count of tenths of a second. To use that time, the software multiplied the count by 1/10. In binary, 1/10 never ends, and because the register kept only 24 bits, the stored value was slightly too small.

The loss on each tick was about 0.000000095 seconds, which does not matter over an hour of running. After 100 hours it adds up to 0.34 seconds, and in that time a Scud travels more than half a kilometre.

The system used the time to predict where a detected missile would be next, and it searched only inside that predicted window, called the range gate. Because the clock was off, the gate was in the wrong place. The Scud was outside it, and the system decided there was no target.

The drift lab

Drag the uptime and watch the range gate move away from the missile. The figures follow the reconstruction in the GAO's report.

Real time
0
Time the computer calculates
0
Clock error
0
Range gate shift
0

1/10 chopped to 24 bits = 0.099999904632568359375

The shift is calculated at about 2,000 metres per second, which is the speed implied by the GAO's table. Using the often quoted Scud speed of 1,676 m/s instead, 100 hours gives about 575 m. The gate size is illustrative. It is set so the target leaves the gate after about 20 hours, as the GAO table notes.

Two weeks of warnings

  1. The Patriot Project Office receives Israeli data showing that the range gate shifts by 20 percent after 8 hours of continuous running.
  2. A software update that compensates for the error is released.
  3. Users are warned that very long run times can shift the range gate, but the message does not say how long is too long.
  4. At about 8:30 pm, Alpha Battery, which has been running for about 100 hours, does not track the incoming Scud.
  5. The updated software reaches Dhahran.

Conditions it was not designed for

The Patriot was designed to run for a few hours at a time in one place and to engage targets up to about Mach 2. In the Gulf it ran for days, and the Scuds it faced flew at about Mach 5. Each of those differences made the drift matter more.

The software had already been partly corrected. A more precise time conversion had been added, though some of the code that needed it did not call it. In a calculation where one time came from the new routine and the other from the old one, the two errors no longer cancelled out.

Nobody can know whether a Patriot with a correct clock would have destroyed this Scud. The system's overall record against Scuds in the war is also disputed.

Any error that grows the longer a system runs needs a stated limit, and here the only limit was an assumption about how long anyone would leave the system running.

Sources

US General Accounting Office, Patriot Missile Defense: Software Problem Led to System Failure at Dhahran, Saudi Arabia. GAO/IMTEC-92-26, February 1992.

Robert D. Skeel, Roundoff Error and the Patriot Missile. SIAM News, vol. 25, no. 4, July 1992.

Time of day: the GAO report gives none. About 8:30 pm is the time most sources give.

This rocket was destroyed by software it didn't even need. It happened in French Guiana, five years after the last exhibit.

Ariane 5, Flight 501

Kourou, French Guiana, 4 June 1996. The flight lasted 37 seconds.

What failed
Inertial reference software reused from Ariane 4
The bug
A 64-bit float was converted to a 16-bit signed integer
Lost
The rocket on its maiden flight, plus the four Cluster science satellites it carried
Cost
About $370 million is the estimate most people cite. The inquiry report itself gives no figure.
Try the overflow yourself

A routine Ariane 5 never used

Before lift-off, the rocket's inertial reference system (SRI) runs an alignment routine that works out where the platform is pointing. On Ariane 4 the routine was left running for about 40 seconds after lift-off. If a countdown got held late, engineers could then restart it without waiting 45 minutes or more for a new alignment. That feature was used once, on Flight 33 in 1989.

Ariane 5 didn't need any of this. The software stayed in for commonality and carried on running after lift-off, same as before.

One of its outputs was a value called BH (horizontal bias), which grows with the rocket's horizontal speed. In the first part of its flight Ariane 5 picks up horizontal velocity about five times faster than Ariane 4, so BH went past anything the code had been written to expect.

The overflow lab

The flight software stored BH as a 64-bit floating point number and then converted it to a 16-bit signed integer, a type that only holds whole numbers from −32,768 to 32,767. Drag the flight clock and watch the two rockets.

Ariane 4 trajectory

0

Ariane 5 trajectory

0

16-bit integer: fits. Both computers healthy.

BH_Int := Integer_16 (0.0);

The numbers in this lab are illustrative. The inquiry report doesn't publish BH values, so the curves are scaled to make Ariane 5 cross the limit at H0 + 36.7 seconds, as it did on the day, with Ariane 4 growing five times slower. The conversion and the 16-bit limit are real.

How the flight ended

  1. 09:33:59 local time. The main engine and both boosters ignite, and lift-off is nominal.
  2. The back-up SRI stops with an Operand Error in the BH conversion.
  3. The active SRI hits the same error on the next data cycle and shuts down as well. It was identical to the back-up and was reading the same input.
  4. The failed SRI sends out a diagnostic bit pattern. The on-board computer takes it for flight data and swings the booster and main engine nozzles to full deflection, correcting an attitude error that never happened.
  5. The angle of attack goes above 20 degrees and aerodynamic loads tear the boosters off the core stage. Self-destruct fires at about 4 km up.

The three conversions left alone

The developers had gone through every float-to-integer conversion that could overflow. They found seven risky variables and protected four of them. BH was one of the three left unprotected, partly because of an 80% maximum workload target for the SRI computer, and nobody wrote the justification into the source code.

For Ariane 4, the assumption that BH could never get that large was correct. It was never checked against Ariane 5, because the project partners had agreed to leave Ariane 5 trajectory data out of the SRI requirements and specification. I find that decision harder to understand than the bug.

The redundancy didn't help either. The back-up was a copy of the active unit, running the same code on the same data, so it failed for the same reason 72 ms earlier.

If you reuse code, go looking for what it assumes about the old system and test those assumptions against the new one.

Sources

ARIANE 5 Flight 501 Failure, Report by the Inquiry Board, chaired by Prof. J. L. Lions. European Space Agency and CNES, Paris, 19 July 1996.

Cost: estimates for the rocket and payload vary between sources; $370 million is the figure most often quoted.

NASA lost this one three years after Ariane, because one team wrote its thruster data in pound-force seconds and another team read it as newton-seconds.

Mars Climate Orbiter

The last signal came at 09:04:52 UTC on 23 September 1999, as the orbiter passed behind Mars. That was 49 seconds earlier than expected.

What failed
A ground software file used to model the orbiter's small thruster firings
The bug
Data delivered in pound-force seconds and read as newton-seconds, which is off by a factor of 4.45
Lost
The orbiter, after a 9.5-month cruise. It arrived at Mars about 170 km lower than planned.
Cost
About $327.6 million for the program that flew it and the Mars Polar Lander, launches included

The thruster file

The orbiter held its attitude with reaction wheels, and every so often small thruster firings unloaded the momentum the wheels had built up. Each firing changed the trajectory slightly. So the details were sent down to Earth, processed by a ground program called SM_FORCES, and passed on to the navigators at JPL.

According to the interface specification, that file had to be in newton-seconds. SM_FORCES wrote it in pound-force seconds instead. The navigators read the numbers as metric, which made every firing look 4.45 times weaker than it really was.

There were also far more firings than planned, 10 to 14 times more often than the navigators expected, because the solar array was on one side only and sunlight pushed the spacecraft unevenly. Most of that thrust pointed across the line of sight to Earth, where Doppler tracking could barely pick it up.

The units lab

Here is one thruster firing on its way from the spacecraft team to the navigators. Pick the units the file was written in.

Written in the file
1.00 lbf·s
Read by navigation
1.00 N·s
Actual impulse
4.45 N·s
Closest approach to Mars
about 57 km

One pound-force is 4.448 newtons. The altitudes come from the investigation board, which gives 226 km planned, about 57 km reconstructed afterwards and 80 km as the lowest the orbiter could survive. The board doesn't give a simple formula linking the two, and this lab doesn't invent one.

Nine months of drift

  1. Launch from Cape Canaveral on a Delta II.
  2. The thruster data finally becomes usable after four months of file format errors. Within a week it looks wrong, and people raise their concerns by e-mail.
  3. A course correction aims for a 226 km closest approach. Within a week the estimates have dropped to 150 to 170 km.
  4. An hour before arrival the estimate is as low as 110 km. An extra correction burn gets discussed but is never made. Contact is lost at 09:04:52 UTC.
  5. Navigators find the factor of 4.45.
  6. The investigation board publishes its report.

Doubts that stayed in e-mail

The navigation team had joined shortly before launch and hadn't been part of the design reviews or the ground software testing. They did notice discrepancies between navigation solutions, and they talked about them, but over e-mail rather than through the formal incident and anomaly reporting process. The problem got through.

Nobody checked whether the file matched its specification. And the emergency correction burn had never been planned or tested in enough detail for anyone to use it with confidence.

"The problem here was not the error," NASA's Edward Weiler said. His point was that the checks meant to catch it had failed.

Put the units in the data itself and check them wherever one team hands a file to another. If someone sends an e-mail saying the numbers look wrong, file it as a bug.

Sources

NASA, Mars Climate Orbiter Mishap Investigation Board Phase I Report, 10 November 1999.

NASA, Report on Project Management in NASA by the Mars Climate Orbiter Mishap Investigation Board, 13 March 2000.

NASA Release 99-113, Mars Climate Orbiter Team Finds Likely Cause of Loss, 30 September 1999.

NASA/JPL, Mars Climate Orbiter Arrival press kit, September 1999, and NSSDC Master Catalog entry 1998-073A.

Cost: NASA does not split the $327.6 million between the orbiter and the lander. Altitudes: on the day of the loss, JPL quoted 150 km planned, about 60 km actual and 85 km as the survivable minimum. The board's later figures are used here.

Next is the one most people remember, three months after the orbiter: midnight going into the year 2000.

Y2K

Midnight on 31 December 1999, for every computer that kept the year as two digits.

What failed
Programs that stored 1999 as 99, and so read 2000 as 1900
The bug
In the 1960s, two digits saved memory that was expensive. The programs stayed in use long after that saving stopped mattering.
Cost
About $100 billion to fix in the US alone. Worldwide estimates run from $300 billion to over $800 billion.
Outcome
Mostly prevented. The failures that got through were small, though a few were not.

Where the two digits came from

In the 1960s data lived on 80-column punched cards and memory cost thousands of dollars per kilobyte, so writing 64 instead of 1964 was a sensible saving. Programmers didn't expect their code to still be running 30 years later. It was, though, and by then the convention had spread into file formats and databases, and into chips as well.

Bob Bemer published a warning as early as 1971. Peter de Jager's article Doomsday 2000, in Computerworld in September 1993, is usually the one credited with getting people to listen.

The rollover lab

Here are four ordinary calculations, each written with two-digit years. Roll the clock past midnight, then switch to four digits.

System clock 31-12-99 23:59:55

Age of someone born in 1964
35
Card that expires in January 2000
Valid
Records sorted by year
97, 98, 99
Year printed as "19" + years since 1900
1999

Each row is based on a documented failure. There were wrong ages in a hospital screening system, card terminals that rejected cards expiring in 2000, records sorted in the wrong order, and websites that printed the year as 19100.

What actually broke

  1. Cards and passes that expire in 2000 start getting rejected, and Visa asks banks to stop issuing cards with a 00 expiry date.
  2. In the UK, card terminals reject valid cards because they look a few working days ahead and land in 2000.
  3. A US spy satellite ground station stops processing data for hours and then runs at reduced capacity for about three days. The cause turns out to be a faulty Y2K fix applied just before New Year.
  4. Some websites show the date as 19100, the US Naval Observatory's among them. Japanese nuclear plants report minor glitches in monitoring systems, none of which affect safety.
  5. 2000 is a leap year, and some systems in Japan, New Zealand and Louisiana fail to recognise the date.
  6. A hospital in Sheffield discloses that its screening software miscalculated mothers' ages from January to May 2000. More than 150 women were wrongly told their risk of a Down's syndrome pregnancy was low.

Was it worth the money?

The US Senate committee on the problem concluded that the effort was justified and the money necessary. Among US federal systems critical to their missions, the share that handled 2000 correctly went from 21 percent in May 1997 to 99.9 percent by December 1999.

Critics point out that some countries spent far less and had no more trouble (they were also less computerised), and that some of the money was probably wasted, especially at small organisations. Nobody can prove what would have happened without the work. What we do know is that the large, date-dependent systems were found and fixed and tested, and that the failures which got through were small.

We already know the next date. Systems that count seconds since 1970 in a signed 32-bit number run out at 03:14:07 UTC on 19 January 2038 and jump back to December 1901.

I'd rather a team wrote down when a shortcut stops working than refused to take shortcuts at all. Two-digit years were a reasonable call in the 1960s.

Sources

US Senate Special Committee on the Year 2000 Technology Problem, Y2K Aftermath: Crisis Averted. Final Committee Report, 29 February 2000.

US General Accounting Office, Year 2000 Computing Challenge: Lessons Learned Can Be Applied to Other Management Challenges. GAO/AIMD-00-290, September 2000.

US Department of Commerce, The Economics of Y2K and the Impact on the United States, November 1999.

Martyn Thomas, What Really Happened in Y2K? Gresham College lecture, 4 April 2017.

Steven Lee Myers, Y2K: In One of Few Problems, Link to Spy Satellite Fails. The New York Times, 2 January 2000.

Down's Syndrome screening failures linked to Y2K bug. The Register, 14 September 2001, based on BBC News reporting.

Spending: nobody knows the true worldwide total. The figures above are estimates made at the time.

Here a trading firm lost more than $460 million in one morning, twelve years after the last room.

Knight Capital

1 August 2012, starting at 9:30 am Eastern. It lasted about 45 minutes.

What failed
SMARS, the router Knight used to send its orders to the New York Stock Exchange
The bug
The new code reused an old flag, and one of the eight servers was still running the code that flag used to switch on
Orders
Over 4 million executions in 154 stocks, more than 397 million shares in total
Lost
More than $460 million. Within a week Knight needed a $400 million rescue.

The reused flag

Knight was getting ready for the NYSE's Retail Liquidity Program, which began on 1 August 2012. The new code for it went into SMARS, and it reused a flag that used to activate an old feature called Power Peg.

Nobody had used Power Peg since 2003, but its code had never been taken out. In 2005 the part of it that counted how much of an order was already filled got moved somewhere else, and Power Peg wasn't tested again after that. So if it ever ran, it would keep sending orders without noticing they had been filled.

Starting on 27 July, a technician copied the new code onto the eight SMARS servers by hand and missed one of them. No second technician checked the work. Knight didn't have a written procedure that asked for that.

Try the deployment

Deploy the code and open the market. After that, try what Knight's team tried when they went to fix it.

Clock
9:30 am
Executions
0
Shares traded
0
Unwanted positions
$0

The counters spread the totals from the SEC's order evenly across the 45 minutes, because the real pace has not been published.

How the morning went

  1. The new code starts going onto the SMARS servers one at a time. Nobody ever updates the eighth.
  2. SMARS sends automated emails that mention Power Peg, 97 of them before the open. Nobody acts on them.
  3. The market opens and 212 incoming orders reach the eighth server. Power Peg starts firing child orders.
  4. Trying to stop it, the team pulls the new code off the seven good servers, so now all eight are running Power Peg.
  5. The orders stop, after about 45 minutes.
  6. A group of investors puts in $400 million. Knight agrees in December to merge with GETCO.

A deployment nobody checked

The deployment was done by hand, and nobody checked it against a written procedure because there wasn't one. Reusing the flag looked harmless, since the code behind it was considered dead. It just had never been removed.

There were warnings, too, and the 97 emails are the part I find hardest to get past. They went to a group of staff, but nobody treated them as alerts and nothing escalated them. Knight also had no automated way to stop SMARS when it sent far more orders than its customers had asked for.

In 2013 the SEC fined Knight $12 million for breaking the Market Access Rule. That rule requires brokers to have controls that prevent exactly this.

Delete code you no longer use, and give a new feature its own flag instead of borrowing an old one.

Sources

US Securities and Exchange Commission, In the Matter of Knight Capital Americas LLC. Administrative Proceeding File No. 3-15570, Release No. 70694, 16 October 2013.

SEC press release 2013-222, SEC Charges Knight Capital With Violations of Market Access Rule, 16 October 2013.

Knight Capital Group, Form 8-K filings and press releases, August 2012.

Loss: Knight's filings give figures between $440 million and $468 million depending on what is included. The SEC says more than $460 million.

This one is a government website, a year later. On its first day 250,000 people tried to get in at once, and it had been built for far fewer.

HealthCare.gov

Opened on 1 October 2013. By 1 December it worked for most people.

What failed
The federal site where people in 36 US states were supposed to compare health insurance and buy it
The bottleneck
Everyone had to make an account first, and all of that went through one identity system that couldn't keep up
Launch day
250,000 people at once, five times the expected number. The outages started within two hours.
Cost
The main website contract went from an estimated $58 million to $207 million

One way in

HealthCare.gov was really six large systems, built by dozens of contractors and connected to five federal agencies, 36 states and more than 300 insurers. On launch day every visitor had to get through the same account and identity system first. It created your login and checked who you were, and only after that could you see a single plan. One official later called it a small, one-lane onramp to a major highway.

The test results had already shown the problem. A test on 25 September found the site could handle about 10,000 people at once. On 27 September a CMS official wrote that it had never handled more than 500 people filling out applications in a setup the size of launch day. Somewhere between those dates, the hosting contractor was asked to double everything before launch.

On 1 October, 250,000 people tried at the same time. Most of them never got past the account step, and that step hid deeper faults in the marketplace software behind it. The internal notes from the next morning recorded six enrollments sent to insurers.

Launch day, in the funnel

Open the site on launch day and see where people get stuck. Then run the repair.

Trying to get in
0 Past the account step
0 Filling in applications
0
Clock
1 Oct, opening
Site uptime
Not measured yet

The 250,000 peak, the 10,000 and 500 test results, the uptime figures and the 50,000 target come from HHS and CMS records. Keep in mind that the two tests measured different things on different days. The shape of the curves and the capacities in between are illustrative.

From the warnings to the first enrollment period

  1. An outside review warns that there is too little end-to-end testing and that the launch will be at full volume.
  2. In a test, the site handles about 10,000 people at once.
  3. Launch. The federal government shuts down for 16 days that same morning, and outages begin within two hours.
  4. New leadership comes in, along with a team of engineers from technology companies.
  5. After more than 400 fixes, uptime goes from 42.9 percent in the first week to 95.1 percent in the last.
  6. The first enrollment period closes with about 8 million plan selections, 5.4 million of them through HealthCare.gov.

No one owned the whole thing

The requirements kept changing well into 2013, until there was no time left to finish building the site and also test it. The team picked the launch date over finishing the tests. No full end-to-end test was run, and one official described the launch itself as the test.

Nobody was clearly in charge of the whole. The agency acted as its own systems integrator without the experience for that job, while each contractor tested its own part. The government's inspector general counted 18 documented warnings before launch. The advice that came up most often was to appoint a single lead and stop changing the requirements.

The repair did exactly that. There was one integrator and one command centre, and the site got measured every day. In August 2014 the White House created the US Digital Service, building on the team that had fixed the site.

I'd call this a management failure more than a coding one. Somebody has to own the whole path a user takes and test it at more than the load you expect.

Sources

HHS Office of Inspector General, HealthCare.gov: Case Study of CMS Management of the Federal Marketplace (OEI-06-14-00350), February 2016.

US Government Accountability Office, Healthcare.gov: Ineffective Planning and Oversight Practices Underscore the Need for Improved Contract Management (GAO-14-694), 30 July 2014.

US Government Accountability Office, Healthcare.gov: CMS Has Taken Steps to Address Problems (GAO-15-238), 4 March 2015.

House Committee on Energy and Commerce, PPACA Implementation Failures: Didn't Know or Didn't Disclose? Hearing with contractor testimony, 24 October 2013.

CCIIO war room notes, October 2013, released by the House Committee on Oversight and Government Reform.

Centers for Medicare and Medicaid Services, HealthCare.gov Progress and Performance Report, 1 December 2013.

HHS ASPE, Health Insurance Marketplace: Summary Enrollment Report for the Initial Annual Open Enrollment Period, May 2014.

The White House, Delivering a Customer-Focused Government Through Smarter IT, 11 August 2014.

Contract figures measure different things and are not the total cost of the website.

One missing length check, disclosed six months later, let anyone read the memory of a large part of the secure web.

Heartbleed

Disclosed 7 April 2014, and in OpenSSL since March 2012. CVE-2014-0160.

What failed
The heartbeat feature in OpenSSL, the library that encrypted much of the web's traffic
The bug
The server believed whatever length a client claimed for its message, and copied that much of its own memory back
Exposed
About 17 percent of secure web servers with trusted certificates, which is around half a million sites
Leaked
Up to 64 KB per request, as many times as you liked, with nothing logged. That could include passwords, cookies and private keys.

What a heartbeat does

A heartbeat is a small message that keeps an encrypted connection alive. The client sends some bytes and says how many it sent, and the server sends the same bytes back. According to the specification, if the claimed length is bigger than the message, the request must be discarded.

OpenSSL's code read the claimed length, a 16-bit number of up to 65,535, and copied that many bytes starting at the message. It never compared that number with what had actually arrived. So you could send one byte, claim 65,535, and get back almost 64 KB of whatever was sitting next to your message in the server's memory.

The code was committed on New Year's Eve 2011 and shipped in OpenSSL 1.0.1 in March 2012. Its author said later that he had simply missed validating a variable containing a length.

Try it yourself

Send the server a word and tell it how long the word is. Then lie about the length.


        
        

The server memory in this lab is made up, and much shorter than the real 64 KB. The mechanism and the 16-bit length follow the OpenSSL source and RFC 6520, and so does the fix.

2011 to 2014

  1. The heartbeat code goes into OpenSSL. It had been reviewed.
  2. It ships in OpenSSL 1.0.1.
  3. Neel Mehta of Google and engineers at Codenomicon each find the bug on their own.
  4. The bug is disclosed publicly, along with OpenSSL 1.0.1g, which adds the missing check.
  5. CloudFlare invites the public to steal a private key from a vulnerable test server. The first person manages it that same day.
  6. The Canada Revenue Agency says Social Insurance Numbers of about 900 taxpayers were taken through the bug.

Who was paying for OpenSSL

OpenSSL secured a huge share of the internet, and a handful of people maintained it. Only one of them worked on it full-time. Its foundation typically got about $2,000 a year in donations (I still find that figure hard to believe), and no money was set aside for code review or audits.

The bug itself was a single unchecked number in C, a language that will copy past the end of a buffer if told to. The specification had a rule against it, and the code passed review anyway.

Within weeks the Linux Foundation launched the Core Infrastructure Initiative, where a dozen large technology companies paid to support OpenSSL and other critical open-source projects. Separately, the OpenBSD team forked OpenSSL into LibreSSL.

Check every length field against the number of bytes that actually came in.

Sources

OpenSSL Security Advisory, TLS heartbeat read overrun (CVE-2014-0160), 7 April 2014.

Codenomicon, The Heartbleed Bug, heartbleed.com, April 2014.

IETF RFC 6520, Transport Layer Security (TLS) and Datagram Transport Layer Security (DTLS) Heartbeat Extension, February 2012.

OpenSSL source, commits 4817504d (31 December 2011) and 96db9023 (7 April 2014).

Paul Mutton, Half a million widely trusted websites vulnerable to Heartbleed bug. Netcraft, April 2014.

CloudFlare, The Results of the CloudFlare Challenge, 11 April 2014.

Canada Revenue Agency, statement by the Commissioner, 14 April 2014, as reported by CBC News and others.

Steve Marquess, Of Money, Responsibility, and Pride, 12 April 2014.

A pop video spent that same year heading for a number YouTube's counter was never meant to reach.

Gangnam Style

December 2014. This is the one near miss in the museum.

What was at risk
YouTube's view counter, which had stored counts as signed 32-bit integers
The limit
2,147,483,647, the largest number a signed 32-bit integer can hold
The video
PSY's Gangnam Style passed it in late November 2014 and was at about 2.15 billion views by early December
Outcome
Nothing broke, because YouTube had moved the counter to 64 bits months earlier.

How big a 32-bit number gets

A signed 32-bit integer has 32 binary digits, and the first one marks the sign. That leaves 31 for the value, so the largest number it can hold is 2 to the power of 31 minus one, which is 2,147,483,647. Add one more and, in the way almost all computers store integers, the sign bit flips and you get minus 2,147,483,648.

Nobody designing YouTube's counters expected to get anywhere near that. Then a Korean pop video uploaded on 15 July 2012 became the first to reach a billion views that December, and it hit two billion on 31 May 2014.

On 1 December 2014 YouTube posted that it had never thought a video would be watched more than 2,147,483,647 times, "but that was before we met PSY", and said it had moved to a 64-bit integer. Headlines ran with the idea that the video had broken YouTube. Google said nothing had actually broken. If you hovered over the counter, its digits spun, which YouTube later called an easter egg.

Try the counter

Each square is one bit of the stored count, and the red one is the sign. Push the count to the top of the 32-bit range, then add one more view.

0

The wrap you see here is what a signed 32-bit integer does. YouTube's real counter never wrapped. Its post gave the 64-bit limit as 9,223,372,036,854,775,808, which is off by one (the largest signed 64-bit integer ends in 807).

How the count got there

  1. Gangnam Style goes up on YouTube.
  2. It is the first YouTube video to reach a billion views.
  3. Also the first to reach two billion.
  4. YouTube moves its view counter to 64 bits, months before the count gets to the limit.
  5. The count passes 2,147,483,647 and nothing visible happens. The exact day is an estimate.
  6. YouTube announces the upgrade, and the coverage says the video broke YouTube.
  7. See You Again overtakes it as YouTube's most viewed video.

Someone changed the type in time

Someone at YouTube watched the number climb and changed the type before it mattered. That's really all that happened. I put it in the museum anyway, because most of the disasters in this hall had a moment like that and nobody acted on it.

Counters outgrowing their integers is a common problem. In 2015 the US aviation regulator ordered Boeing 787 operators to power the aircraft down periodically. A software counter in its generator control units would overflow after 248 days of continuous power, and the units could all drop into failsafe mode at the same time, cutting AC electrical power. There's a 32-bit limit under the clock at the end of this hall too.

If a number in your system only ever goes up, check what type it is stored in.

Sources

BBC News, Gangnam Style music video 'broke' YouTube view limit, 4 December 2014.

Brandon Griggs, 'Gangnam Style' breaks YouTube. CNN, 3 December 2014.

Rick Regan, Gangnam Style Video Overflows YouTube Counter. Exploring Binary, 3 December 2014.

Katie Rife, YouTube was just kidding about "Gangnam Style" breaking its view counter. The A.V. Club, 5 December 2014, citing Variety.

BBC Newsround, Gangnam Style first YouTube video to reach 2 billion views, 31 May 2014.

Andrea Dresdale, 'See You Again' breaks record for most-viewed YouTube video of all time. ABC News, 11 July 2017.

Federal Aviation Administration, Airworthiness Directive 2015-09-07, The Boeing Company Airplanes. Federal Register, 1 May 2015.

YouTube's Google+ post of 1 December 2014 is no longer online and is quoted here as reported by the BBC.

Eleven lines of JavaScript went missing fifteen months later, and thousands of projects stopped building.

left-pad

22 March 2016, starting around 2:30 pm Pacific. It lasted about two and a half hours.

What failed
Installs of thousands of JavaScript projects from the npm registry, Babel among them
The cause
A developer unpublished 273 of his packages, and one of them was left-pad, which was 11 lines long.
Reach
left-pad had been downloaded 2,486,696 times in the previous month
Outcome
npm put the package back itself, then changed its rules on unpublishing

It started with a package name

Kik, a messaging company, wanted the npm package name kik for a project of its own. Azer Koçulu, the developer who already owned the name, declined to give it up, and npm decided it should go to Kik.

He responded by unpublishing every package he had on npm, which the rules at the time allowed. One of them was left-pad, a function that adds characters to the start of a string until it reaches a given length.

Babel and Atom didn't use left-pad directly. They used a package called line-numbers, which asked for exactly version 0.0.3 of left-pad. Someone published a new left-pad within ten minutes, but it had a different version number, so the builds kept failing.

Pull it yourself

This is the entire package. Take it out of the registry and see what happens to everything that depends on it.

module.exports = leftpad;
function leftpad (str, len, ch) {
  str = String(str);
  var i = -1;
  ch || (ch = ' ');
  len = len - str.length;
  while (++i < len) { str = ch + str; }
  return str;
}

your appbabel-coreline-numbersleft-pad 0.0.3


        

The code is left-pad as it stood in 2016, minus the blank lines. The chain is simplified, since Babel got to left-pad by way of line-numbers.

What happened, by the clock

  1. Pacific time. Soon after, installs begin failing with a 404 for left-pad.
  2. Someone publishes an equivalent left-pad 1.0.0. Builds still fail, since line-numbers asks for 0.0.3.
  3. npm says it will republish the original 0.0.3 from a backup.
  4. left-pad 0.0.3 is back in the registry.
  5. npm changes its policy so that a version can be unpublished only within 24 hours. After that, npm refuses if other packages would break.

What the registry allowed

Anyone could remove a package from the registry at any time, even one that thousands of others depended on, and nobody downstream got a warning. A large share of modern JavaScript also depended on chains of small packages that nobody had looked at in years.

Afterwards people argued about trivial dependencies. The developer David Haney's position was that functions this small should just be written in house, and I mostly agree with him. Researchers later found that about 16 percent of the npm packages published before the incident were trivial in the same way. JavaScript got a built-in padStart in 2017.

Your app runs code written by people you have never met, much of it through packages you never picked directly. Look at what is actually installed, not only at what you asked for.

Sources

npm, Inc., kik, left-pad, and npm. npm blog, 23 March 2016.

npm, Inc., changes to npm's unpublish policy. npm blog, 29 March 2016.

Azer Koçulu, I've Just Liberated My Modules, 23 March 2016.

Chris Williams, NPM left-pad chaos. The Register, 23 March 2016.

David Haney, NPM & left-pad: Have We Forgotten How To Program? 23 March 2016.

Rabe Abdalkareem and others, Why do developers use trivial packages? An empirical case study on npm. ESEC/FSE 2017, extended in Empirical Software Engineering, 2020.

No source counts the builds that failed. npm described the damage as many thousands of projects.

One maintenance command, five years after left-pad, took Facebook, Instagram and WhatsApp off the internet.

Facebook goes dark

4 October 2021, starting around 15:39 UTC and lasting nearly six hours.

What failed
Facebook, Instagram, WhatsApp, Messenger and Oculus, worldwide, and most of the company's own internal tools
The cause
A maintenance command took down Facebook's whole backbone, and the tool meant to block it had a bug.
Reach
Apps with about 3.5 billion monthly users. DNS resolvers around the world saw 30 times their usual queries.
Not an attack
Meta found no malicious activity and no evidence that user data was compromised

What the command did

Two systems are involved. DNS turns a name like facebook.com into a numeric address, and BGP is how the internet's networks tell each other which addresses they can reach. Facebook's network, AS32934, announced routes to its own DNS servers, which is how the rest of the internet knew where to send questions about facebook.com.

On 4 October, during routine maintenance, a command was issued to assess how much spare capacity the global backbone had. Instead it disconnected every link in that backbone, which cut Facebook's data centres off from each other and from the rest of the world. There was a tool that audits commands like this, and it should have stopped this one, but a bug in it let the command through.

A safety rule then made things worse. Facebook's DNS servers stop advertising their routes when they can't reach the data centres, since that usually means something is wrong at that site. Every site lost the backbone at the same moment, so every site withdrew. The servers were still running. There just wasn't a route on the internet that led to them any more.

Withdraw the routes

In this model, sixteen networks hold a route to Facebook's DNS servers. Run the maintenance command and look the site up, then try to bring it back.


        
Clock
15:38 UTC
DNS query load
1x normal
Recovery
Idle

The times and the 30x query load come from Cloudflare's measurements. The networks, their numbers, the speed of the withdrawal and the recovery steps are illustrative. Real withdrawals spread in seconds, and Meta did not publish the command or the bug.

The afternoon, in UTC

  1. Facebook's network sends out a spike of routing updates, and traffic to its apps falls away.
  2. On Cloudflare's public resolver, facebook.com stops resolving. Lookups come back SERVFAIL.
  3. Facebook is no longer announcing any route to its DNS servers.
  4. Remote access is down along with the network, so engineers go to the data centres. Strict physical security there takes extra time.
  5. Facebook's routes start coming back.
  6. Cloudflare sees Facebook reconnected and DNS working again. The apps take longer to fully recover.

Recovery needed the systems that were down

The last check before the command went through was a piece of software, and it had a bug. After that came a rule designed to protect a single failing site. Every site followed it at once, so a backbone failure turned into a total disappearance.

This is the part I keep coming back to. The tools engineers use to investigate outages ran on Facebook's own network and DNS, and so did remote access to the data centres. Reports at the time said some staff badges stopped working; Meta has only said that physical security slowed engineers getting in. When the backbone came back, power use in individual data centres had dropped by tens of megawatts, and switching everything on at once risked another round of failures. Meta had rehearsed this kind of restart in drills it calls storms, but never one where the whole backbone was gone.

Meta said future drills would simulate a backbone loss and that it would strengthen its testing. It did not publish the command or the bug, and it didn't publish a fix either. Outside estimates of the lost revenue run from about $3.3 million in US advertising to about $100 million, depending on what gets counted.

Facebook's recovery tools ran on the network they were meant to fix. I'd check that about my own setup before almost anything else.

Sources

Santosh Janardhan, Update about the October 4th outage. Engineering at Meta, 4 October 2021.

Santosh Janardhan, More details about the October 4 outage. Engineering at Meta, 5 October 2021.

Celso Martinho and Tom Strickx, Understanding How Facebook Disappeared from the Internet. Cloudflare, 4 October 2021.

Doug Madory, Facebook's historic outage, explained. Kentik, 5 October 2021.

Salvador Rodriguez, Facebook shares drop nearly 5% after major site outage and whistleblower interview. CNBC, 4 October 2021.

Tom Huddleston Jr., Facebook's outage cost it an estimated $100 million in lost revenue. CNBC, 6 October 2021.

Brian Krebs, What Happened to Facebook, Instagram, & WhatsApp? KrebsOnSecurity, 4 October 2021.

Times are as observed by Cloudflare and Kentik. Meta published no clock times. Dollar figures are outside estimates.

This one came three years after Facebook, and it started with a configuration file that stopped millions of computers from starting at all.

CrowdStrike

19 July 2024, 04:09 to 05:27 UTC. The bad file was live for 78 minutes, and recovery took days.

What failed
Windows computers running CrowdStrike's Falcon security sensor
The bug
A content file used a 21st input field, but the sensor code only ever supplied 20
Reach
About 8.5 million Windows devices by Microsoft's estimate, including airlines, hospitals, banks, broadcasters and emergency lines
Cost
Estimated at $5.4 billion for the US Fortune 500 alone, not counting Microsoft

Channel files

Falcon runs a driver deep inside Windows, loaded early in boot, so it can see attacks as they happen. CrowdStrike updates its detection rules through small content files, called channel files, and it can push them to every customer within minutes. Because they counted as configuration data rather than code, they skipped the slower release process that code went through.

In February 2024, a sensor update added a new template for watching how Windows programs talk to each other. The template defined 21 input fields, and the code that fed it supplied 20. Nobody noticed for five months, since every rule shipped so far had used a wildcard for the 21st field.

On 19 July, Channel File 291 added a rule that compared the 21st field against a real value. The sensor reached for an input that did not exist and read past the end of its array, which crashed Windows. The driver loads at boot, so the machine crashed again every time it started.

The recovery lab

Push the file and withdraw it. After that, try to get 24 machines working again.

Crashed
0 of 24
Fixed
0
Technician
Idle

The fix steps follow CrowdStrike's and Microsoft's guidance. You boot into Safe Mode or the recovery environment, enter the BitLocker key if the disk is encrypted, delete the files matching C-00000291*.sys in the CrowdStrike drivers folder, and reboot. The odds on the reboot button are illustrative.

What happened when

  1. Sensor 7.11 ships with the new template, which defines 21 fields while the code supplies 20.
  2. UTC. Channel File 291 goes out with two new rules, and one of them uses the 21st field.
  3. The file is withdrawn. Machines that have already crashed stay down.
  4. Microsoft estimates that 8.5 million Windows devices were affected, under 1 percent of all Windows machines. A recovery tool follows soon after.
  5. CrowdStrike reports about 99 percent of Windows sensors back online.
  6. CrowdStrike publishes its root cause analysis.

What the testing missed

The tests used wildcards in the 21st field, so the missing input never mattered. The content validator didn't help either. It checked the new rules against a template it believed had 21 inputs, which CrowdStrike's own analysis calls a logic error. Nor did the interpreter that read the file have a bounds check.

The file also went to every customer at once, so there was no small first group of machines to fail before everyone else's did.

CrowdStrike has since added the bounds check, a check on input counts when content is compiled, tests for every field, staged rollouts that start with canary machines, and an option for customers to choose when content updates reach them. Delta Air Lines puts its own losses at more than $500 million. CrowdStrike disputes that figure.

A file that can change what a driver does should be tested like code and rolled out in stages, even when the update feels urgent.

Sources

CrowdStrike, External Technical Root Cause Analysis: Channel File 291, 6 August 2024.

CrowdStrike, Preliminary Post Incident Review and Remediation and Guidance Hub, July 2024.

David Weston, Helping our customers through the CrowdStrike outage. Microsoft, 20 July 2024.

Microsoft, New Recovery Tool to help with CrowdStrike issue impacting Windows endpoints, July 2024.

Testimony of Adam Meyers, CrowdStrike, to the US House Committee on Homeland Security, 24 September 2024.

Parametrix, CrowdStrike's Impact on the Fortune 500, 24 July 2024.

Dollar figures are estimates or claims, not audited losses.

The last exhibit started earlier than most of the others in this hall. It has still not ended.

Post Office Horizon

Rolled out from 1999. Convictions quashed by Act of Parliament in 2024.

What failed
Horizon, the counter and accounting system in the UK's Post Office branches, built by ICL Pathway and later Fujitsu
The bugs
Defects that made branch accounts show shortfalls that did not exist
The harm
Sub-postmasters were made to repay the shortfalls, and about 700 were convicted in Post Office prosecutions between 1999 and 2015
Redress
About £1,756 million paid to more than 14,100 claimants, as of 30 October 2026

Accounts that could not be disputed

Sub-postmasters run Post Office branches as independent businesses. Their contract said that deficiencies in the branch accounts must be made good without delay. Once Horizon arrived, the accounts were whatever Horizon said they were. A shortfall on the balance had to be paid or accepted, because the system had no way to dispute a figure.

Horizon had bugs that could create shortfalls, and it did not tell users about them. Branch staff could see only a few weeks of transaction logs on till rolls. They never saw the back-end data, which is where a fault would show. Fujitsu staff could also change branch data remotely, in a way that looked as though the sub-postmaster had made the change. In 2015 the Post Office said publicly that this was impossible, and the High Court later found that statement was not true.

The Post Office was also a private prosecutor. Between 1999 and 2015 it secured about 700 convictions for theft, fraud and false accounting in cases where Horizon evidence may have featured. Other prosecutors brought about 280 more. Since 2000, courts in England and Wales have presumed that a computer was working correctly unless someone shows otherwise.

The counter lab

This is the Dalmellington bug as the High Court described it in 2019. You send one pouch of cash from a core branch to its outreach branch.

What happened at the counter

    What Horizon recorded

      The 2019 judgment and its technical appendix are the source for the mechanism, for the £8,000 that became £32,000, and for the 112 occurrences. In the real case the £24,000 was corrected a few weeks later. The screens, pouch number and timings are illustrative.

      Twenty-five years

      1. Horizon begins rolling out to Post Office branches.
      2. Computer Weekly publishes the first press investigation, and sub-postmasters form a campaign group.
      3. An independent review finds two bugs that affected 76 branches.
      4. The High Court finds that Horizon's bugs could and did cause shortfalls. 555 claimants settle for £57.75 million, most of which goes on legal costs.
      5. The Court of Appeal quashes 39 convictions and calls the prosecutions an affront to the conscience of the court.
      6. The Post Office (Horizon System) Offences Act quashes qualifying convictions in England, Wales and Northern Ireland. Scotland passes its own Act a few weeks later.
      7. The public inquiry publishes the first volume of its final report. More volumes are still to come.

      Evidence and disclosure

      The software was only part of the failure. In 2019 the High Court examined 29 entries in an expert's table of known problems and found that most were bugs able to affect branch accounts. The judge called the original system "not remotely robust". Some of the bugs lay undiscovered for years. Others were known, and a 2010 internal note on one of them listed the risk to ongoing legal cases.

      The defects became convictions because of how the evidence was treated. The Court of Appeal found that the Post Office presented a shortfall from an unreliable system as a proven loss and left the accused to prove otherwise. It also found that the failures of investigation and disclosure were so serious that the prosecutions should never have been brought.

      By June 2026 the 2024 Act had quashed 2,228 convictions belonging to 610 people in England and Wales. The public inquiry, chaired by Sir Wyn Williams, found that many hundreds of people were wrongly convicted and many thousands held responsible for losses that were illusory. In 2025 the government asked for evidence on whether the presumption that computers are reliable should change.

      The Post Office treated Horizon's figures as proof of loss. Where a conviction rests on a computer's output, whoever relies on that output should have to show the system was working correctly.

      Sources

      High Court, Judgment (No. 6) "Horizon Issues", [2019] EWHC 3408 (QB), with Technical Appendix, 16 December 2019.

      High Court, Judgment (No. 3) "Common Issues", [2019] EWHC 606 (QB), 15 March 2019.

      Court of Appeal, Criminal Division, [2021] EWCA Crim 577, 23 April 2021.

      Post Office Horizon IT Inquiry, Final Report Volume 1, 8 July 2025, and progress update, 8 July 2026.

      Post Office (Horizon System) Offences Act 2024 and its Explanatory Notes.

      Ministry of Justice, quashed convictions management information, July 2026, and call for evidence on the use of evidence generated by software in criminal proceedings, January 2025.

      Department for Business and Trade, Post Office Horizon financial redress data as of 30 October 2026.

      Post Office Ltd, Horizon scandal: frequently asked questions, figures on prosecutions 1999 to 2015.

      Second Sight Support Services, Interim Report, 8 July 2013.

      This exhibit names no sub-postmasters. Redress totals change monthly.

      There is one more clock at the end of the hall, and this one is still running.

      The next one: 2038

      19 January 2038, 03:14:07 UTC.

      Many computers count time as the number of seconds since 1 January 1970. Where that count is kept in a signed 32-bit integer, it runs out at 2,147,483,647, which is the same ceiling the Gangnam Style counter was moved away from. One second later the count wraps to its most negative value, and the date reads 13 December 1901.

      The clock lab

      This is the real time, stored the old way. Jump to ten seconds before the limit and watch what the last second does.

      0

      Until the limit
      0

      Most current operating systems and databases have already moved to 64-bit time. The risk is in whatever has not moved yet. That means embedded devices and code that stores time in a 32-bit field, and also old file formats and database columns.

      The ledger

      You can't add the fourteen exhibits up into one total. Therac-25 and Patriot are counted in deaths and Horizon in convictions, while most of the rest come down to dollars or hours offline, and one cost nothing at all. The table gives each in its own terms, as the sources give it.

      ExhibitWhat it costThe root of it
      Therac-25, 1985Six massive overdoses; at least three deaths attributed to themA race between the keyboard and the beam setup, with no independent hardware interlock
      AT&T, 1990About nine hours of failed long-distance calls; the usual estimate is more than $60 millionRecovery code that mishandled two messages arriving too close together
      Patriot, 199128 soldiers killedA clock that drifted more the longer it ran
      Ariane 5, 1996About $370 million, the most cited estimateReused code that overflowed on new data
      Mars Climate Orbiter, 1999About $327.6 million for the programImperial units sent where metric was expected
      Y2K, 2000About $100 billion to fix in the US; most failures were preventedYears stored as two digits
      Knight Capital, 2012More than $460 million in 45 minutesA reused flag, and one server missed during a deployment
      HealthCare.gov, 2013Two months of a site most people could not useNo end-to-end testing and nobody in charge of the whole thing
      Heartbleed, 2014Private memory exposed on about 17 percent of trusted secure serversA length the server never checked
      Gangnam Style, 2014NothingA 32-bit counter, changed in time
      left-pad, 2016About two and a half hours of failed buildsEleven lines that anyone could remove
      Facebook, 2021Nearly six hours offline for apps with billions of usersA bug in the tool that was supposed to block a bad command
      CrowdStrike, 2024About 8.5 million devices down; $5.4 billion estimated for the Fortune 500An untested field in a configuration file
      Post Office Horizon, 1999 onwardAbout 700 Post Office convictions; £1,756 million in redress so farBugs, plus the belief that the computer must be right

      What most of them share

      Very few of these failures came from code nobody had looked at. Most came from code that had worked somewhere else, under other conditions. Ariane 5 ran code that was fine on a rocket that flew slower. The Patriot clock stayed accurate only if someone restarted it, and CrowdStrike's 21st field had always held a wildcard before that July. And a counter had never had to go that high. In each case the software was doing what it was written to do, for conditions that no longer held.

      Almost every one also had some earlier warning, from a review or a test, that pointed at the problem before it happened. The near miss in the middle of the hall is the case where someone watched a number climb and acted in time. It's the exhibit I'd send people to first.

      Write down what your code assumes about the world, and check those assumptions again before each launch.

      The museum is curated by Bogdan Sandu and published by TMS Outsource, a software development company with engineering teams in Belgrade and Bucharest.