[Bug 609625] [NEW] kexec-tools 0_kdump

Launchpad Bug Tracker 609625 at bugs.launchpad.net
Sat Mar 12 19:23:15 UTC 2011


You have been subscribed to a public bug by Dominik (dom-fischer):

So in my effort to debug issues with suspend/resume on my dell laptop I
wanted to enable kernel kexec style crash dumps. I found some
information on the ubuntu wiki about using linux-crashdump package to
set this up.

However, my laptop has an encrypted root hard drive and thus needs a
separate partition for /boot that is un-encrypted.

There's a couple of files installed by kexec-tools to help support the
kexec style of crash dump capture.

/usr/share/initramfs-tools/scripts/init-bottom/0_kdump is the script
that supports kdump and I think there's a couple of issues with it
especially in the failure conditions where the tests fail.

The initial part of the script looks like this:
KVER="`uname -r`"
INFO="$rootmnt/boot/vmcoreinfo-$KVER"
CRASHFILE="$rootmnt/var/crash/vmcore"
MAKEDUMPFILE="$rootmnt/usr/bin/makedumpfile"
LOG="$rootmnt/var/crash/vmcore.log"
VMCORE="/proc/vmcore"

# Check that this is a kexec kernel.
grep -q kdump_needed /proc/cmdline || exit 0

# Make sure makedumpfile assumptions are satisfied.
test -e $INFO || exit 0
test -x $MAKEDUMPFILE || exit 0

. ./scripts/functions

log_begin_msg "Saving vmcore from kernel crash"

mount $rootmnt -o remount,rw

There's a couple of issues to get past all the exit zeros. If you have a
separate /boot partition it need to be mounted before checking the
existence of the vmcoreinfo file for the running kernel. The second is
since this failed it continued in the boot process trying to start the
rest of the system normally in the 128M I gave the crash kernel
environment to use. This confused me for some time.

I would recommend changing at least the checks to something as follows.

if grep -q kdump_needed /proc/cmdline ; then
    # we are in a crash dump environment and need to reboot if we can't capture anything
    test -e $INFO || /sbin/reboot
    test -x $MAKEDUMPFILE || /sbin/reboot
else
    exit 0
fi

. ./scripts/functions

log_begin_msg "Saving vmcore from kernel crash"

mount $rootmnt -o remount,rw
...
...

This would cause the system to reboot instead of continuing with the
boot process in the case where makedumpfile isn't there.

Second is the need for the vmcoreinfo file for that kernel. I would
recommend copying it into the initramfs instead of trying to mount more
than just root. Either would be a workable solution though.

My work around was to add a copy_exec /boot/vmcoreinfo-`uname -r` /boot
to the makedumpfile initramfs hook. This copied the 1.4k file into the
15Mb initrd so it wasn't that big of an addition.

ProblemType: Bug
DistroRelease: Ubuntu 10.04
Package: linux-crashdump 2.6.32.24.25
Regression: No
Reproducible: Yes
ProcVersionSignature: Ubuntu 2.6.32-24.38-generic 2.6.32.15+drm33.5
Uname: Linux 2.6.32-24-generic x86_64
AlsaVersion: Advanced Linux Sound Architecture Driver Version 1.0.21.
Architecture: amd64
ArecordDevices:
 **** List of CAPTURE Hardware Devices ****
 card 0: Intel [HDA Intel], device 0: STAC92xx Analog [STAC92xx Analog]
   Subdevices: 2/2
   Subdevice #0: subdevice #0
   Subdevice #1: subdevice #1
AudioDevicesInUse:
 USER        PID ACCESS COMMAND
 /dev/snd/controlC0:  dmlb2000   2170 F.... pulseaudio
CRDA: Error: [Errno 2] No such file or directory
Card0.Amixer.info:
 Card hw:0 'Intel'/'HDA Intel at 0xf5460000 irq 22'
   Mixer name	: 'Intel G45 DEVIBX'
   Components	: 'HDA:111d7605,10280410,00100104 HDA:80862804,80860101,00100000'
   Controls      : 22
   Simple ctrls  : 13
Date: Sat Jul 24 17:19:14 2010
HibernationDevice: RESUME=UUID=414ecb0b-22be-4d37-b67c-918da7f2014b
InstallationMedia: Ubuntu 10.04 LTS "Lucid Lynx" - Release amd64 (20100427.1)
Lsusb:
 Bus 002 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
 Bus 002 Device 002: ID 8087:0020  
 Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 002: ID 8087:0020  
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: Dell Inc. Latitude E4310
ProcCmdLine: BOOT_IMAGE=/vmlinuz-2.6.32-24-generic root=/dev/mapper/dmlb2010--lappy-root ro crashkernel=384M-2G:64M,2G-:128M quiet splash
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.utf8
 SHELL=/bin/bash
RelatedPackageVersions: linux-firmware 1.34.1
RfKill:
 0: phy0: Wireless LAN
 	Soft blocked: no
 	Hard blocked: no
SourcePackage: linux
dmi.bios.date: 05/28/2010
dmi.bios.vendor: Dell Inc.
dmi.bios.version: A02
dmi.board.name: 04FFNC
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 9
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvrA02:bd05/28/2010:svnDellInc.:pnLatitudeE4310:pvr0001:rvnDellInc.:rn04FFNC:rvrA00:cvnDellInc.:ct9:cvr:
dmi.product.name: Latitude E4310
dmi.product.version: 0001
dmi.sys.vendor: Dell Inc.

** Affects: linux (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug kj-expired kj-triage lucid needs-upstream-testing
-- 
kexec-tools 0_kdump
https://bugs.launchpad.net/bugs/609625
You received this bug notification because you are a member of Ubuntu Server Team, which is a direct subscriber.



More information about the Ubuntu-server-bugs mailing list