Configure your system

Normally a crash dump is saved in your swap partition after a crash. If you reboot your machine the next time the dump is extracted by savecore(8) from the partition and stored into /var/crash. Due to the fact that /var is a relatively small partition it could be possible that the dump isn't saved, because the dump size is larger than the remaining size.

To circumvent this problem you can change the default settings in /etc/rc.conf:

dumpdev

Indicates the device (usually a swap partition) to which a crash dump should be written in the event of a system crash.

dumpdir

savecore(8) will save that crash dump and a copy of the kernel to the directory specified by the dumpdir variable. The default value is /var/crash. You can set this to another directory on another partition with more space available to safely obtain the dump.

If you are unsure about your swap partition device, use swapinfo(8) or look into /etc/fstab :

Before your machine reboots a crash dump is saved into your swap partition (if you have one and don't disabled crash dumps). Writing the dump to disk takes some time depending on your machine and the amount of RAM installed. This might look like this:

Now your machine reboots, checks its file system and finally extracts the crash dump from the swap partition to your dumpdir (see rc.conf setting above). If your /var partition is to small, you'll see an error similar to the following:

This will take some time dependent on the speed of your machine. See the man page of savecore(8) for more available options.

Upload the crash dump

If you don't have the ability or skills to debug are crash yourselves, please upload the complete content of your crash directory to a public available location (HTTP, FTP web space or your leaf account) and send a detailed bug report to the bugs@dragonflybsd.org list. If its possible please tar and compress (gzip, bzip2) the directory to save disk space and bandwith.

Debug the crash dump with kgdb

The kgdb(1) utility is a debugger based on gdb(1) that allows debugging of kernel core files.

kgdb extesions

To get some handy helper command execute the following command before starting kgdb:

source /usr/src/test/debug/gdb.kernel

This gives you several new commands like kldstat (displays all loaded modules) or psx (displays all running processes).