Bug 219282 - /etc/init.d/kdump should call /sbin/makedumpfile instead of cp
Summary: /etc/init.d/kdump should call /sbin/makedumpfile instead of cp
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools
Version: 5.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Neil Horman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-12-12 13:35 UTC by Frank Ch. Eigler
Modified: 2007-11-30 22:07 UTC (History)
0 users

Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-02-13 17:33:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Frank Ch. Eigler 2006-12-12 13:35:05 UTC
Description of problem:
The kdump init script uses simple and reliable "cp /proc/vmcore /var/crash/...."
to save the crashed kernel's memory image, instead of fancier /sbin/makedumpfile.
The latter program allows useful features like compression or skipping pages,
which in turn permits dramatically smaller disk space consumption.

Please at least make it a sysconfig option for /etc/init.d/kdump to use the
latter tool, if there is some reason not to switch to it wholesale.

Version-Release number of selected component (if applicable):
kexec-tools-1.101-125.el5 (on x86-64)

Comment 1 Neil Horman 2006-12-12 13:58:47 UTC
see /etc/kdump.conf's core_collector option.

Comment 2 Frank Ch. Eigler 2006-12-12 14:15:34 UTC
The setting exists, but looking at /etc/init.d/kdump, it does not appear
to be actually *used*.  It hard-codes "cp" in save_core().


Comment 3 Frank Ch. Eigler 2006-12-12 14:52:08 UTC
Indeed a test with /etc/kdump.conf with
   core_collector makedumpfile -c -d 19
results in an identically large, RAM-size crash image.

Comment 4 Neil Horman 2006-12-12 16:01:33 UTC
you're not using /etc/kdump.conf properly.  save_core() is only used if you boot
to the root file system.  Ideally you specify a dump target in /etc/kdump.conf,
and mkdumprd (which reads kdump.conf) saves the core to the target location from
the initramfs, using cp or makedumpfile as configured.  We had this debate
awhile back about using makedumpfile from the initscript, and the conclusion was
that we assume that if the rootfs gets mounted and init gets run on it, then
something has gone wrong in the initrd, and the save operation failed.  As such,
we are in a last ditch effort to save the vmcore,and we want to keep that as
simple as possible (i.e. just try to copy the core, instead of having to read a
config file and determine which utility to use).

Comment 5 Frank Ch. Eigler 2006-12-12 16:21:15 UTC
This was a vanilla rhel5b2 default installation, and I am in fact happy with
putting crash dumps onto the default /var/crash location.  It seems you are
saying that makedumpfile will only be usable if one overrides the default.

Indeed, a new test confirms it.  If kdump.conf is given a partition to write
to, and I name the root partition, then the core_collector value is used and
we get a nice small vmcore file.  Thank you.

If the default /etc/kdump.conf cannot be changed to activate this feature,
at least consider adding some more commentary to the effect that core_collector
has no effect unless one of the partition designations is also given.


Comment 6 Neil Horman 2006-12-12 16:58:09 UTC
Added additional description to the kexec-kdump-howto.txt in the package docs.

Comment 7 Jay Turner 2007-02-13 17:31:41 UTC
Fix confirmed with kexec-tools-1.101-164.el5.


Note You need to log in before you can comment on or make changes to this bug.