HEISENBUG(1)resurrection.fun manualHEISENBUG(1)

heisenbug

heisenbug(1) — the manual page

Name

heisenbug — a defect that stops misbehaving the moment you look at it

Synopsis

heisenbug [--observe] [--printf] [--attach gdb] TARGET
observe(bug) → ∅

Description

heisenbug locates a fault, attaches an observer, and reports that no fault is present. The two statements are not in conflict. The fault is present when unobserved and absent when observed, and the observer is the difference. Every instrument you bring to the target — a print statement, a breakpoint, a slower clock — has mass, and the mass lands on the timing that was the whole bug.

It runs in two panels. Off the cursor the target scuttles, drifts state, and files crashes to a log no one is reading. Under the lens it aligns: still, correct, blameless. The attempt counter climbs on every invocation. The witness counter does not move, and has a note explaining why.

heisenbug never returns the defect. It returns a clean frame, a green build, and an alibi. Callers who require the defect are advised to stop looking, which is the one action the tool cannot perform on their behalf.

Options

--observe
Attach an observer to the target. The defect ceases. Returns ∅, which is the finding.
--printf
Insert one diagnostic print. Adds exactly enough delay to conceal the race it was added to reveal.
--attach gdb
Slow the target under a debugger until the bug can no longer be scheduled. Also known as fixing by watching.
--reproduce
Attempt reproduction under observation. Increments attempts. Never increments witnesses. Accepted for morale.
-O0
Recompile without optimizations to look closer. Uninitialized memory now reads differently. This is a different bug.
--ship
Deploy the green build. The defect travels with it, unobserved and rested.

Exit Status

0
no anomaly observed (it was, in fact, observed)
0
cannot reproduce; ticket closed as working
1
crashed in production; no observer was attached
75
works on this machine; retry in CI, alone

History

The -bug half descends from the moth taped into the Harvard Mark II log by Grace Hopper's team in 1947, though "bug" for a hardware fault predates it to Edison in the 1870s. The heisen- half borrows Werner Heisenberg's 1927 uncertainty principle, in which the act of measuring a quantum system perturbs the system measured. The compound circulated in hacker usage through the 1980s and was fixed in the Jargon File. Jim Gray's 1985 paper "Why Do Computers Stop and What Can Be Done About It" formalized its opposite, the solid and reproducible Bohrbug.

Bugs

The witness counter has read 0 since 1985 and is believed accurate.

--observe and the defect cannot be scheduled in the same instant. This is not a limitation of the scheduler.

Closing a report as CANNOT REPRODUCE reopens it in production. Filed by everyone. Status: nominal.

See Also

livelock(1), bitrot(8), thrashing(1). The living exhibit demonstrates the word in motion:

▸ operate heisenbug

Author

Maintained by The Bug, which was working a second ago, holds a verified alibi for every crash you did not see, and behaves for exactly as long as you watch.

resurrection.fun2026-07-17HEISENBUG(1)