kdump-tools does not start a shell with the given option

Bug #2071589 reported by Javier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Manpage Repository
New
Undecided
Unassigned
kdump-tools (Ubuntu)
New
Undecided
Unassigned

Bug Description

From the Ubuntu manpage for kdump-tools (https://manpages.ubuntu.com/manpages/noble/en/man5/kdump-tools.5.html):

This option starts a shell if kdump-tools cannot save the vmcore file:
              KDUMP_FAIL_CMD="/bin/bash; reboot -f"

But that does not seem to work.

I forced kdump-tools to fail by passing an invalid file to save the dumps, and I triggered a panic with 'echo c > /proc/sysrq-trigger'.

The systems boots the kdump kernel, and then I see the following messages on the screen:

* kdump-tools: failed to save vmcore in /var/crash/no_writtable/202407010739
/etc/init.d/kdump-tools: 36: /bin/bash; : not found
[ OK ] Finished kdump-tools-dump.service - Kernel crash dump capture service.

The system freezes, and only a power cycle can bring the system up again.

I have also tried with KDUMP_FAIL_CMD="/bin/bash", but the system freezes anyway without any error message. A single 'echo XYZ' displays "XYZ", and the system freezes afterwards.

If no KDUMP_FAIL_CMD is set, kdump-tools works normally as long as it finds a valid path to write the dump, so the tool itself is alright.

Is the example given in the manpage wrong? If so, how can I start a shell if the vmcore file cannot be saved?

Tested with Ubuntu 23.10, kernel 6.5.0.42-generic, kdump-tools installed via apt. Links and options for vmlinuz and initrd.img have not been edited (standard location after installation: /var/lib/kdump/{vmlinuz,inird.img}).

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.