kdump not working in 20.04, what am I doing wrong?

Asked by Akom

Followed https://ubuntu.com/server/docs/kernel-crash-dump to the tee (all default config)
When triggering with
    sysctl -w kernel.sysrq=1
    echo c > /proc/sysrq-trigger
the kernel crashes and no dump is taken, no kdump output is on the console.
See screeshot: https://pasteboard.co/JgHDoCY.jpg

 "kdump-config show" reports "ready to kdump":

# kdump-config show
DUMP_MODE: kdump
KDUMP_SYSCTL: kernel.panic_on_oops=1
KDUMP_COREDIR: /var/crash
crashkernel addr: 0x5e000000
   /var/lib/kdump/vmlinuz: symbolic link to /boot/vmlinuz-5.4.0-40-generic
kdump initrd:
   /var/lib/kdump/initrd.img: symbolic link to /var/lib/kdump/initrd.img-5.4.0-40-generic
current state: ready to kdump

kexec command:
  /sbin/kexec -p --command-line="BOOT_IMAGE=/boot/vmlinuz-5.4.0-40-generic root=UUID=2ef70f32-e7d2-4fed-992a-6a236076a72f ro reset_devices systemd.unit=kdump-tools-dump.service nr_cpus=1 irqpoll nousb ata_piix.prefer_ms_hyperv=0" --initrd=/var/lib/kdump/initrd.img /var/lib/kdump/vmlinuz

Clean install of Ubuntu Server 20.04, apt is up to date as of today.
/boot and /var are on the root partition (ext4, no LVM used)
Hardware: Asrock J4105 motherboard with 8GB (G.Skill)

ii kdump-tools 1:1.6.7-1ubuntu2.1 amd64 scripts and tools for automating kdump (Linux crash dumps)
ii linux-crashdump amd64 Linux kernel crashdump setup for the latest generic kernel
ii makedumpfile 1:1.6.7-1ubuntu2.1 amd64 VMcore extraction tool

Linux srv 5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Machine kernel-panics under heavy load. Neither manually induced crashes nor sporadic ones trigger kdump. Nothing new in /var/crash.

Question information

English Edit question
Ubuntu makedumpfile Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Akom (regs-akom) said :

Figured it out - not enough memory for the kernel with the default configuration. This is far from obvious since there is no indication of what the problem is, so perhaps this is a bug?

Once I changed /etc/default/grub.d/kdump-tools.cfg from the default to:

(and re-ran "update-grub")

I got my crash dump. Note that crashkernel=512M-:196M,2G-:512M did not work - kernel still only got 197M