n. A software error that disappears or changes its behavior when the programmer tries to trace it or examine it.
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.
HEISENBUG n. A bug which disappears or alters its behavior when one attempts to probe or isolate it.
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.
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.