Kernel Crash Dumps

Ben Collins ben.collins at canonical.com
Sat Jul 26 20:02:26 BST 2008


On Wed, 2008-07-23 at 19:35 +0100, Matt Zimmerman wrote:
> On Wed, Jun 25, 2008 at 08:57:32AM -0400, Ben Collins wrote:
> > As of the last kernel upload in intrepid, we now have the ability to
> > automatically capture crash dumps from kernel panics.
> > 
> > To enable this, you can install the linux-crashdump-generic meta
> > package. If you don't have universe in your repo, you will also need to
> > get the makedumpfile package.
> 
> When kexec-tools is installed, it causes my machine to kexec instead of
> shutting down or rebooting:
> 
> https://bugs.edge.launchpad.net/ubuntu/+source/kexec-tools/+bug/251242

I noticed this as well. I'll upload a fix that defaults to not doing
this.

> > Once you reboot, everything will be enabled. Any panic by the kernel
> > will reboot into the crashkernel, and save away the kernel core
> > to /var/crash/vmcore.
> > 
> > Right now, this requires a linux-image-debug-generic package (pulled in
> > by the crashdump meta package). However, with the next kernel upload,
> > this wont be needed (saves you from installing a 50Meg package).
> 
> This is good news.  Given that it doesn't require a special kernel image,
> the package should probably be renamed to something more like linux-debug,
> since -generic and -server are presumably identical.

The reason for the debug packages wasn't to boot a different kernel, it
was so that the full -g enabled vmlinux file was available for the
running kernel. This meant possible skew (your running kernel may have
the same ABI, but different version than the debug kernel), so when we
ran makedumpfile to capture the vmcore, it would get things all wrong.

Now we have a vmcoreinfo file included with every kernel (about 6K as
opposed to 60M) which makedumpfile uses to locate the right memory
regions in vmcore, so we don't have to copy all of memory. The still
built debug images are used by developers to process the vmcore+bugs).

The new metapackage definitely should be called just linux-crashdump,
since it isn't specific to any kernel (it just pulls in deps for
makedumpfile, kexec-tools and updated grub).

> > Apport has a bug filed so that it will detect these vmcore's and handle
> > them appropriately by asking the user to file a bug with the vmcore
> > attached.
> 
> Further comments on
> https://bugs.edge.launchpad.net/ubuntu/+source/apport/+bug/241322
> 
> Is there a way to trigger a dump for test purposes?  How did you do your
> testing?

# echo c > /proc/sysrq-trigger




More information about the ubuntu-devel mailing list