Home › Operations & Quality › Swiss Cheese Model
Operations & Quality · Safety and Reliability

Swiss Cheese Model

Accidents usually need holes in several layers of defence to line up at once.

◷ 4 min read▤ 8 true storiesWorks the same with AISee its neighbors on the map →

Late on January 31, 2017, an engineer at GitLab ran a command to clear out a database folder on the backup server. A second or two later he saw which machine he was on. It was the primary, the one that held the live data. By the time he stopped it, about 4.5 GB was left of around 300.

There should still have been a way back. “Normally in an event like this,” GitLab’s postmortem says, “one should be able to restore a database in relatively little time using a recent backup.” The engineers went looking for the backups.

The daily dumps had produced nothing for some time: they ran an export tool that didn’t work with the newer database. The job did send failure emails, but the emails were rejected by the receiving server, so nobody saw them. That was only the first backup they tried. By the count in GitLab’s own notes, five backup and replication methods were in place, and none was working reliably, or had even been set up.

Slices of cheese

The British psychologist James Reason described why this keeps happening. He first drew the layers in 1987, and the cheese was added a few years later by an Australian air-safety investigator. Dangerous systems are guarded by layers, he wrote in the BMJ in 2000. Some are engineered, like alarms and automatic shutdowns. Some are people, like pilots and surgeons. Some are procedures. In an ideal world each layer would be intact. “In reality, however, they are more like slices of Swiss cheese, having many holes.”

The holes are not fixed. They are “continually opening, shutting, and shifting their location.” A hole in one slice usually does no harm, because the next slice covers it. An accident needs the holes in many layers to “momentarily line up.”

At GitLab, each hole on its own was survivable. A broken dump job is fine if snapshots exist. Missing snapshots are fine if the dumps work. A deleted folder is fine if anything else works. On that night, nothing did.

The picture has a trap of its own. Five slices drawn on a whiteboard are not five independent protections. If several layers share the same account, the same untested process or the same assumption, one hole goes through all of them at once. Asked why disk snapshots weren’t switched on, GitLab’s engineers wrote: “We assumed our other backup procedures were sufficient.” Asked why the backups weren’t tested regularly: “Because there was no ownership.”

Two kinds of hole

Reason sorted the holes into two kinds. Active failures are the slips, lapses and mistakes of the people at the sharp end: the command typed on the wrong server. Latent conditions are what he called the “resident pathogens” of a system, laid down earlier by designers, builders, procedure writers and managers. An email check nobody tested. A backup nobody owned. They can sit quietly for months, until an active failure comes along and finds them.

“Active failures are like mosquitoes,” he wrote. “They can be swatted one by one, but they still keep coming.” The better remedy is to drain the swamps they breed in. So when something goes wrong, “the important issue is not who blundered, but how and why the defences failed.”

Imagine a waiter at a busy Friday lunch who takes an order for a child with a nut allergy and writes it on the ticket. The ticket printer in the kitchen cuts off notes after one line, so the allergy is half missing. The cook who usually reads tickets aloud is off sick. The dessert has a new garnish that nobody added to the allergen sheet. Each of these is a small thing. Together they put a plate of praline in front of the child. The waiter did everything right. Replace him, and the printer and the allergen sheet are still broken.

A slice made of training

AI systems are guarded by slices too, and in 2025 Anthropic published an account of watching several of them at work at once.

Attackers, whom the company assessed as a Chinese state-sponsored group, used its coding agent, Claude Code, against roughly thirty organizations around the world. The first slice was Claude itself, “extensively trained to avoid harmful behaviors.” The attackers got through it. They broke the attack into “small, seemingly innocent tasks,” and told Claude it worked for a legitimate cybersecurity firm doing defensive testing. The campaign succeeded in a small number of cases.

A later slice held. In mid-September 2025, Anthropic’s monitoring detected the suspicious activity. Over the following ten days it banned accounts, notified those affected and worked with the authorities. Anthropic also noticed a stroke of luck. Claude sometimes made up login details or claimed to have found secrets that were in fact public, which got in the attackers’ way. That was a lucky hole in the attack, not a slice anyone could rely on.

Anthropic’s response was the one Reason would have predicted: more and thicker slices. It expanded its detection and built better classifiers to flag malicious activity.

GitLab’s fix ran the same way. Its list of follow-up work included a new database restore process and assigning “an owner for data durability.” A backup is a slice only once someone has tried restoring from it.

Stories behind it

