RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1914624 - kdump.service should not be started if crashkernel memory not reserved in kernel command line
Summary: kdump.service should not be started if crashkernel memory not reserved in ker...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: kexec-tools
Version: 8.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Coiby
QA Contact: xiaoying yan
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-01-10 10:52 UTC by Gena Makhomed
Modified: 2022-02-14 18:13 UTC (History)
6 users (show)

Fixed In Version: kexec-tools-2.0.20-43.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-05-18 14:51:57 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Gena Makhomed 2021-01-10 10:52:11 UTC
Description of problem:

kdump.service should not be started if crashkernel memory not reserved in kernel command line

Version-Release number of selected component (if applicable):

binary: kexec-tools-2.0.20-36.el8.x86_64.rpm
source: kexec-tools-2.0.20-36.el8.src.rpm

How reproducible:

always

Steps to Reproduce:

1. Install CentOS Stream 8 with KDUMP disabled

2. reboot

3. check kdump.service status:

systemctl status kdump.service

Actual results:

● kdump.service - Crash recovery kernel arming
   Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled)
   Active: failed (Result: exit-code) since Sun 2021-01-10 00:59:31 EET; 11h ago
 Main PID: 1125 (code=exited, status=1/FAILURE)

Jan 10 00:59:31 centos-stream systemd[1]: Starting Crash recovery kernel arming...
Jan 10 00:59:31 centos-stream kdumpctl[1125]: No memory reserved for crash kernel
Jan 10 00:59:31 centos-stream kdumpctl[1125]: Starting kdump: [FAILED]
Jan 10 00:59:31 centos-stream systemd[1]: kdump.service: Main process exited, code=exited, status=1/FAILURE
Jan 10 00:59:31 centos-stream systemd[1]: kdump.service: Failed with result 'exit-code'.
Jan 10 00:59:31 centos-stream systemd[1]: Failed to start Crash recovery kernel arming.

Expected results:

# systemctl status kdump.service
● kdump.service - Crash recovery kernel arming
   Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Sun 2021-01-10 12:47:40 EET; 9s ago
           └─ ConditionKernelCommandLine=crashkernel was not met

Additional info:

Patch to fix this bug:

# diff -u /usr/lib/systemd/system/kdump.service.orig /usr/lib/systemd/system/kdump.service
--- /usr/lib/systemd/system/kdump.service.orig  2020-11-10 19:59:30.000000000 +0200
+++ /usr/lib/systemd/system/kdump.service       2021-01-10 12:46:51.433000000 +0200
@@ -2,6 +2,7 @@
 Description=Crash recovery kernel arming
 After=network.target network-online.target remote-fs.target basic.target
 DefaultDependencies=no
+ConditionKernelCommandLine=crashkernel

 [Service]
 Type=oneshot

Comment 1 Coiby 2021-01-13 09:48:55 UTC
Hi Gena,

Thanks for reporting this issue and sharing the solution! Upstream commit 0084806493d01d14dc7148b2dd5fc46e07b42c96 kdump.service: use ConditionKernelCommandLine=crashkernel [1] has already fixed it and will be backported to RHEL 8.4.

[1] https://src.fedoraproject.org/rpms/kexec-tools/c/0084806493d01d14dc7148b2dd5fc46e07b42c96?branch=master

Comment 2 Coiby 2021-01-13 10:42:14 UTC
Hi Gena,

I'm sorry I made a false promise that it'll be fixed in RHEL 8.4. I'm yet to get familiar with the development workflow and didn't realize I can't really make that promise before getting QA's blessing.

Comment 13 errata-xmlrpc 2021-05-18 14:51:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (kexec-tools bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:1607

Comment 14 RobbieTheK 2022-02-14 18:13:22 UTC
Not sure if I should file a new bug but here's what we have:
kexec-tools-2.0.20-57.el8_5.1.x86_64
4.18.0-193.el8.x86_64
Red Hat Enterprise Linux release 8.2 (Ootpa)

systemctl status kdump
● kdump.service - Crash recovery kernel arming
   Loaded: loaded (/usr/lib/systemd/system/kdump.service; enabled; vendor preset: enabled)
   Active: inactive (dead)
Condition: start condition failed at Mon 2022-02-14 13:02:36 EST; 3s ago
           └─ ConditionKernelCommandLine=crashkernel was not met

cat /etc/kdump.conf |grep crash
# kernel after a kernel crash in the crash kernel(1st kernel) has happened.
#             "/var/crash".
crashkernel=512M@64M
path /var/crash

The path does exist.
In /etc/default/grub:
GRUB_CMDLINE_LINUX="vconsole.keymap=us crashkernel=512M@64M vconsole.font=latarcyrheb-sun16 biosdevname=0"

I see in the kdump.conf file all the other options do NOT have an equal sign. I've tried it with and without a =.

sudo kdumpctl restart 
kdump: kexec: unloaded kdump kernel
kdump: Stopping kdump: [OK]
kdump: No memory reserved for crash kernel
kdump: Starting kdump: [FAILED]

In  /etc/sysctl.conf  I set:
kernel.panic=0
kernel.unknown_nmi_panic=1

LMK if I should create a new bug.


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