NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Constant coredumps



hello,

On Mon, Feb 28, 2022 at 10:50:00AM -0500, Todd Gruhn wrote:
> I noticed that every time I   start NetBSD I get a message that says
> it compressing netbsd.core.
> 
> Why is this happening? Has anyone noticed this?

Every time? how many files are in /var/crash? what do

df -h /var/crash
and
du -h /var/crash
show?

Normally, this means that every time you're booting, the system finds
the signature of a system core dump in the swap partition.

In this case, one of the startup files will save the coredump from
the dump partiton - normally the (first) swap partion - to the filesystem,
and save the (compressed) current kernel alongside, so that somebody could
use both to find out what the problem is.

This either means that you always reboot by crashing the NetBSD
kernel, or that the filesystem /var/crash is on is too small to
add your core dump and your compressed kernel, so this never
finishes.

By looking at the answer to my above questions, you can distinguish the
cases.

If you don't intend to debug an old kernel crash, you can get rid of
it by running

/sbin/savecore -c

with swap disabled, e.g. in single user mode, or after
swapctl -d /dev/yourdumpdevice

check for your dump device by

grep dumps /var/run/dmesg.boot

It should look similar to this:

$ grep dump /var/run/dmesg.boot
root on wd0a dumps on wd0b

so you would

/sbin/swapctl -d /dev/wd0b
/sbin/savecore  -c
/sbin/swapctl -a /dev/wd0b

in this case...

If the message reappears when rebooting after that, your kernel had
crashed again, instead of shutting down cleanly.

Good luck!

	-is


Home | Main Index | Thread Index | Old Index