/ Annuaire / Playground / tda
● Communauté irockel ⚡ Instantané

tda

par irockel · irockel/tda

Give Claude the power to read Java thread dumps — deadlocks, long-running threads, virtual-thread pinning, native-method blockers.

TDA (Thread Dump Analyzer) ships both a GUI and an MCP mode. In headless JAR mode, it exposes 6+ tools for parsing dump logs, summarizing state, detecting deadlocks, locating long-running threads, and analyzing virtual-thread carrier pinning.

Pourquoi l'utiliser

Fonctionnalités clés

Démo en direct

Aperçu en pratique

tda.replay ▶ prêt
0/0

Installer

Instructions d’installation dans le dépôt de l’auteur

Cas d'usage

Usages concrets : tda

Diagnose a JVM hang from thread dumps with TDA

👤 Java backend engineers ⏱ ~20 min advanced

Quand l'utiliser : Production JVM went unresponsive; you have a series of kill -3 dumps.

Prérequis
  • tda.jar downloaded — github.com/irockel/tda releases
  • Java 21+ installed — For Project Loom analysis features
Déroulement
  1. Parse the log
    parse_log on /tmp/threaddumps.log. Summarize: how many dumps, threads per dump.✓ Copié
    → Dump overview
  2. Check for deadlocks
    check_deadlocks across all dumps. Which threads, which locks?✓ Copié
    → Deadlock cycles if any
  3. Find long-running threads
    find_long_running threads persisting across all dumps. What are they doing?✓ Copié
    → List with stack heads

Résultat : A specific thread + lock + code path responsible for the hang.

Pièges
  • Scripts printing to stdout corrupt the JSON-RPC stream — Use java -Djava.awt.headless=true -jar tda.jar --mcp without wrapping in any script that also prints

Hunt virtual-thread carrier pinning in a Loom app

👤 Teams adopting Project Loom ⏱ ~30 min advanced

Quand l'utiliser : Virtual threads aren't giving the concurrency you expected — suspect pinning.

Déroulement
  1. Capture dumps during load
    Collect thread dumps at peak load; parse_log them in TDA.✓ Copié
    → Dumps loaded
  2. Analyze
    analyze_virtual_threads. Show carrier pinning hotspots and the Java code pinning them (typically synchronized blocks or native methods).✓ Copié
    → Pinning list with source hints

Résultat : Targeted fixes (ReentrantLock instead of synchronized, etc.) backed by evidence.

Identify threads stuck in native methods

👤 Performance engineers on JNI-heavy apps ⏱ ~15 min advanced

Quand l'utiliser : Your app integrates with native libs and you suspect blocking native calls.

Déroulement
  1. List native-blocked threads
    get_native_threads for dump #3. Which native methods are they stuck in?✓ Copié
    → Thread + native frame list

Résultat : Targeted review of specific JNI call sites.

Combinaisons

Associez-le à d'autres MCPs pour un effet X10

Correlate thread-level findings with JVM metrics

TDA says lock X is contended — show JVM thread_blocked_seconds for the same window from Prometheus.✓ Copié
tda + github

Turn findings into issues with code pointers

For the top 3 TDA findings, open a GitHub issue linking the suspect Java source lines.✓ Copié

Outils

Ce que ce MCP expose

OutilEntréesQuand appelerCoût
parse_log path: str First step, always local CPU
get_summary Overview before digging 0
check_deadlocks Hang diagnosis 0
find_long_running min_dumps?: int Persistent threads 0
analyze_virtual_threads Loom diagnostics 0
get_native_threads dump_index?: int JNI suspicion 0
get_zombie_threads Unresolved memory relocations 0
clear Reset before parsing a new log 0

Coût et limites

Coût d'exécution

Quota d'API
None
Tokens par appel
Thread dumps are huge — 20k+ tokens per full dump. Summarize before dumping to chat
Monétaire
Free
Astuce
Use get_summary/find_long_running narrowing before asking for full stacks

Sécurité

Permissions, secrets, portée

Stockage des identifiants : None
Sortie de données : None — entirely local file parsing

Dépannage

Erreurs courantes et correctifs

MCP handshake corrupts

Run JAR exactly per README (headless + --mcp, no wrapper scripts printing to stdout)

parse_log fails on custom dump formats

Ensure dumps are standard HotSpot format; some APMs add prefixes TDA can't parse

Memory blows up on huge logs

Increase JVM heap for tda.jar: -Xmx4g or split the log into chunks

Alternatives

tda vs autres

AlternativeQuand l'utiliserCompromis
FastThread / other online analyzersYou're okay uploading dumps to a third partyData leaves your network
async-profiler + flame graphsYou have live control and want sampling profiler not dumpsDifferent artifact; needs agent attach

Plus

Ressources

📖 Lire le README officiel sur GitHub

🐙 Voir les issues ouvertes

🔍 Parcourir les 400+ serveurs MCP et Skills