Diagnose a JVM hang from thread dumps with TDA
Quando usar: Production JVM went unresponsive; you have a series of kill -3 dumps.
Pré-requisitos
- tda.jar downloaded — github.com/irockel/tda releases
- Java 21+ installed — For Project Loom analysis features
Fluxo
-
Parse the logparse_log on /tmp/threaddumps.log. Summarize: how many dumps, threads per dump.✓ Copiado→ Dump overview
-
Check for deadlockscheck_deadlocks across all dumps. Which threads, which locks?✓ Copiado→ Deadlock cycles if any
-
Find long-running threadsfind_long_running threads persisting across all dumps. What are they doing?✓ Copiado→ List with stack heads
Resultado: A specific thread + lock + code path responsible for the hang.
Armadilhas
- Scripts printing to stdout corrupt the JSON-RPC stream — Use
java -Djava.awt.headless=true -jar tda.jar --mcpwithout wrapping in any script that also prints