Java Thread Dump Analyzer: Find Hangs, Deadlocks, Pools
A thread dump shows what every thread in the JVM was doing at one moment.
$1
Java Thread Dump Analyzer: Find Hangs, Deadlocks, Pools
Example session with this skill installed
Our order service stops responding a few times a day until we restart it. Here's a jstack dump from the last time.
- Read your context and instructions
- Compiled the java thread dump
Java thread dump analysis
14 threads in 1 dump · OpenJDK 64-Bit Server VM (17.0.9+9) · TIMED_WAITING 6 · RUNNABLE 4 · JVM internal 3 · WAITING 1
Verdict: Database connection pool exhausted
Every connection is in use and 5 threads are queued for one. Fix what holds the connections first...
- "http-nio-8080-exec-1" (waiting for a database connection):
com.tokomaju.order.repository.OrderRepository.findByCustomer(OrderRepository.java:58) - ... 4 more
Holding connections and running queries now:
- "http-nio-8080-exec-6":
com.tokomaju.order.repository.OrderRepository.searchByNote(OrderRepository.java:91) - "scheduling-1":
com.tokomaju.order.report.DailySalesReport.generate(DailySalesReport.java:44)
| Pool | Threads | Busy | Busy doing |
|---|---|---|---|
| http-nio-8080-exec-* | 7 | 6 | waiting for a database connection 5, database query 1 |
| scheduling-* | 1 | 1 | database query 1 |
The agent then reads OrderRepository and DailySalesReport, finds the unindexed note search and the report job sharing the web pool, and proposes the index, a separate pool for the job, a query timeout and Hikari leak detection.
Connects securely to your tools. The creator never sees your data.
About this skill
A thread dump shows what every thread in the JVM was doing at one moment. A hung or slow service almost always shows the cause there: request threads queued for a database connection, a lock held during a slow call, a deadlock. The raw dump has hundreds of threads, most of them idle. This skill filters out the idle ones, groups the rest, and names the cause.
Two or three dumps taken 5–10 seconds apart while the problem is happening (one is enough for a deadlock):
- Kubernetes:
kubectl exec <pod> -- jcmd 1 Thread.print > dump1.txt. - No JDK tools in the container:
kill -3 <pid>prints the dump to the process's stdout (the pod log). - Find the pid with
jcmd -lorjps -l.
- Run the analyzer (Python 3.8+, standard library only; it only reads the files):
Reads HotSpot/OpenJDK dumps (jstack, jcmd Thread.print, kill -3); IBM/OpenJ9 javacores are not parsed. Virtual threads (JDK 21+) don't appear in jstack output, and the Thread.dump_to_file format isn't read. A single dump can't tell a stuck thread from a slow one; take two or three. High CPU with no busy app thread usually means GC, which thread dumps don't show.
How to use
- 1
Connect your agent to the Agensi MCP
Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup
- 2
Sign in to Agensi
Your agent shows a sign-in link. Sign in and click Allow.
- 3
Ask for what you need
Your agent loads this skill and uses it on your task. It always asks before buying a skill.
Reviews
No reviews yet
Be one of the first to try it. Every listed skill goes through the trust checks below.
Security scanned
Checked by our 8-point scan before listing
Fresh listing
Recently published to Agensi
Money-back guarantee
Doesn't do what its page promises? You get your money back.
Trust & safety
Security scan
Security scan passed 3 days ago
- Software
Python 3.8+
- Optional
- JDK tools (jcmd or jstack) to take the dumps
Permissions
File Scopes
The bundled script uses only the Python standard library, makes no network calls and writes only to the terminal.
What's inside
Frequently Asked Questions
Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse All Claude Skills.