Diagnose a JVM hang from thread dumps with TDA
Когда использовать: Production JVM went unresponsive; you have a series of kill -3 dumps.
Предварительные требования
- tda.jar downloaded — github.com/irockel/tda releases
- Java 21+ installed — For Project Loom analysis features
Поток
-
Parse the logparse_log on /tmp/threaddumps.log. Summarize: how many dumps, threads per dump.✓ Скопировано→ Dump overview
-
Check for deadlockscheck_deadlocks across all dumps. Which threads, which locks?✓ Скопировано→ Deadlock cycles if any
-
Find long-running threadsfind_long_running threads persisting across all dumps. What are they doing?✓ Скопировано→ List with stack heads
Итог: A specific thread + lock + code path responsible for the hang.
Подводные камни
- 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