본문으로 건너뛰기
cccskills
무료GitHub에 공개

core-dumps

Use when loading core files in GDB or LLDB, enabling core dump generation via ulimit or coredumpctl, mapping symbols with debuginfod, or extracting backtraces from production segfaults.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(3)

  • SKILL.md6.5 KB
  • agents/openai.yaml249 B
  • references/cheatsheet.md5.2 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Core dumps

Contract

FieldBound contract
TriggerA program crashed and left a core file, cores need enabling on Linux or macOS, symbols are missing for a production binary, or a backtrace is needed without re-running the program.
AuthorityRead-only. Emits analysis and commands for the operator to run on the target; no file writes, no rollback needed. No remote mutation.
Side effectDiagnostic commands and a crash verdict in chat. Nothing is written.
DoneThe crashing frame, signal, and faulting access are named, or the missing prerequisite (symbols, core file, build ID) is stated.

Inputs

  1. Core file or crash record (required): a core file, a coredumpctl entry, or a /cores/core.<PID> file on macOS.
  2. Binary (required): the exact executable that crashed, ideally the unstripped build.
  3. Build ID or debug package access (optional): needed when the binary is stripped.

Procedure

  1. Enable cores on Linux.

    ulimit -c unlimited                 # this shell only
    ulimit -c                           # confirm
    cat /proc/self/limits               # per-process view
    

    Persist for all users in /etc/security/limits.conf:

    *   soft   core   unlimited
    *   hard   core   unlimited
    

    Control where cores land:

    cat /proc/sys/kernel/core_pattern
    sudo sysctl -w kernel.core_pattern=/tmp/core-%e-%p-%t
    

    %e is the executable name, %p the PID, %t the timestamp. If the pattern starts with |, a pipe handler such as systemd-coredump or apport owns core collection; use step 2 instead of looking for files. Done when: ulimit -c reports unlimited and the pattern names a writable path or a known pipe handler.

  2. Use coredumpctl when systemd collects cores.

    coredumpctl list                    # recorded crashes
    coredumpctl list myapp              # crashes of one executable
    coredumpctl info                    # details of the latest
    coredumpctl gdb                     # open the latest in GDB
    coredumpctl gdb 12345               # open a specific PID
    coredumpctl dump 12345 -o myapp.core   # export the core file
    

    Cores live in /var/lib/systemd/coredump/. Done when: the crash is listed and coredumpctl gdb opens it.

  3. Enable cores on macOS.

    ulimit -c unlimited
    ls /cores/                          # cores land as /cores/core.<PID>
    

    Crash Reporter also writes .crash and .ips logs under ~/Library/Logs/DiagnosticReports/. Done when: a core or crash report exists for the failed run.

  4. Analyze the core with GDB.

    gdb ./prog core.12345
    gdb ./prog-with-symbols core.12345  # use the unstripped build when stripped
    
    (gdb) bt                            # call stack
    (gdb) bt full                       # stack plus locals
    (gdb) info registers                # CPU state at the fault
    (gdb) frame 2                       # jump to a frame
    (gdb) info locals
    (gdb) print ptr
    (gdb) thread apply all bt full      # every thread
    (gdb) print $_siginfo               # signal details on Linux
    

    Done when: the crashing frame, the signal, and the faulting address are named.

  5. Analyze the core with LLDB.

    lldb ./prog -c core.12345
    
    (lldb) target create ./prog --core core.12345   # equivalent, inside LLDB
    (lldb) bt
    (lldb) thread backtrace all
    (lldb) frame select 2
    (lldb) frame variable
    (lldb) register read
    

    Done when: the crashing frame and faulting access are named.

  6. Resolve missing symbols with debuginfod. debuginfod maps build IDs to DWARF data over HTTP.

    export DEBUGINFOD_URLS="https://debuginfod.ubuntu.com https://debuginfod.elfutils.org"
    gdb ./prog core                     # GDB fetches symbols automatically
    debuginfod-find debuginfo <build-id>
    debuginfod-find source <build-id> /path/to/file.c
    

    Done when: symbols resolve, or the build ID is recorded for manual lookup.

  7. Resolve symbols manually when debuginfod cannot help.

    readelf -n ./prog | grep 'Build ID'
    

    Install the matching debug package (prog-dbgsym or prog-dbg on Debian, prog-debuginfo on Fedora/RHEL), then point GDB at it:

    (gdb) set debug-file-directory /usr/lib/debug
    

    Done when: GDB loads the matching debug file and bt shows function names.

  8. Strip for distribution while keeping symbols. Build with symbols, split them out, ship the stripped binary.

    objcopy --only-keep-debug prog prog.debug
    objcopy --strip-debug prog prog.stripped
    objcopy --add-gnu-debuglink=prog.debug prog.stripped
    

    eu-strip -f prog.debug prog does the split in one step. Keep prog.debug in a symbol store indexed by build ID. Done when: the stripped binary resolves symbols through its .gnu_debuglink.

  9. Triage without an interactive session.

    gdb -batch -ex 'bt full' -ex 'thread apply all bt full' ./prog core 2>&1 | tee crash.txt
    gdb -batch -ex 'info registers' ./prog core
    file core                           # signal, PID, architecture
    

    Done when: crash.txt holds the backtrace and register state.

For the core-pattern token table, the public debuginfod server list, and the full command set, see references/cheatsheet.md.

Failure and recovery

  • No core file exists: check ulimit -c, the kernel.core_pattern target, and whether a pipe handler intercepted the dump. Re-run the failing program after fixing the limit.
  • coredumpctl list is empty: cores may go to files instead; check core_pattern and the filesystem it names.
  • GDB reports no debugging symbols found: fetch them through debuginfod (step 6) or install the debug package (step 7). A stripped binary still yields addresses and a usable bt skeleton.
  • The core does not match the binary: GDB warns about mismatched build IDs. Locate the exact binary by build ID; do not trust a same-named rebuild.
  • Corrupted stack: bt stops early or shows ?? frames. Read info registers and walk the stack pointer manually with x/.

Output

A crash verdict naming the signal, the faulting frame and address, and the register state, plus the symbol-resolution path used (unstripped binary, debug package, or debuginfod).

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

af-xdp

무료

Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

agents-md

무료

Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

OutlineDriven/odin-claude-plugin372026년 9월 29일 업데이트

OutlineDriven의 스킬 모두 보기

이 스킬의 문제 신고