Bug 219282 - /etc/init.d/kdump should call /sbin/makedumpfile instead of cp
/etc/init.d/kdump should call /sbin/makedumpfile instead of cp
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kexec-tools (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Neil Horman
: Reopened
Depends On:
  Show dependency treegraph
Reported: 2006-12-12 08:35 EST by Frank Ch. Eigler
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version: 5.0.0
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-02-13 12:33:41 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Frank Ch. Eigler 2006-12-12 08:35:05 EST
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 08:58:47 EST
see /etc/kdump.conf's core_collector option.
Comment 2 Frank Ch. Eigler 2006-12-12 09:15:34 EST
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 09:52:08 EST
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 11:01:33 EST
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 11:21:15 EST
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 11:58:09 EST
Added additional description to the kexec-kdump-howto.txt in the package docs.
Comment 7 Jay Turner 2007-02-13 12:31:41 EST
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.