Blog poster- The bug that costs millions

The Bug That Costs Millions: Famous Software Failures and What Testing Would Have Caught

Most famous software failures were not caused by one bad line of code. They were caused by a gap in testing. Code that was never retested. A release nobody checked on every server. An input value nobody tried. A test setup that did not match real life. Knight Capital lost more than $460 million in 45 minutes. One faulty update crashed about 8.5 million Windows devices. In every case below, a specific, well-known type of test would have found the problem before customers did.

This post walks through five real failures. For each one, you get what happened, what it cost, why it happened, and the exact test that would have caught it. The details come from official reports: the SEC, the FCA and PRA, NASA, ESA, and the company’s own root cause analysis.

If you run a fintech, POS or SaaS product, these are not old stories. The same gaps show up in modern release pipelines every week.

1. Knight Capital (2012): $460 million in 45 minutes

What happened. On 1 August 2012, US trading firm Knight Capital released new code to its order router for a new NYSE programme. The code reached seven of its eight servers. The eighth still held old, unused code called Power Peg, and a reused flag switched it back on. When the market opened, the router sent more than 4 million orders into the market while trying to fill just 212 customer orders. (SEC)

What it cost. A loss of more than $460 million, plus a $12 million SEC penalty. Within days the firm needed rescue funding.

Why it happened. In 2005, a code change broke the counter that told Power Peg to stop once an order was filled. The code was left in and never retested. In 2012, no second person checked the deployment on all eight servers. The SEC also found that 97 automated emails flagged an error before the market opened, and nobody acted on them.

What testing would have caught it.

  • Regression testing on any code still in the system after a change, even code nobody uses
  • Post-deployment verification: confirm the build version on every server, then run a smoke test before go-live
  • Feature flag testing: check that reusing a flag cannot wake up an old code path
  • Alert review as part of release sign-off: an error message before launch is a failed test

2. The July 2024 global outage: 8.5 million crashed devices

What happened. On 19 July 2024, CrowdStrike pushed a content update to its Falcon security sensor. Windows machines that received it crashed and got stuck in reboot loops. Microsoft estimated about 8.5 million devices were affected, from airlines to hospitals to banks. (TechTarget)

What it cost. Insurer Parametrix estimated $5.4 billion in direct losses for US Fortune 500 companies alone, not counting Microsoft. 

Why it happened. The company’s own root cause analysis is clear. A template defined 21 input fields, but the code only supplied 20. The automated tests used a wildcard value in the 21st field, so that field was never really exercised. The first update to use a real value in that field triggered an out-of-bounds memory read. A validator meant to catch bad content had a logic error, and this type of content was not released in stages. (CrowdStrike RCA)

What testing would have caught it.

  • Boundary and negative testing with real, non-wildcard values in every field, not only the happy path
  • Contract testing between the definition file and the code that reads it (21 fields promised, 20 delivered)
  • Fuzz testing of the parser that reads incoming content
  • Staged rollout with canary checks, so a crash hits a few machines, not millions

The company added all four of these after the incident.

3. TSB Bank (2018): a migration that locked out customers for months

What happened. In April 2018, UK bank TSB moved its customer data to a new IT platform. The data moved correctly, but the platform failed straight away. Branch, phone, online and mobile banking were all disrupted, and some customers had problems until December 2018. (FCA and PRA statement)

What it cost. A combined £48.65 million fine from the FCA and PRA, plus £32.7 million paid to customers in redress.

Why it happened. TSB’s own account says the two data centres behind the new platform were configured differently, even though they were specified to be identical. Despite extensive testing, this was not found before go-live. (TSB) Press coverage of the independent review reported that performance testing was run on only one of the two data centres. 

What testing would have caught it.

  • Performance and load testing on the full production setup, with both data centres running together
  • Environment parity checks that compare configuration between environments and flag any drift
  • Phased migration with clear pass or fail gates and a tested rollback plan
  • Fixed test targets: if a load test fails, fix the system, not the target

4. NASA Mars Climate Orbiter (1999): lost to a unit mismatch

What happened. After nine months in space, the orbiter flew about 170 km lower than planned at Mars and was presumably destroyed by the atmosphere. Ground software calculated thruster force in pounds, while the rest of the system expected newtons. Each small error was about 4.45 times too large, and they added up over the whole journey. 

What it cost. A spacecraft reported at the time to have cost $125 million. (LA Times, 1999)

Why it happened. The software requirements said metric. The delivered software used English units. NASA’s case study says verification did not confirm the software met its requirements, and the board found no evidence of complete end-to-end testing. Odd navigation data was noticed during the flight but only discussed informally.

