Question re: mem= usage and resultant vmcore
anderson at redhat.com
Wed Aug 1 12:29:59 EDT 2007
On an 4GB x86_64 kernel, with memory restricted with "mem=" like so:
kernel /vmlinuz-2.6.18-36.el5 ro root=/dev/VolGroup00/LogVol00
console=ttyS0,115200 mem=2000m crashkernel=128M at 16M
The secondary kernel boots fine with this:
Kernel command line: ro root=/dev/VolGroup00/LogVol00 console=ttyS0,115200
mem=2000m irqpoll maxcpus=1 memmap=exactmap memmap=640K at 0K
memmap=5048K at 16384K memmap=125368K at 22072K elfcorehdr=147440K
The /proc/vmcore shows 4GB:
# ls -l /proc/vmcore
-r-------- 1 root root 4164192032 Aug 1 10:57 /proc/vmcore
I'm not sure whether that's supposed to reflect the "mem=2000m" size
Anyway, when copied to /var/crash, the "cp" command in the kdump init
file returns a 1, and the vmcore file is kept named as "vmcore-incomplete".
But the vmcore-incomplete looks to be the "right" size, and is functional
as a vmcore file:
# crash /usr/lib/debug/lib/modules/2.6.18-36.el5/vmlinux vmcore-incomplete
Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007 Red Hat, Inc.
Copyright (C) 2004, 2005, 2006 IBM Corporation
Copyright (C) 1999-2006 Hewlett-Packard Co
Copyright (C) 2005, 2006 Fujitsu Limited
Copyright (C) 2006, 2007 VA Linux Systems Japan K.K.
Copyright (C) 2005 NEC Corporation
Copyright (C) 1999, 2002 Silicon Graphics, Inc.
Copyright (C) 1999, 2000, 2001, 2002 Mission Critical Linux, Inc.
This program is free software, covered by the GNU General Public License,
and you are welcome to change it and/or distribute copies of it under
certain conditions. Enter "help copying" to see the conditions.
This program has absolutely no warranty. Enter "help warranty" for details.
GNU gdb 6.1
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...
DATE: Wed Aug 1 11:47:13 2007
LOAD AVERAGE: 0.16, 0.14, 0.06
VERSION: #1 SMP Fri Jul 20 14:26:46 EDT 2007
MACHINE: x86_64 (2992 Mhz)
MEMORY: 1.9 GB
PANIC: "SysRq : Trigger a crashdump"
TASK: ffff8100794f0100 [THREAD_INFO: ffff8100656dc000]
STATE: TASK_RUNNING (SYSRQ)
So two questions -- should the /proc/vmcore on the secondary kernel
reflect the restricted size, and what would cause the "cp" to
only copy the "correct" amount, while returning an error code?
More information about the kexec