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.
How this skill is triggered — by the user, by Claude, or both
Slash command
/rtos-engineer-toolkit:crash-guideThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Systematic approach to RTOS crash/fault root cause analysis.
Systematic approach to RTOS crash/fault root cause analysis.
Read .claude/rtos-knowledge/toolchain.md for debug tool paths (addr2line, GDB, objdump, ELF location). If not found, invoke project-init first.
From the crash log, identify which category:
| Fault Type | Indicators |
|---|---|
| Hard Fault | Fault status registers, fault address |
| Assert / Panic | ASSERT, panic, abort in log |
| Stack Overflow | SP near stack boundary, stack guard triggered |
| Use-After-Free | Access to freed memory, memory sanitizer report |
| Heap Corruption | malloc/free crash, double-free, guard pattern broken |
| Deadlock | Two+ tasks blocked on each other's locks |
| Watchdog Timeout | WDT reset, no explicit fault |
| OOM | Allocation failure, out-of-memory error |
| Bus Error | Unaligned access, invalid address region |
| Null Pointer | Fault address at 0x00000000 or near-zero |
From the crash dump, extract:
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>"
Generate exactly 3 root cause hypotheses ranked by likelihood.
For each hypothesis provide:
Based on analysis, recommend ONE of:
| Pattern | Typical Root Cause |
|---|---|
| Crash in free/dealloc | Double-free or heap corruption |
| Crash at 0x00000000 | Null function pointer call |
| Crash after deferred/async callback | Object freed before callback fires |
| Two tasks deadlocked | Lock ordering violation |
| Periodic watchdog reset | Priority inversion starving critical task |
| Crash only under load | Race condition in shared resource |
| Crash in memcpy/memset | Buffer overflow or unaligned access |
| Assert in semaphore/mutex op | Synchronization object destroyed while in use |
git log --oneline <file>)npx claudepluginhub kaben123/rtos-engineer-toolkit --plugin rtos-engineer-toolkitGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.