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 2023665 - Make sure dracut-initramfs-restore cleans up the incompletely unpacked initramfs upon forced shutdown
Summary: Make sure dracut-initramfs-restore cleans up the incompletely unpacked initra...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: dracut
Version: 8.5
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Pavel Valena
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
: 1879979 (view as bug list)
Depends On:
Blocks: 1717322 1903942 1969483 2178026
TreeView+ depends on / blocked
 
Reported: 2021-11-16 10:11 UTC by Renaud Métrich
Modified: 2023-03-15 14:05 UTC (History)
11 users (show)

Fixed In Version: dracut-049-201.git20220131.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2178026 (view as bug list)
Environment:
Last Closed: 2022-05-10 15:31:14 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github dracutdevs dracut pull 1643 0 None Merged fix(shutdown): be robust against forced shutdown 2022-01-05 09:58:02 UTC
Red Hat Issue Tracker RHELPLAN-102912 0 None None None 2021-11-16 10:13:22 UTC
Red Hat Product Errata RHBA-2022:2105 0 None None None 2022-05-10 15:31:52 UTC

Description Renaud Métrich 2021-11-16 10:11:32 UTC
Description of problem:

For some still unknown reason on HP systems, hitting Ctrl-Alt-Del from the iLO sends a burst of ctrl-alt-del events, leading to systemd shutting down forcibly the system while dracut-shutdown.service is still running.
In turn, systemd kills all processes making the service, including dracut-initramfs-restore, which hence dies before cleaning up the incompletely unpacked initramfs (because cpio itself got killed).
The result is a system crash when "shutdown" command in the initramfs tries to execute:
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------
[   25.967275] systemd-shutdown[1]: Successfully changed into root pivot.
[   25.968881] systemd-shutdown[1]: Returning to initrd...
[   25.971797] watchdog: watchdog0: watchdog did not stop!
/bin/sh: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or director
y
[   25.974390] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00
[   25.974390] 
[   25.976256] CPU: 0 PID: 1 Comm: shutdown Kdump: loaded Not tainted 4.18.0-348.2.1.el8_5.x86_64 #1
[   25.977464] Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-4.fc34 04/01/2014
[   25.978679] Call Trace:
[   25.979564]  dump_stack+0x5c/0x80
[   25.980548]  panic+0xe7/0x2a9
[   25.981391]  do_exit.cold.23+0x57/0xb6
[   25.982287]  do_group_exit+0x3a/0xa0
[   25.983186]  __x64_sys_exit_group+0x14/0x20
[   25.984133]  do_syscall_64+0x5b/0x1a0
[   25.985006]  entry_SYSCALL_64_after_hwframe+0x65/0xca
[   25.985901] RIP: 0033:0x7f4db749c90e
[   25.986647] Code: 89 fa 41 b8 e7 00 00 00 be 3c 00 00 00 eb 14 0f 1f 44 00 00 89 d7 89 f0 0f 05 48 3d 00 f0 ff ff 7
7 1a f4 89 d7 44 89 c0 0f 05 <48> 3d 00 f0 ff ff 76 e2 f7 d8 89 05 6a f8 20 00 eb d8 f7 d8 89 05
[   25.989464] RSP: 002b:00007ffdc23bce38 EFLAGS: 00000246 ORIG_RAX: 00000000000000e7
[   25.990506] RAX: ffffffffffffffda RBX: 00007f4db74a5210 RCX: 00007f4db749c90e
[   25.991521] RDX: 000000000000007f RSI: 000000000000003c RDI: 000000000000007f
[   25.992591] RBP: 00007f4db76ace5f R08: 00000000000000e7 R09: 0000000000000000
[   25.993667] R10: 0000000000000020 R11: 0000000000000246 R12: 00007f4db76ace70
[   25.994854] R13: 0000000000000001 R14: 00007f4db76ac1d0 R15: 0000000000000000
-------- 8< ---------------- 8< ---------------- 8< ---------------- 8< --------


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

dracut-049-191 (RHEL8)


How reproducible:

Always


Steps to Reproduce:
1. Boot a QEMU/KVM nameed "ctrlaltdel8"
2. From the hypervisor, send a burst of ctrl-alt-del

  # for i in $(seq 1 10); do virsh send-key ctrlaltdel8 KEY_LEFTCTRL KEY_LEFTALT KEY_DELETE; sleep 0.1; done


Actual results:

Crash

Expected results:

No crash

Additional info:

Will submit a Upstream PR soon :)

Comment 1 Renaud Métrich 2022-01-13 15:58:27 UTC
See also #BZ 1924587.

Comment 2 Pavel Valena 2022-01-19 14:21:10 UTC
Prepared: https://github.com/redhat-plumbers/dracut-rhel8/pull/12

Comment 4 Pavel Valena 2022-01-31 13:49:22 UTC
Reviewed and pre-verified in the PR (Comment 2).

Comment 7 David Tardon 2022-03-16 09:12:39 UTC
*** Bug 1879979 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2022-05-10 15:31:14 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 (dracut 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-2022:2105


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