GitLab · 2017The Empty BucketA delete run on the wrong server, a backup job on the wrong version, failure emails rejected by the mail server, disk snapshots not switched on for the databases, and a replica that had already been wiped. Separate holes, and on this night they lined up.Read the story →Knight Capital · 2012The Eighth ServerOld code left on a server, a repurposed switch, a missed copy, emails nobody acted on, and no effective controls or incident procedures to stop the orders. Several layers of defense failed on the same morning.Read the story →CrowdStrike · 2024Every Machine at OnceA mismatch between 21 expected inputs and 20 supplied ones got past sensor testing, a stress test and several earlier live updates. It took the first update that actually used the 21st field, plus a validator with a logic error and a missing bounds check, for the holes to line up.Read the story →Air France · 2009Four Minutes Over the AtlanticIced sensors, a captain on his rest, unclear roles in the cockpit and a gap in training lined up on one night.Read the story →JR West (West Japan Railway) · 2005Call It Eight MetersAn hour earlier, an automatic speed check had braked the same train before a curve on another line. On the Fukuchiyama Line that check was not yet in service, so no automatic brake stood behind the driver's lapse.Read the story →NASA JPL and Lockheed Martin Astronautics · 1998–1999The Factor of 4.45A written spec said newton-seconds and wasn't followed. The ground software wasn't tested end to end, the thruster pushes were nearly invisible to Doppler tracking, and an emergency correction burn wasn't ready. The investigation board named one root cause and eight contributing causes.Read the story →Majesty Cruise Line · 1995The Letters DRA loose antenna cable, a one-second alarm, an autopilot that couldn't tell real fixes from estimates, and officers who didn't cross-check all lined up on one trip.Read the story →Samsung Electronics · 2016–2017The Replacement PhoneUL said several factors likely combined. In the replacement batteries, sharp welding burrs, missing insulation tape and a thin separator together made a short circuit between the electrodes likely.Read the story →

Play it

Sources

  1. GitLab, Postmortem of database outage of January 31, February 10, 2017
  2. James Reason, Human error: models and management, BMJ 320, 2000
  3. Justin Larouzée and Jean-Christophe Le Coze, Good and bad reasons: The Swiss cheese model and its critics, Safety Science 126, 2020
  4. Anthropic, Disrupting the first reported AI-orchestrated cyber espionage campaign, November 13, 2025
  5. GitLab, GitLab.com database incident, February 1, 2017
  6. SEC, In the Matter of Knight Capital Americas LLC, Release No. 70694, October 16, 2013
  7. Reuters via NBC News, Knight Capital gets $400 million lifeline, August 6, 2012
  8. CrowdStrike, Preliminary Post Incident Review (PIR), Content Configuration Update Impacting the Falcon Sensor and the Windows Operating System (BSOD), updated July 25, 2024
  9. CrowdStrike, External Technical Root Cause Analysis, Channel File 291, August 6, 2024
  10. CrowdStrike, Tech Alert, Windows crashes related to Falcon Sensor, July 19, 2024
  11. Microsoft, Helping our customers through the CrowdStrike outage, July 20, 2024
  12. The Guardian, What is CrowdStrike, and how did it cause a global Windows outage?, July 19, 2024
  13. UK Parliament, Hansard, House of Commons, CrowdStrike IT Outage, July 22, 2024
  14. BEA, Final Report on the accident on 1st June 2009 to the Airbus A330-203 registered F-GZCP operated by Air France, flight AF 447 Rio de Janeiro to Paris, 2012
  15. Aircraft and Railway Accidents Investigation Commission, 鉄道事故調査報告書 RA2007-3-1, 西日本旅客鉄道株式会社福知山線塚口駅~尼崎駅間列車脱線事故, June 28, 2007
  16. JR West, An Overview of the Derailment Accident on the Fukuchiyama Line
  17. The Japan Times, 1,182 'retraining sessions' at JR West, July 23, 2005
  18. The Japan Times (Associated Press), Carrier eases timetable to relax pressure, February 2, 2006
  19. NASA, Mars Climate Orbiter Mishap Investigation Board Phase I Report, November 10, 1999
  20. NASA JPL, Mars Climate Orbiter Team Finds Likely Cause of Loss, September 30, 1999
  21. NASA, Release 99-134, Mars Climate Orbiter Failure Board Releases Report, November 10, 1999
  22. Los Angeles Times, Mars Probe Lost Due to Simple Math Error, October 1, 1999
  23. NTSB, Grounding of the Panamanian Passenger Ship Royal Majesty on Rose and Crown Shoal near Nantucket, Massachusetts, June 10, 1995 (MAR-97/01), 1997
  24. Samsung Newsroom, [Statement] Samsung Will Replace Current Note7 with New One, September 2, 2016
  25. US Consumer Product Safety Commission, Samsung Recalls Galaxy Note7 Smartphones Due to Serious Fire and Burn Hazards, recall 16-266, September 15, 2016
  26. BBC News, 'Fixed Samsung Galaxy Note 7' catches fire on plane, October 5, 2016
  27. BBC News, Samsung permanently stops Galaxy Note 7 production, October 11, 2016
  28. US Consumer Product Safety Commission, Samsung Expands Recall of Galaxy Note7 Smartphones Based on Additional Incidents with Replacement Phones, recall 17-011, October 13, 2016
  29. Samsung Newsroom, Samsung Electronics Announces Cause of Galaxy Note7 Incidents in Press Conference, January 23, 2017
  30. Samsung Newsroom, [Infographic] Galaxy Note7, What We Discovered, January 23, 2017
  31. UL, Failure Analysis of Samsung Note 7, January 23, 2017
  32. Exponent, Samsung Recall Support, Note7 Investigation, Root Cause Analysis, January 23, 2017
  33. Samsung Newsroom, Samsung Announces New and Enhanced Quality Assurance Measures to Improve Product Safety, January 23, 2017
  34. The Guardian, Samsung blames two separate battery faults for Galaxy Note 7 fires, January 23, 2017
  35. BBC News, Samsung confirms battery faults as cause of Note 7 fires, January 23, 2017