Heisenbug
n. A software error that disappears or changes its behavior when the programmer tries to trace it or examine it.
Etymology
Examples
2008
Building concurrent systems is hard. Subtle interactions among threads and the timing of asynchronous events can result in concurrency errors that are hard to ?nd, reproduce, and debug. Stories are legend of so-called "Heisenbugs" that occasionally surface in systems that have otherwise been running reliably for months. Slight changes to a program, such as the addition of debugging statements, sometimes drastically reduce the likelihood of erroneous interleavings, adding frustration to the debugging process.
—Madanlal Musuvathiet, et al., “Finding and Reproducing Heisenbugs in Concurrent Programs” (PDF), 8th USENIX Symposium on Operating Systems Design and Implementation, October 08, 2008
1990
HEISENBUG n. A bug which disappears or alters its behavior when one attempts to probe or isolate it.
—Guy Steele, et al., “Jargon File,” MIT, June 12, 1990
1985 (earliest)
The assertion that most production software bugs are soft Heisenbugs that go away when you look at them is well known to systems programmers. Bohrbugs, like the Bohr atom, are solid, easily detected by standard techniques, and hence boring. But Heisenbugs may elude a bugcatcher for years of execution. Indeed, the bugcatcher may perturb the situation just enough to make the Heisenbug disappear. This is analogous to the Heisenberg Uncertainty Principle in Physics.
—Jim Gray, “Why Do Computers Stop and What Can Be Done About It?” (PDF), Tandem Computers, June 01, 1985
Notes
You might be tempted to think this old programming term is based on Heisenberg's Uncertainty Principle, which states that you can't know a particle's precise position and momentum at the same time (that is, gaining precision with one measurement necessarily means losing precision with the other). Close, but it's actually based on the observer effect, which states that the act of observing certain phenomena (such as electrons) imparts changes to those phenomena.