Built in on the day it shipped.
+ The questionIf code never wears out, where do its failures come from?
Four conditions at once
In May 2024 Hamilton Medical began correcting the software of its HAMILTON-C6 ventilators, and the FDA classed the action as the most serious type of recall. The fault needed four things to happen together. A clinician pressed the key that briefly raises the oxygen supplied and disconnected the breathing tube to suction the patient's airway. During that disconnection a sensor error occurred, for example because the tubing of the flow sensor was kinked. The ventilator entered its sensor-fail mode. And the patient was reconnected while that mode was still active. In that sequence, and only in it, ventilation might not restart. The FDA's notice lists one injury and one death.
Each of the four events is ordinary in an intensive-care unit. Their combination is rare. The fault that the combination triggered was present in three versions of the software, 1.1.4 to 1.1.6, and in every ventilator that ran them, until version 1.2.3 removed it. No part had worn and no component had drifted. The ventilators that could fail this way were exactly as they had been on the day the software was installed.
A fault waits for its input
In 2002 the FDA issued a guidance on software validation. A guidance states a regulator's current thinking on how to meet the law; it does not bind a maker, but it describes what reviewers expect to see. This one is still in force apart from one section that was replaced in 2025. It puts the difference plainly: "Unlike hardware, software is not a physical entity and does not wear out." A hardware part fails for physical reasons that accumulate: a bearing wears, a capacitor dries, a solder joint cracks under thousands of heating cycles. Its failures are random in the engineering sense: each unit fails at its own moment, and a rate per hour of operation describes the population well.
Software fails only when an input reaches a fault: a flaw in its logic or data that has been there since that version was built. Engineers call these failures systematic. They occur every time the same conditions recur, in every copy of the same version. The time to failure depends on when the triggering input arrives, which depends on how the device is used, not on how long it has been running. A rarely used function can carry a fault for years before any input triggers it, and a busy hospital can trigger it on the first day.
A version that has run in the field for years without a reported failure has shown that the inputs it met so far did not reach a fault. A new hospital, a new workflow or a change in another device can supply the input that the earlier users never did. Field history is useful evidence about the common paths and weak evidence about the rare ones.
Why reliability arithmetic does not transfer
The difference between random and systematic failure changes how safety is argued. For hardware, two independent parts that each fail once in many thousand hours rarely fail in the same hour, so a second part fitted as a backup makes a failure of both far less likely than a failure of either one. For software, two copies of the same program fed the same input fail together, so copying the code adds nothing against its own faults.
Suppose a pump motor fails at random at a rate of 1 in 100,000 per hour, and a second, independent motor is fitted as a backup. The chance that both fail in the same hour is 1 in 100,000 multiplied by 1 in 100,000: 1 in 10,000,000,000. Now suppose the pump's control program has a fault that a particular input triggers once in 100,000 hours of use, and a second processor runs an identical copy as a backup. The input that reaches the first copy reaches the second, so the chance that both fail in the same hour is still 1 in 100,000. The two copies are not independent, and independence is what made the hardware redundancy work. Protection against a software fault has to come from a design that is different or from a check that does not depend on the same code, which is the subject of Chapter 5.
What do such faults look like? Researchers at NIST, the US National Institute of Standards and Technology, studied the 383 software-related device recalls that the FDA recorded from 1983 to 1997, and they could assign a type of fault to 342 of them. Of those, 43 percent were logic faults, such as a wrong condition or an unhandled case, and 24 percent were calculation faults; the rest were spread across data, requirements, timing, interfaces and other types. None is a matter of wear. Each is a decision written into the program that was wrong for some input. The researchers also found that the recalled devices had caused no reported deaths or serious injuries, so the figures describe how software fails, not how often it harms.
A change is a new chance to fail
If faults are built in, the moment of building matters, and building does not stop at the first release. In the FDA's count from 1992 to 1998, 192 of the 242 software-related recalls, 79 percent, came from defects introduced by changes made after the software was first distributed. A fix or a new feature interacts with parts of the program that were already verified, and anything it breaks in those parts is a new fault.
In March 2024 Tandem Diabetes Care recalled version 2.7 of its t:connect app for iPhone, which works with the company's t:slim X2 insulin pump. The FDA's notice describes the mechanism. The app could crash and be relaunched by the phone's operating system again and again, and the repeated relaunches caused excessive Bluetooth communication with the pump, which drained the pump's battery until the pump shut down early and insulin delivery stopped. The recall covered about 86,000 installed apps, and by mid-April 2024 the company had received 224 reports of injury. The FDA recorded the root cause as a software design change. The pump had not changed at all; a new version of the program that talked to it had.
The two halves of the central question start with these two sources of failure. A program that was right for one set of inputs can be wrong for another that arrives later, and a program that was right can become wrong when it is changed. Chapter 3 asks why testing alone cannot rule out either failure, and Part II describes what the software lifecycle does instead.
When a software failure is reported, assume the fault is present in every unit running that version and in every version that shares the code. Reconstruct the exact sequence of inputs and write it as a test that fails on the faulty version. Keep that test permanently in the regression suite, the set of tests rerun after every change to confirm that nothing already verified has broken, so that no later change can bring the fault back unnoticed.
- Software faults are present from the moment the code is written; a failure occurs when an input reaches one, in every copy of that version.
- Software failures are systematic, so the time to failure depends on use, and years without failure say little about rare paths.
- Identical copies of a program fail together, so redundancy that works for hardware does not protect against a software fault.
- Changes are a major source of new faults: 79 percent of the software recalls the FDA counted in 1992 to 1998 came from defects introduced by changes after release.
Let's Talk