What testing would have caught it.

  • Interface testing against the written specification, including units, formats and ranges
  • End-to-end integration testing with real data passing between both teams’ systems
  • Formal defect logging: an unexplained anomaly is a bug ticket, not a hallway chat

5. Ariane 5 Flight 501 (1996): reused code, new conditions

What happened. On 4 June 1996, the first Ariane 5 rocket veered off course about 40 seconds into its flight, broke up and exploded. Both of its guidance computers failed at almost the same moment. (ESA)

What it cost. The launcher and its payload on a maiden flight.

Why it happened. The guidance software was reused from the older Ariane 4. Ariane 5 flew a faster trajectory, so one value grew too large when converted from a 64-bit number to a 16-bit integer, and the software shut down. The backup ran the same code, so it failed the same way. ESA’s inquiry board said the reviews and tests did not include adequate testing of this system, and the test conditions were not representative of a real Ariane 5 flight.

What testing would have caught it.

  • Re-testing reused components under the new product’s real conditions, not the old one’s
  • Boundary value testing on every numeric conversion and limit
  • Realistic simulation using real trajectory data and real components where possible
  • Failure-mode testing of backups, to check they do not fail for the same reason

At a glance: failure, cause and the test that would have caught it

The pattern behind all five

None of these teams skipped testing. Every one of them tested a lot. The failures came from testing that looked complete but missed one condition that real life brought. Four patterns repeat:

  1. Old code and reused code are treated as safe. Knight’s dead code and Ariane’s reused module were both trusted because they had worked before.
  2. Tests use easy data. A wildcard in a field, or flight data from an older rocket, lets a test pass without proving anything.
  3. The test setup is not the real setup. One data centre instead of two. A simulated component instead of the real one.
  4. The release itself is not tested. Deployments, rollouts and migrations are where these failures went live.

What your team can check this quarter

  • ☐ List code paths and feature flags that are no longer used, and remove or retest them
  • ☐ Add at least one boundary and one negative test for every input that comes from outside your system
  • ☐ Compare configuration between staging and production, and write down every difference
  • ☐ Add a post-deployment smoke test that runs on every server or region, every release
  • ☐ Release risky changes in stages, with a rollback you have actually tried
  • ☐ Treat warnings and anomalies before launch as failed tests, with an owner and a ticket

For a payments, POS or SaaS product, these six checks map directly to the gaps behind every failure in this post.

How clan.AP Technologies approaches this

clan.AP Technologies has provided QA services since 2020, working across the whole software development lifecycle, not only the final test run before release. Our strongest work is in payments and fintech, food and hospitality POS, and B2B SaaS, where a release-day mistake reaches real money and real customers fast.

That is why our QA work covers the release itself, not only the features. In practice, that means regression suites that include older code, boundary and negative tests on every external input, environment checks before go-live, and post-deployment smoke tests on every release.

We work as your full QA team, embedded in your sprints on a monthly retainer. Get a full QA team for your product, for what you would pay one engineer locally. Scope confirmed in one 30-minute call.

Book a 30-minute discovery call and we will look at where your current release process could let a costly bug through.

FAQs

What is the most expensive software bug in history? There is no single agreed answer, because costs are measured differently. The July 2024 global outage is one of the largest on record, with an estimated $5.4 billion in direct losses for US Fortune 500 companies alone. Knight Capital’s $460 million loss in 45 minutes is the best documented single-company example.

Could testing really have prevented these failures? The official reports say so in plain terms. ESA’s board said adequate testing could have detected the Ariane 5 fault. The company behind the 2024 outage listed a missing test for real values in one field as part of the cause. Testing does not remove all risk, but each of these gaps had a known test that fits it.

What is regression testing, and why did it matter for Knight Capital? Regression testing checks that existing features still work after a change. Knight changed code in 2005 that broke an old function, and never retested it. When a 2012 release accidentally switched that function back on, it failed in production.

What is the difference between a staged rollout and a full release? A staged rollout sends a change to a small group first, checks the results, then widens it step by step. A full release sends it to everyone at once. Staged rollouts limit the damage if something goes wrong.

How do smaller teams apply these lessons without a big QA budget? Start with the riskiest moments: releases, migrations and changes to shared code. Add post-deployment smoke tests, boundary tests on external inputs and an environment comparison before go-live. These give the most protection for the least effort.

Does AI-assisted testing help catch these kinds of bugs? AI-assisted tools can write test scripts faster, including boundary and negative cases that teams often skip. The value comes when a QA expert reviews every script, so the tests check what really matters for your product.

Leave a Comment

Your email address will not be published. Required fields are marked *