Date: Mon, 08 Nov 2021 19:08:31 +0000 From: Alexander <alex@alexslomka.xyz> To: "freebsd-current@freebsd.org" <freebsd-current@freebsd.org> Subject: Problems with getting a crash dump Message-ID: <v5_t5VART-vha7P8SGBRZ35WvfTGSjVObzcgu3dTOMyCnkmFx7yDSDPCVI-MeKICc9HZ7xDJtBJRHq0xxFtUMBO8oiMWqRO62t8Vlebb9rw=@alexslomka.xyz>
next in thread | raw e-mail | index | archive | help
Hello, I am currently using FreeBSD 14.0-CURRENT and I found a bug that triggers a kernel panic. I wanted to make a kernel crash dump to further investigate the issue, but after a few tries I still did not manage to do i= t. I started by following the instructions in the FreeBSD Handbook. I checked = that /dev/nvd0p2.eli is an active swap device and I configured it to be used as = a dump device like this: # dumpon -v /dev/nvd0p2.eli # sysctl debug.kdb.panic=3D1 Then I booted into single user mode to extract the core dumb: # savecore -vC /dev/nvd0p2 checking for kernel dump on device /dev/nvd0p2 mediasize =3D 2147483648 bytes sectorsize =3D 512 bytes magic mismatch on last dump header on /dev/nvd0p2 No dump exists A you can see the core dump was not written to the device. Later I also tri= ed using /dev/nvd0p2 (with out the "eli" part), because /dev/nvd0p2.eli is onl= y available after I enable it using swapon, but the handbook states the I sho= uld first extract the dump, before I use the device as swap again. But the resu= lt was the same. /dev/nvd0p2 is only 2gb in size and it's an encrypted swap de= vice, so I thought that: 1) Maybe the size of the device is to small even for a minidump. 2) Perhaps using encrypted swap as a dump device is not supported. Because of those complications I decided to use an external 8gb USB drive a= s my dump device. # gpart create -s gpt /dev/da0 # gpart add -t freebsd-swap /dev/da0 # swapoff -a # swapon /dev/da0p1 # dumpon -v /dev/da0p1 kernel dumps on priority: device 0: da0p1 I have 8gb of RAM so a 8gb dump device should be big enough for a minidump. I used `sysctl debug.kdb.panic=3D1` to crash the kernel and rebooted the sy= stem. I also waited for 10 minutes to ensure the the kernel finished writing the = core dump to the device. # savecore -vC /dev/da0p1 checking for kernel dump on device /dev/da0p1 mediasize =3D 7744741376 bytes sectorsize =3D 512 bytes magic mismatch on last dump header on /dev/da0p1 No dump exists As you can see I still did not manage to get a kernel crash dump. Any ideas= ? Here is a picture of the output I get after running `sysctl debug.kdb.panic= =3D1`: https://forums.freebsd.org/attachments/img_20211108_163313-jpeg.11936/ PS yes kern.coredump is set to 1.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?v5_t5VART-vha7P8SGBRZ35WvfTGSjVObzcgu3dTOMyCnkmFx7yDSDPCVI-MeKICc9HZ7xDJtBJRHq0xxFtUMBO8oiMWqRO62t8Vlebb9rw=>