/ Verzeichnis / Playground / tda
● Community irockel ⚡ Sofort

tda

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

Warum nutzen

Hauptfunktionen

Live-Demo

In der Praxis

tda.replay ▶ bereit
0/0

Installieren

Wählen Sie Ihren Client

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Öffne Claude Desktop → Settings → Developer → Edit Config. Nach dem Speichern neu starten.

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Cursor nutzt das gleiche mcpServers-Schema wie Claude Desktop. Projektkonfiguration schlägt die globale.

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Klicken Sie auf das MCP-Servers-Symbol in der Cline-Seitenleiste, dann "Edit Configuration".

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "tda": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ],
      "_inferred": true
    }
  }
}

Gleiche Struktur wie Claude Desktop. Windsurf neu starten zum Übernehmen.

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "tda",
      "command": "TODO",
      "args": [
        "See README: https://github.com/irockel/tda"
      ]
    }
  ]
}

Continue nutzt ein Array von Serverobjekten statt einer Map.

~/.config/zed/settings.json
{
  "context_servers": {
    "tda": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/irockel/tda"
        ]
      }
    }
  }
}

In context_servers hinzufügen. Zed lädt beim Speichern neu.

claude mcp add tda -- TODO 'See README: https://github.com/irockel/tda'

Einzeiler. Prüfen mit claude mcp list. Entfernen mit claude mcp remove.

Anwendungsfälle

Praxisnahe Nutzung: tda

Diagnose a JVM hang from thread dumps with TDA

👤 Java backend engineers ⏱ ~20 min advanced

Wann einsetzen: Production JVM went unresponsive; you have a series of kill -3 dumps.

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

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

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

Wann einsetzen: Virtual threads aren't giving the concurrency you expected — suspect pinning.

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

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

Wann einsetzen: Your app integrates with native libs and you suspect blocking native calls.

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

Ergebnis: Targeted review of specific JNI call sites.

Kombinationen

Mit anderen MCPs für 10-fache Wirkung

Correlate thread-level findings with JVM metrics

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

Werkzeuge

Was dieses MCP bereitstellt

WerkzeugEingabenWann aufrufenKosten
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

Kosten & Limits

Was der Betrieb kostet

API-Kontingent
None
Tokens pro Aufruf
Thread dumps are huge — 20k+ tokens per full dump. Summarize before dumping to chat
Kosten in €
Free
Tipp
Use get_summary/find_long_running narrowing before asking for full stacks

Sicherheit

Rechte, Secrets, Reichweite

Credential-Speicherung: None
Datenabfluss: None — entirely local file parsing

Fehlerbehebung

Häufige Fehler und Lösungen

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

Alternativen

tda vs. andere

AlternativeWann stattdessenKompromiss
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

Mehr

Ressourcen

📖 Offizielle README auf GitHub lesen

🐙 Offene Issues ansehen

🔍 Alle 400+ MCP-Server und Skills durchsuchen