Thread dump
A thread dump is a diagnostic snapshot of the threads in a running program, including their states and stack traces.
Troubleshooting Java, Second Edition
A thread dump is a snapshot of the states and stack information of an application's threads at a particular moment.
- How it is used
- Diagnoses frozen or unresponsive Java applications by exposing thread states, stack traces, resource use, and lock relationships.
- How deep it goes
- Explains collection, raw-format fields, and lock-cycle analysis, but treats execution dynamics as beyond a single snapshot.
- Examples
- Demonstrates a Java Consumer–Producer deadlock caused by reversing nested synchronized blocks over two shared lists.
- What you can do after
- Diagnose/debug with it by collecting a JVM snapshot, locating blocked threads, tracing lock ownership, and identifying deadlock cycles.
Read how Troubleshooting Java, Second Edition explains thread dump →
Troubleshooting Java: Read, debug, and optimize JVM applications
A snapshot of the threads in a running program and their states and stack traces.
- How it is used
- Investigates unresponsive JVM applications by capturing thread states and blocking relationships at a moment in time.
- How deep it goes
- Explains collection and raw-field interpretation, then traces lock IDs to distinguish deadlocks from chains ending at external events.
- Examples
- Uses a producer and consumer acquiring two list monitors in opposite orders, with raw dump entries showing their mutual blockage.
- What you can do after
- Diagnose deadlocks by collecting a thread dump and following blocked threads through lock IDs.
Read how Troubleshooting Java: Read, debug, and optimize JVM applications explains thread dump →
Also covered in
What to know first
- deadlockA deadlock is a state in which concurrent activities cannot progress because each is waiting for a resource, event, or action that depends on another blocked activity.
- threadA thread is a distinct sequence of execution with its own control flow and state, managed or scheduled by a processor, runtime, or operating system.
- lockingLocking is a synchronization technique that controls concurrent access to a shared resource or protected operation.
Related concepts
- VisualVMproduced by · VisualVM is a Java monitoring and profiling tool for inspecting running applications, JVM behavior, resource usage, and performance.
- fastThreadused by · fastThread is an online tool that analyzes Java thread dumps and presents thread, lock, and diagnostic information.
- instrumentationalternative to · Instrumentation is the addition or configuration of mechanisms in software or systems to observe, measure, or record execution and behavior.
- profilerproduced by · A profiler is software that measures and analyzes a program’s runtime behavior or resource use to characterize performance and identify bottlenecks.
Questions about thread dump
What is thread dump?
A thread dump is a diagnostic snapshot of the threads in a running program, including their states and stack traces.
Which Manning books explain thread dump?
Troubleshooting Java, Second Edition and Troubleshooting Java: Read, debug, and optimize JVM applications.
What should I know before learning thread dump?
Manning books that teach thread dump usually introduce deadlock, thread, lock profiling and locking first.
What is the difference between thread dump and instrumentation?
A thread dump is a diagnostic snapshot of the threads in a running program, including their states and stack traces. Instrumentation is the addition or configuration of mechanisms in software or systems to observe, measure, or record execution and behavior.
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.

