Race Condition (Software)
Definition
A software defect in which the program's behaviour depends on the timing or sequence of events, such as two processes accessing shared data in an order the programmer did not anticipate. Race conditions are notoriously difficult to detect during testing because they may only appear under specific real-world input sequences.
- Domain
- Software defect
- Cause
- Timing or order-dependent behaviour
- Common context
- Concurrent access to shared data
- Detection difficulty
- Intermittent, testing-resistant
Common questions
Why are race conditions hard to catch in pre-release testing?+
They only manifest under specific, often rare, interleavings of concurrent operations, so a test suite run in a controlled, low-load environment can pass repeatedly while the same code fails unpredictably under real-world timing and load.
How does a race condition become forensically relevant in a product-liability case?+
If a device's control software has a race condition that occasionally produces an unsafe output, such as a wrong dose or a delayed brake signal, that defect can be the direct technical cause of an injury even though it is absent from most test runs.
Related terms
- Conforming Unit
- A unit that was manufactured in accordance with the approved design specification. A conforming unit may still be involved in an injury...
- In-Process Inspection
- Quality checks performed during production rather than only at final inspection. Dimensional checks, pull-tests, and visual inspection at critical process stages detect...
- ISO 9001
- The international standard for quality management systems published by the International Organization for Standardization. Certification means the organisation has documented and implemented...
- Manufacturing Defect
- A deviation in a specific production unit from the manufacturer's approved design specification, occurring during manufacturing, assembly, or handling before sale. The...
- Statistical Process Control (SPC)
- A method of monitoring a manufacturing process in real time using control charts that distinguish normal process variation (common cause) from signals...