Java thread dump analyzer

Drop or paste a thread dump and see what every thread is doing: deadlocks found, threads stuck behind a lock and who holds it, identical stacks grouped, virtual threads included. It runs in your browser; dumps often hold hostnames and data, and yours never leaves your device.

Drop a thread dump here, , or paste one:

Or open a sample with two deadlocks, taken from a real JVM:

Reads jstack, jcmd Thread.print, kill -3 output (Java 6 to 25), and jcmd Thread.dump_to_file in text or JSON (Java 21+).

How to take a thread dump

jstack -l <pid>
The classic. -l adds the java.util.concurrent locks each thread holds ("ownable synchronizers"), without which a ReentrantLock deadlock cannot be seen. Find the pid with jps or jcmd.
jcmd <pid> Thread.print -l
The same output as jstack, from the tool the JDK now recommends.
jcmd <pid> Thread.dump_to_file -format=json out.json
Java 21 and later. The only format that includes virtual threads, which jstack leaves out; it also groups threads by the executor or scope that owns them.
kill -3 <pid>
On Linux and macOS, makes the JVM print a dump to its own standard output (the application's log), without any JDK tools on the machine. On Windows, Ctrl+Break in the console.

Take three dumps a few seconds apart: a thread in the same place in all three is stuck; one that moves is just busy.

Thread states

RUNNABLERunning Java code, or in native code (including blocking I/O: a thread reading a socket is RUNNABLE).
BLOCKEDWaiting to enter a synchronized block or method whose monitor another thread holds.
WAITINGWaiting with no time limit: Object.wait(), Thread.join(), or parked by LockSupport (j.u.c locks, queues, latches).
TIMED_WAITINGWaiting with a time limit: Thread.sleep(), wait(ms), parkNanos, a poll with a timeout.
NEWCreated but not started.
TERMINATEDFinished.

RUNNABLE does not mean using CPU: a thread blocked reading a socket is RUNNABLE, because the JVM cannot tell native I/O from work. Look at the top frame (socketRead0, epollWait, accept) to tell them apart.

Reading the locks

- locked <0x…>
This frame holds the monitor: it is inside synchronized on that object.
- waiting to lock <0x…>
BLOCKED, trying to enter synchronized on an object another thread holds. Search the dump for the same address to find the holder.
- waiting on <0x…>
In Object.wait(): it gave the monitor up and waits for notify(). The "locked" line below it is stale; the thread does not hold the lock now.
- parking to wait for <0x…>
Parked by a java.util.concurrent lock, condition, queue or latch. For a lock, the holder appears under "Locked ownable synchronizers" (with -l).

A deadlock is a cycle: thread A holds X and waits for Y, thread B holds Y and waits for X. HotSpot detects monitor and ownable-synchronizer deadlocks itself and prints "Found one Java-level deadlock" at the end of the dump; this page finds the same cycles in every format, including JSON dumps, where the JVM does not report them.