/ Directory / Playground / tda
● Community irockel ⚡ Instant

tda

by 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.

Why use it

Key features

Live Demo

What it looks like in practice

tda.replay ▶ ready
0/0

Install

Installation instructions in the author repository

Use Cases

Real-world ways to use tda

Diagnose a JVM hang from thread dumps with TDA

👤 Java backend engineers ⏱ ~20 min advanced

When to use: Production JVM went unresponsive; you have a series of kill -3 dumps.

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

Outcome: A specific thread + lock + code path responsible for the hang.

Pitfalls
  • 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

When to use: Virtual threads aren't giving the concurrency you expected — suspect pinning.

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

Outcome: 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

When to use: Your app integrates with native libs and you suspect blocking native calls.

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

Outcome: Targeted review of specific JNI call sites.

Combinations

Pair with other MCPs for X10 leverage

Correlate thread-level findings with JVM metrics

TDA says lock X is contended — show JVM thread_blocked_seconds for the same window from Prometheus.✓ Copied
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.✓ Copied

Tools

What this MCP exposes

ToolInputsWhen to callCost
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

Cost & Limits

What this costs to run

API quota
None
Tokens per call
Thread dumps are huge — 20k+ tokens per full dump. Summarize before dumping to chat
Monetary
Free
Tip
Use get_summary/find_long_running narrowing before asking for full stacks

Security

Permissions, secrets, blast radius

Credential storage: None
Data egress: None — entirely local file parsing

Troubleshooting

Common errors and fixes

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 others

AlternativeWhen to use it insteadTradeoff
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

More

Resources

📖 Read the official README on GitHub

🐙 Browse open issues

🔍 Browse all 400+ MCP servers and Skills

Continue exploring

Related tools and workflows

Choose another guide for your workflow, or explore a collection.

Shared context · gui

Hex-Rays IDA MCP

Use Hex-Rays’ official MCP integration for IDA GUI and headless analysis sessions.

MCP

Browse all topic collections → · See 29 new official additions →