starrocks/starrocks-debug-skills/node
Claude Code and agent skill by starrocks/starrocks-debug-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when a BE or FE node is abnormal: BE out-of-memory or crash, FE deadlock causing all queries to hang, FE Full GC pauses, or FE heap memory growth and leak. Covers mem_tracker curl analysis, large-memory-alloc log search (query_id → SQL), jstack + DeadLockChecker deadlock tracing, GC log analysis, and memory allocation flame graph interpretation.
Install
npx vskill@latest install starrocks/starrocks-debug-skills/nodeSKILL.md
Node Troubleshooting (BE Crash / OOM, FE Deadlock / GC)
Investigation guide for BE-level crashes and out-of-memory events, FE deadlocks, Full GC pauses, and FE heap memory analysis.
Five root causes account for the vast majority of cases:
- Cause A — Query-caused BE OOM (memory limit exceeded by large query)
- Cause B — BE crash (segfault / internal fatal error)
- Cause C — FE deadlock caused by inconsistent lock ordering
- Cause D — FE Full GC caused by heap too small or memory leak
- Cause E — FE OOM from specific module memory leak
Metric Taxonomy — Read This First
Before using any metrics, understand the two-layer structure:
BE-Side Metrics
| Metric / Source | Meaning | |
|---|---|---|
curl http://<BE>:<port>/mem_tracker | Per-module memory breakdown (current allocations by subsystem) | |
curl http://<BE>:<port>/memz | tcmalloc allocator internal status — heap vs OS footprint | |
starrocks_be_.*_mem_bytes | Per-module memory gauge in Prometheus/Grafana (e.g., starrocks_be_query_mem_bytes) | |
be.WARNING — large memory alloc | Single large allocation events, includes query_id and stack trace | |
dmesg — OOM Killer | Linux kernel OOM Killer records listing killed process and memory pressure |
FE-Side Metrics
| Metric / Source | Meaning | |
|---|---|---|
fe.gc.log — Full GC entries | JVM Full GC frequency, stop-the-world pause duration, Old Gen occupancy | |
fe.WARNING — FE ShutDown! Running Query | Queries running at moment of FE OOM shutdown, each with QueryFEAllocatedMemory | |
fe.log — LockManager / DeadlockChecker | Structured JSON deadlock report: lock chain, waiter threads, hold durations | |
| Memory Allocated Profile (flame graph) | HTML flame graph in fe/log/proc_profile/ — per-callsite allocation breakdown | |
SHOW PROC '/current_queries' | Live view of running queries with memUsageBytes (FE) and memUsageBytes (BE) |
How to Retrieve Metrics
BE memory breakdown
BE log signals
FE GC and OOM signals
FE deadlock signals
Key rules for interpretation:
- When
dmesgshowsKilled process ... (starrocks_be)— the OS killed the BE process, not a StarRocks internal error. Root cause is physical memory exhaustion, not a code bug. large memory allocentries inbe.WARNINGidentify the query_id responsible for the spike. One or two queries can exhaust all BE memory without hitting any per-query limit ifquery_mem_limitis 0 or very high.- FE Full GC pauses > 10 s will cause BE heartbeat timeouts — the FE appears transiently dead. Check
fe.gc.logbefore concluding FE is crashed. LockManager/DeadlockCheckerJSON infe.logis the fastest path to deadlock confirmation — it contains the complete lock chain with thread names and IDs.QueryFEAllocatedMemoryinfe.WARNINGat shutdown is the most direct signal for identifying which query caused FE OOM — match the query_id tofe.audit.logfor the SQL text.
Node Issue Type Reference
| Symptom | Issue Type | First Check | |
|---|---|---|---|
BE process missing from SHOW BACKENDS; dmesg shows Killed process | BE OOM (Linux OOM Killer) | dmesg; be.WARNING for large memory alloc | |
BE process missing; no OOM in dmesg; core dump present | BE crash (segfault) | Core dump stack trace; be.WARNING last 200 lines | |
Queries return version does not exist; DDL hangs | FE deadlock | fe.log for LockManager JSON; jstack | |
FE queries slow; SHOW FRONTENDS shows transient Alive=false | FE Full GC | fe.gc.log Full GC frequency and pause duration | |
FE process exits; fe.WARNING shows FE ShutDown! Running Query | FE OOM (heap exhausted) | fe.WARNING for QueryFEAllocatedMemory; flame graph | |
| BE RSS grows without bound over days; no single large allocation | BE memory leak | mem_tracker trend; upgrade to patched version |
Phase 1 — Classify Node Issue
Goal: determine issue type in under 30 seconds before deeper investigation.
Step 1.1 — BE or FE?
| Observation | Next Step | |
|---|---|---|
BE missing from SHOW BACKENDS; dmesg has OOM entry | Step 1.2 — BE OOM path | |
BE missing; no OOM in dmesg | Step 1.2 — BE crash path | |
FE queries hang or version does not exist errors | Step 1.3 — FE issue path | |
FE transiently Alive=false; recovers after seconds | Step 1.3 — FE Full GC path |
Step 1.2 — BE: OOM or Crash?
Step 1.3 — FE: Deadlock or GC / OOM?
Phase 2 — Locate Root Cause
Step 2.1 — BE OOM: Which Query or Workload?
Pattern match:
| Pattern | Points toward | |
|---|---|---|
One or two large memory alloc entries > 1 GB from HashJoin / Sort | Single large query; → Cause A | |
mem_tracker shows load module dominates | Ingestion-side OOM; check mem_limit vs load concurrency | |
RSS grows slowly over days; mem_tracker shows small allocations each time | Memory tracking leak; upgrade to patched version |
→ Go to Phase 3, Cause A
Step 2.2 — BE Crash: Core Dump Analysis
→ Go to Phase 3, Cause B
Step 2.3 — FE Deadlock: jstack + DeadLockChecker
Method 1 — DeadLockChecker (fastest, v2.5.15+ / 3.0.9+ / 3.1.6+ / 3.2.0+)
The output is structured JSON:
lockDbName— database heldlockState—readLockedorwriteLockedslowReadLockCount— long-held read locks (threshold:slow_lock_threshold_ms, default 3000 ms)lockHoldTime— write lock hold duration (ms)threadInfo— stack trace of lock holderlockWaiters— threads waiting for this lock
To confirm circular wait: match threadInfo thread IDs against other locks' lockWaiters.
Method 2 — jstack (when LockManager JSON is absent)
→ Go to Phase 3, Cause C
Step 2.4 — FE Heap: GC Log + Flame Graph
→ Go to Phase 3, Cause D or Cause E
Phase 3 — Take Action by Cause
Cause A — Query-Caused BE OOM
Confirm all match:
dmesgshows OOM Killer killedstarrocks_bebe.WARNINGhaslarge memory allocentries > 500 MB pointing to HashJoin, Sort, or Agg operators- No or very high
query_mem_limitconfigured
Mechanism: A single large query allocates memory for HashJoin build side or Sort buffer. Without a per-query limit, it can consume all available BE memory. When RSS exceeds the system memory threshold, the Linux OOM Killer sends SIGKILL. The BE process is forcibly terminated — not a graceful shutdown. In-flight transactions cannot publish, causing downstream publish stalls and replica recovery.
Immediate: Kill the offending query
Set per-query memory limit
Enable query spill to disk
Protect BE memory
Monitor recovery
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingnode/SKILL.md
Popularity
- Repository stars
- 78
- Repository forks
- 14
- 7-day trend score
- 0
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/starrocks/starrocks-debug-skills/node)