/ 디렉터리 / 플레이그라운드 / tda
● 커뮤니티 irockel ⚡ 바로 사용

tda

제작: 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.

왜 쓰나요

핵심 기능

라이브 데모

실제 사용 모습

tda.replay ▶ 준비됨
0/0

설치

작성자 저장소에서 설치 안내 확인

사용 사례

실전 활용법: tda

Diagnose a JVM hang from thread dumps with TDA

👤 Java backend engineers ⏱ ~20 min advanced

언제 쓸까: 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
흐름
  1. Parse the log
    parse_log on /tmp/threaddumps.log. Summarize: how many dumps, threads per dump.✓ 복사됨
    → Dump overview
  2. Check for deadlocks
    check_deadlocks across all dumps. Which threads, which locks?✓ 복사됨
    → Deadlock cycles if any
  3. Find long-running threads
    find_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 --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

언제 쓸까: Virtual threads aren't giving the concurrency you expected — suspect pinning.

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

결과: 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

언제 쓸까: Your app integrates with native libs and you suspect blocking native calls.

흐름
  1. List native-blocked threads
    get_native_threads for dump #3. Which native methods are they stuck in?✓ 복사됨
    → Thread + native frame list

결과: Targeted review of specific JNI call sites.

조합

다른 MCP와 조합해 10배 효율

Correlate thread-level findings with JVM metrics

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

도구

이 MCP가 노출하는 것

도구입력언제 호출비용
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

비용 및 제한

운영 비용

API 쿼터
None
호출당 토큰
Thread dumps are huge — 20k+ tokens per full dump. Summarize before dumping to chat
금액
Free
팁
Use get_summary/find_long_running narrowing before asking for full stacks

보안

권한, 시크릿, 파급범위

자격 증명 저장: None
데이터 외부 송신: None — entirely local file parsing

문제 해결

자주 발생하는 오류와 해결

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

대안

tda 다른 것과 비교

대안언제 쓰나단점/장점
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

더 보기

리소스

📖 GitHub에서 공식 README 읽기

🐙 열린 이슈 보기

🔍 400+ MCP 서버 및 Skills 전체 보기