Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
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.
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 (systemd 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-2023:2985
Description of problem: When setting ShutdownWatchdogSec=2min for example and using the softdog watchdog (or any other implementation), we can see through a systemtap kernel module that the setting is not taken into account but 600 is used instead (== 10 minutes, the default): -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # cat /etc/systemd/system.conf ... RuntimeWatchdogSec=5min ShutdownWatchdogSec=2min ... # mkdir -p /var/log/journal # systemctl restart systemd-journald # stap -g -m watch_systemd -p 4 -d /usr/lib/systemd/systemd --ldd -e 'probe process("/usr/lib/systemd/libsystemd-shared-239.so").function("watchdog_set_timeout") { printk(2, sprintf("%ld (%s) calling watchdog_set_timeout(%ld)", pid(), execname(), user_long($usec))) # staprun -L ./watch_systemd.ko # reboot -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Result: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- # journalctl -b -1 SYSLOG_IDENTIFIER=kernel -o short-precise --no-pager | grep watchdog_set_timeout Sep 15 13:52:21.248313 vm-rhel8 kernel: 1 (systemd) calling watchdog_set_timeout(600000000) -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- The root cause for this is missing Upstream commit 7d9eea2bd3d4f83668c7a78754d201b226acbf1e. Without this commit, *arg_shutdown_watchdog* variable is reset to the default before calling the shutdown code, as shown below, excerpt of systemd-239/src/core/main.c: -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- : 2617 finish: 2618 pager_close(); 2619 2620 if (m) { 2621 arg_shutdown_watchdog = m->shutdown_watchdog; <<<< VALUE RETRIEVED FROM RUNTIME SETTING 2622 m = manager_free(m); 2623 } 2624 2625 reset_arguments(); <<<< VALUE RESET TO DEFAULT (10 MINS) : 2654 if (shutdown_verb) { 2655 r = become_shutdown(shutdown_verb, retval); <<<< SHUTDOWN CODE CALLED : -------- 8< ---------------- 8< ---------------- 8< ---------------- 8< -------- Version-Release number of selected component (if applicable): systemd-239 How reproducible: Always, see above.