The Therac-25 was a medical linear accelerator used to treat cancer patients, but suffered fatal software failures that resulted in massive overdoses of radiation. An investigation found the accidents were caused by race conditions in the software from reused code that was not properly tested. The software failed to synchronize changes by the operator with radiation output, resulting in beams being turned on when not expected. These failures ultimately led to three patient deaths and highlighted the need for rigorous software safety practices for medical devices.