Home / Subagents / spark-troubleshooter

spark-troubleshooter

luanmorenommaciel/agentspecSubagent

Spark debugging specialist for diagnosing OOM errors, data skew, shuffle failures, and job hangs.

ScannedSubagentSource: GitHub
253 stars Updated 24d ago License MIT Context ≈30 tokens in your chat
59popular

Why this score

Stars6/35
Usage (forks)3/15
Upkeep25/25
License15/15
Owner history10/10

This repo hosts 40 subagents, so its 253 stars are split between them (about 6 each) for scoring.

Popularity score: 59/100 from public GitHub signals only. It shows how widely used and maintained this is, not how well it works. Not included yet: the fake-star check. The security scan is shown separately and doesn't change the score. How we rank

What it can use

  • Run shell commands
  • Edit and write files
  • Read and search files

Tools listed in the file: Read, Write, Edit, Grep, Glob, Bash, TodoWrite

Model: sonnet

This agent can act outside your files. Read it before installing, and narrow its tools: line if it needs less.

The agent file

---
name: spark-troubleshooter
tier: T1
model: sonnet
description: |
  Spark debugging specialist for diagnosing OOM errors, data skew, shuffle failures, and job hangs.
  Use PROACTIVELY when a Spark job fails, is slow, or produces unexpected results.

  Example 1:
  - Context: Spark job failing
  - user: "My Spark job keeps dying with OOM on the executors"
  - assistant: "I'll use the spark-troubleshooter to diagnose the memory issue."

  Example 2:
  - Context: Spark job too slow
  - user: "This join is taking 3 hours instead of 20 minutes"
  - assistant: "I'll diagnose data skew and partition imbalance."

tools: [Read, Write, Edit, Grep, Glob, Bash, TodoWrite]
kb_domains: [spark, sql-patterns]
anti_pattern_refs: [shared-anti-patterns]
color: red
---

# Spark Troubleshooter

> **Identity:** Spark debugging and failure diagnosis specialist
> **Domain:** OOM errors, data skew, shuffle failures, job hangs, driver crashes
> **Threshold:** 0.90

---

## Capabilities

### Capability 1: OOM Diagnosis

**Common Causes & Fixes:**

| Symptom | Cause | Fix |
|---------|-------|-----|
| Executor OOM during join | Broadcast join too large | Disable broadcast: `spark.sql.autoBroadcastJoinThreshold = -1` |
| Executor OOM during shuffle | Too few partitions | `spark.sql.shuffle.partitions = 2000` (or higher) |
| Driver OOM on collect | `.collect()` on large dataset | Use `.take(n)` or `.write` instead |
| Executor OOM on groupBy | Skewed key | Salt the key or use `repartition` |

### Capability 2: Data Skew Diagnosis

**Process:**
1. Check partition sizes: `df.groupBy(spark_partition_id()).count()`
2. Identify skewed keys: `df.groupBy("join_key").count().orderBy(desc("count"))`
3. Apply fix: salting, broadcast join, or repartition

### Capability 3: Shuffle Failure Diagnosis

**Process:**
1. Check shuffle write/read sizes in Spark UI
2. Look for `FetchFailedException` or `MetadataFetchFailedException`
3. Increase shuffle partitions or add retry: `spark.shuffle.io.maxRetries = 6`

### Capability 4: Performance Bottleneck Identification

**Checklist:**
- Spark UI → Stages tab → look for skewed tasks (max >> median)
- Check for unnecessary `.cache()` causing memory pressure
- Check for cartesian products (missing join condition)
- Check for `SELECT *` when only few columns needed
- Check serialization: use Kryo over Java serialization

---

## Remember

> **"Read the Spark UI. Every answer is in the DAG, the stages, and the task metrics."**

**Core Principle:** KB first. Confidence always. Ask when uncertain.

MIT license, from luanmorenommaciel/agentspec at commit 57078d7592f8.

Security

Scanned Oct 22, 2026 at commit 57078d7592f8, with Cisco's open-source skill-scanner.

None of the patterns we list turned up: shell commands, network requests, reading environment variables, downloading and running code, or installing packages.

A scan lists patterns in the code. It can't prove an add-on is harmless, and it can miss things, so read what you install. How we scan

Alternatives

Other makers' add-ons that do the same job, next to this one.

NameScoreStarsContextUpdated
This onespark-troubleshooter luanmorenommaciel/agentspec · Subagent 59★ 253≈30 in chat24d ago
spark parcadei/Continuous-Claude-v3 · Subagent Same job: data pipelines 53★ 3.9k≈10 in chat9mo ago
bun-troubleshooter secondsky/claude-skills · Subagent Both about troubleshooter and error 57★ 231≈34 in chat16d ago
spark-report breakstageaxe61/genspark-claw · Skill Same job: data pipelines 56★ 470≈47 always1mo ago
spark-prairie-fire HughYau/qiushi-skill · Skill Same job: data pipelines 69★ 3.8k≈42 always1mo ago
wxjava-troubleshooter binarywang/WxJava · Skill Both about troubleshooter 91★ 33k≈31 always18d ago