agentsclimarketplace

Crash guide

Skill Kaben123/rtos-engineer-toolkit/skills/crash-guide

Guide systematic crash/fault analysis for RTOS systems. Use when user mentions: crash, coredump, hardfault, assert, panic, memory corruption, use-after-free, stack overflow, watchdog timeout, deadlock, hang, OOM, signal 11, bus error, 崩溃, 死机, 卡死, 内存踩踏, 看门狗超时, or pastes a crash log/dump/backtrace.From its SKILL.md

Install
npx -y skills add Kaben123/rtos-engineer-toolkit --skill crash-guide

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

3.4 KB, as published. Nobody here has run it

Crash Analysis Guide

Systematic approach to RTOS crash/fault root cause analysis.

Prerequisites

Read .claude/rtos-knowledge/toolchain.md for debug tool paths (addr2line, GDB, objdump, ELF location). If not found, invoke project-init first.

Step 1: Classify the Fault Type

From the crash log, identify which category:

Fault TypeIndicators
Hard FaultFault status registers, fault address
Assert / PanicASSERT, panic, abort in log
Stack OverflowSP near stack boundary, stack guard triggered
Use-After-FreeAccess to freed memory, memory sanitizer report
Heap Corruptionmalloc/free crash, double-free, guard pattern broken
DeadlockTwo+ tasks blocked on each other's locks
Watchdog TimeoutWDT reset, no explicit fault
OOMAllocation failure, out-of-memory error
Bus ErrorUnaligned access, invalid address region
Null PointerFault address at 0x00000000 or near-zero

Step 2: Extract Key Information

From the crash dump, extract:

  1. Faulting address (PC / LR / fault address)
  2. Call stack (backtrace with addresses)
  3. Faulting task (name, PID, priority, state)
  4. Register dump (SP, LR, PC, status register)
  5. Memory state (heap free, stack remaining)

Resolve addresses using toolchain from .claude/rtos-knowledge/toolchain.md:

<toolchain-prefix>addr2line -e <elf-path> -f -C <address>

Or with GDB:

<toolchain-prefix>gdb <elf-path> -batch -ex "info line *<address>"

Step 3: Three-Hypothesis Method

Generate exactly 3 root cause hypotheses ranked by likelihood.

For each hypothesis provide:

  • Hypothesis: One-line description
  • Evidence: What in the log supports this
  • Counter-evidence: What might disprove this
  • Verification: Specific command or check to confirm/deny

Step 4: Triage Decision

Based on analysis, recommend ONE of:

  • Immediate fix: Root cause is clear, propose the patch
  • Need more data: Specify what to enable/collect (sanitizer, trace, memory dump)
  • Need reproduction: Suggest minimal reproduction steps
  • Escalate: Multiple subsystems involved, need broader investigation

Common Patterns (Quick Reference)

PatternTypical Root Cause
Crash in free/deallocDouble-free or heap corruption
Crash at 0x00000000Null function pointer call
Crash after deferred/async callbackObject freed before callback fires
Two tasks deadlockedLock ordering violation
Periodic watchdog resetPriority inversion starving critical task
Crash only under loadRace condition in shared resource
Crash in memcpy/memsetBuffer overflow or unaligned access
Assert in semaphore/mutex opSynchronization object destroyed while in use

Important Reminders

  • Assert/panic is a symptom, not the root cause — dig deeper
  • Always check: was the faulting code recently changed? (git log --oneline <file>)
  • Verify your fix addresses the root cause, not just the crash location
  • If toolchain info is missing, ask the user rather than guessing paths

Keep looking

Skills are one crate of 608,475. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.