liveBook · Manning

Heisenbug

A heisenbug is a software fault whose behavior changes or disappears when observation or diagnosis 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 →

What to know first

Related concepts

Questions about heisenbug

What is heisenbug?

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

Which Manning books explain heisenbug?

Learn Concurrent Programming with Go and Troubleshooting Java, Second Edition.

What should I know before learning heisenbug?

Manning books that teach heisenbug usually introduce caching and shared memory first.

What is the difference between heisenbug and debugger?

A heisenbug is a software fault whose behavior changes or disappears when observation or diagnosis alters the program's execution. A debugger is a software tool for controlling program execution and inspecting runtime state to investigate behavior and diagnose defects.

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.