kdump + crash in practice — a real kernel crash captured end to end (sysrq trigger → 96M vmcore on disk → automatic reboot)
Verification scope
Section titled “Verification scope”This page’s evidence is the live-machine track (E3, real destructive testing) — VM 381 euler24-lab (openEuler 24.03 LTS SP4, 2026-11-05): prechecks → echo c > /proc/sysrq-trigger triggers a real kernel crash → kdump captures → automatic reboot → vmcore verification. Raw log: evidence/logs/openeuler-p6-kdump-vm.log; default-state evidence in evidence/logs/openeuler-p2-first-hour-vm.log and evidence/logs/openeuler-p1-kernel-vm.log.
The default state: usable with zero configuration
Section titled “The default state: usable with zero configuration”Three measurements assembled into the default state (no configuration of any kind):
/proc/cmdline: … crashkernel=512M # kernel reservation (install default, see the kernel page)systemctl is-active kdump → active # service enabled by default (first-hour baseline measurement)kdumpctl status → Kdump is operational # precheck reports operational directly/sys/kernel/kexec_crash_size → 536870912 # 512M reservation confirmedopenEuler is one of the few distros with kdump fully ready by default (most minimal EL-family installs ship it off by default (community experience, not checked distro-by-distro)) — crash-capture capability from the moment of install is an implicit plus for production ops.
A real crash test, fully recorded
Section titled “A real crash test, fully recorded”# Prechecks (space: 22G free on /, /var/crash empty)# Trigger (the standard test method for kernel panic)echo c > /proc/sysrq-triggerTimeline (from the log): trigger → SSH drops (Terminated) → the VM is back running about 2.5 minutes later (kdump capture + automatic reboot) → verification:
$ ls -lh /var/crash/127.0.0.1-2026-11-05-14:51:02/vmcore 96M # the complete memory dump at the moment of the crashvmcore-dmesg.txt 52K # the crashing kernel's complete dmesgThe head of vmcore-dmesg.txt is itself proof of usability — the crashing kernel’s boot log carries a complete fingerprint:
Linux version 6.6.0-159.4.3.154.oe2403sp4.x86_64 (gcc_old (GCC) 12.3.1 (openEuler 12.3.1-110.oe2403sp4), GNU ld 2.41)Command line: BOOT_IMAGE=/vmlinuz-… crashkernel=512MTwo immediate payoffs: you can read the dmesg before touching crash (the 52K of text usually contains the panic scene outright); the vmcore’s kernel fingerprint confirms the dump matches the crashing kernel’s version (a precondition for analysis).
Analyzing the vmcore with crash
Section titled “Analyzing the vmcore with crash”The analysis tool is in the repos (container-measured, evidence/logs/openeuler-p6-supplement.log): crash 8.0.4-17.oe2403sp4 (the OS main repo; the extension package crash-gcore-command is listed in the source repo at 1.6.4-7, aarch64 binary not listed — see openeuler-p6-supplement3.log for the supplement). Standard usage (generic EL):
dnf -y install crash "kernel-debuginfo-$(uname -r)" # debuginfo supplies the symbolscrash /var/crash/127.0.0.1-*/vmcore /usr/lib/debug/lib/modules/$(uname -r)/vmlinuxcrash> bt # the crash stackcrash> log # the crash logcrash> ps # the process table at the moment of the crashSpace and retention advice
Section titled “Space and retention advice”- Each vmcore is roughly on the order of the reserved memory (this example: 512M reserved → a 96M actual dump, compression in effect);
/var/crashhas no automatic cleanup (observed in this experiment) (openEuler ships no kdump retention cleanup by default) — fold it into the log-rotation regime (logrotate or a scheduled task keeping the latest N dumps);- Large-memory production machines adjust crashkernel as needed (e.g. start at 256M, 512M-1G on big-memory machines) — after changing the cmdline,
grubby --update-kernel=ALL --args="crashkernel=512M"plus a reboot makes it effective.
Unverified
Section titled “Unverified”- Interactive crash analysis (bt/log/ps) was not executed on this page (the vmcore landing on disk and the dmesg are verified; downloading the debuginfo symbol package is an online operation and this machine is offline);
- kdump behavior when the disk fills and network dumps (nfs/ssh dump) untested;
- Non-panic failures (hang/soft lockup) were not triggered for capture (sysrq c only exercises the panic path).