A container crashed overnight leaving only a stack trace, so the author hands the dump to a coding agent. A SKILL.md file teaches it SOS commands and an environment variable captures a Full dump; the agent finds which order had no customer.
Key points
- `dotnet-dump analyze` accepts several -c arguments, so the agent runs SOS commands non-interactively instead of in a shell.
- Three variables, DOTNET_DbgEnableMiniDump, DOTNET_DbgMiniDumpType=4 and DOTNET_DbgMiniDumpName, make the runtime write a dump on crash.
- A Full dump is required: `dumpobj` prints only three lines on Mini or Heap dumps, and the file grows from 72 MB to 118 MB.
- The skill is a SKILL.md file under .claude/skills, .github/skills or .agents/skills, and the personal folder works across repositories.
- Its symptom table points to commands: clrthreads and printexception for a crash, parallelstacks and dumpasync for a hang.
- Rules demand evidence: quote the command and its output, never invent an address, and never diagnose from source code alone.
- In containers createdump needs SYS_PTRACE, and a dump must be analyzed on the OS that produced it.
Real-world use
- a container that restarts overnight and leaves only a stack trace
- analyzing a production dump inside a container built from the same image
- taking an on-demand dump of a still-running process with `dotnet-dump collect --process-id`
This summary was generated by the agent from the original post on Gérald Barré (Meziantou's blog). The full text and all rights belong to its author and publisher. Go to original