crashkernel setting rarely works on a system with little memory

Bug #1206691 reported by David Medberry
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
grub2 (Ubuntu)
Expired
Medium
Unassigned

Bug Description

In the file /etc/grub.d/10_linux

you will find:

    87 # add crashkernel option if we have the required tools
    88 if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    89 GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
    90 fi

However, I've not seen the 384M-2G:64M work since precise. It works fine if you bump it up to 128M (or just make it crashkernel=128M)

It's not clear to me where to make this change:
medberry@handsofblue:~/work/grub2/grub2$ find . -name 10_linux\* -print0 |xargs --null grep crashkernel
./.pc/ubuntu_failed_boot_menu.patch/util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./.pc/ubuntu_failed_boot_menu.patch/util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
./.pc/ubuntu_gfxpayload_filter.patch/util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./.pc/ubuntu_gfxpayload_filter.patch/util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
./.pc/ubuntu_linux_quiet.patch/util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./.pc/ubuntu_linux_quiet.patch/util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
./.pc/ubuntu_recovery_nomodeset.patch/util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./.pc/ubuntu_recovery_nomodeset.patch/util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
./.pc/ubuntu_vt_handoff.patch/util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./.pc/ubuntu_vt_handoff.patch/util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"
./util/grub.d/10_linux.in:# add crashkernel option if we have the required tools
./util/grub.d/10_linux.in: GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA crashkernel=384M-2G:64M,2G-:128M"

as it appears so many times but the likeliest place is a new patch somewhere. Alternatively, having a way to modify this via something akin to grub.d/42_custom may work.

(This may be considered a Denial of Service as a crash won't work without enough memory and may hang booting--but crashing in the first place is already a limited DoS....)

Revision history for this message
Seth Arnold (seth-arnold) wrote : Bug is not a security issue

Thanks for taking the time to report this bug and helping to make Ubuntu better. We appreciate the difficulties you are facing, but this appears to be a "regular" (non-security) bug. I have unmarked it as a security issue since this bug does not show evidence of allowing attackers to cross privilege boundaries nor directly cause loss of data/privacy. Please feel free to report any other bugs you may find.

information type: Private Security → Public
Revision history for this message
Phillip Susi (psusi) wrote : Re: crashkernel setting rarely works

FYI, the .pc directory is where quilt keeps pristine copies of the files, so you can iginore that directory.

What is the actual problem you are seeing? Is kexec failing to load the crash kernel? Do you have less than 2G of ram?

Changed in grub2 (Ubuntu):
status: New → Incomplete
Revision history for this message
David Medberry (med) wrote :

The actual problem is that the box hangs if there is not enough memory. Unfortunately, I don't have console on this particular box either (as it is an Azure virtual machine.) Using the "extrasmall" instances on Azure provides only 768MB and the "small" which is default only provides 1.75G.

I'll see if I can reproduce the issue on a box (vm) that does have console and provide the log if so.

summary: - crashkernel setting rarely works
+ crashkernel setting rarely works on a system with little memory
Changed in grub2 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Louis Bouchard (louis) wrote :

AFAIK, this bug may be a duplicate of the following longstanding bug :

https://bugs.launchpad.net/ubuntu/+source/kexec-tools/+bug/785394

I have made a habit of increasing the reserved crashkernel= value to 128Mb which is the default in debian though I understand that it may be costly on micro instances

Revision history for this message
David Medberry (med) wrote : Re: [Bug 1206691] Re: crashkernel setting rarely works on a system with little memory

Hi Louis,

Thanks for the response (and I fully agree and went ahead after I was
convinced.)

My official writeup settled it this way (which works for even the smallest
instance on Azure):

WAS:
  74 # add crashkernel option if we have the required tools
    75 if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    76 GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA
crashkernel=384M-2G:64M,2G-:128M"

IS:
    74 # add crashkernel option if we have the required tools
    75 if [ -x "/usr/bin/makedumpfile" ] && [ -x "/sbin/kexec" ]; then
    76 GRUB_CMDLINE_EXTRA="$GRUB_CMDLINE_EXTRA
crashkernel=384M-700M:64M,700M-:128M"

The smallest image on Azure is 768M.

On Wed, Aug 14, 2013 at 4:18 AM, Louis Bouchard <
<email address hidden>> wrote:

> AFAIK, this bug may be a duplicate of the following longstanding bug :
>
> https://bugs.launchpad.net/ubuntu/+source/kexec-tools/+bug/785394
>
> I have made a habit of increasing the reserved crashkernel= value to
> 128Mb which is the default in debian though I understand that it may be
> costly on micro instances
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1206691
>
> Title:
> crashkernel setting rarely works on a system with little memory
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/grub2/+bug/1206691/+subscriptions
>

--
-dave

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for grub2 (Ubuntu) because there has been no activity for 60 days.]

Changed in grub2 (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.