liveBook · Manning

Heisenbug

A heisenbug is a software fault whose behavior changes or disappears when observation or debugging alters the program’s execution.

How 2 Manning books explain it

Learn Concurrent Programming with Go

A Heisenbug is a software bug whose behavior disappears or changes when debugging or observation alters execution timing.

How it is used
Uses timing-sensitive failures to motivate understanding and preventing race conditions in concurrent programs.
How deep it goes
Explains altered timing, shared-memory interleavings, and register updates, but stops before detailing prevention techniques.
Examples
Demonstrates unpredictable account balances through Go goroutines named Stingy and Spendy.
What you can do after
Diagnose timing-sensitive race conditions by recognizing that debugging pauses can change or conceal their behavior.

Read how Learn Concurrent Programming with Go explains heisenbug →

Troubleshooting Java, Second Edition

A Heisenbug is a software behavior or failure that changes when the program is observed or interfered with, especially through debugging.

How it is used
Guides investigation of timing-sensitive and multithreaded failures whose behavior changes under debugging.
How deep it goes
Defines debugger interference and gives alternative techniques, but does not descend into thread-dump or heap-dump analysis.
Examples
Uses multithreaded execution, expiring access tokens, timers, and short-lived external sessions as timing-sensitive cases.
What you can do after
Diagnose with logging, cautious profiling, controlled stubs, or reduced thread counts when debugging changes the symptom.

Read how Troubleshooting Java, Second Edition explains heisenbug →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.