diff --git a/0007-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch b/0007-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch new file mode 100644 index 0000000..57efd5b --- /dev/null +++ b/0007-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch @@ -0,0 +1,109 @@ +From 533d39a6862638f587b231ecf541ab1f5c8e85f9 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Fri, 16 Aug 2024 08:26:34 +0100 +Subject: [PATCH] appliance/init: Don't set impossible "noop" disk scheduler + +Since RHEL 7.4, the noop scheduler is no longer a thing. Trying to +set it results in the error: + + + echo noop + /init: line 108: echo: write error: Invalid argument + +The current recommendation (https://access.redhat.com/solutions/5427) +is to use mq-deadline, but that's also the default so we don't have to +do anything. + +A bigger reason to remove these lines is that kernel 6.11.0 has +introduced a hang where -- rarely -- the ext4 filesystem hangs if you +try to change the scheduler while handing a page fault, even if you're +setting a scheduler that doesn't exist. I couldn't get much detail +except for a couple of stack traces from different VMs: + + crash> set 234 + PID: 234 + COMMAND: "modprobe" + TASK: ffff9f5ec3a22f40 [THREAD_INFO: ffff9f5ec3a22f40] + CPU: 0 + STATE: TASK_UNINTERRUPTIBLE + crash> bt + PID: 234 TASK: ffff9f5ec3a22f40 CPU: 0 COMMAND: "modprobe" + #0 [ffffb21e002e7840] __schedule at ffffffffa718f6d0 + #1 [ffffb21e002e78f8] schedule at ffffffffa7190a27 + #2 [ffffb21e002e7908] __bio_queue_enter at ffffffffa67e121c + #3 [ffffb21e002e7968] blk_mq_submit_bio at ffffffffa67f358c + #4 [ffffb21e002e79f0] __submit_bio at ffffffffa67e1e3c + #5 [ffffb21e002e7a58] submit_bio_noacct_nocheck at ffffffffa67e2326 + #6 [ffffb21e002e7ac0] ext4_mpage_readpages at ffffffffa65ceafc + #7 [ffffb21e002e7be0] read_pages at ffffffffa6381d17 + #8 [ffffb21e002e7c40] page_cache_ra_unbounded at ffffffffa6381ff5 + #9 [ffffb21e002e7ca8] filemap_fault at ffffffffa63761b5 + #10 [ffffb21e002e7d48] __do_fault at ffffffffa63d1892 + #11 [ffffb21e002e7d70] do_fault at ffffffffa63d2425 + #12 [ffffb21e002e7da0] __handle_mm_fault at ffffffffa63d8c6b + #13 [ffffb21e002e7e88] handle_mm_fault at ffffffffa63d95c2 + #14 [ffffb21e002e7ec8] do_user_addr_fault at ffffffffa60b34ea + #15 [ffffb21e002e7f28] exc_page_fault at ffffffffa7186e4e + #16 [ffffb21e002e7f50] asm_exc_page_fault at ffffffffa72012a6 + RIP: 000055d16159f8d8 RSP: 00007ffdd4c1f340 RFLAGS: 00010206 + RAX: 00000000000bec82 RBX: 00007ff2fd00dc82 RCX: 000055d1615b492a + RDX: 00007ffdd4c216b0 RSI: 00000000200bec82 RDI: 000055d185725960 + RBP: 00007ffdd4c1f5a0 R8: 0000000000000000 R9: 0000000000000000 + R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 + R13: 000055d185725960 R14: 00007ffdd4c216b0 R15: 000055d1615b9708 + ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b + + crash> set 230 + PID: 230 + COMMAND: "modprobe" + TASK: ffff98ce03ca3040 [THREAD_INFO: ffff98ce03ca3040] + CPU: 0 + STATE: TASK_UNINTERRUPTIBLE + crash> bt + PID: 230 TASK: ffff98ce03ca3040 CPU: 0 COMMAND: "modprobe" + #0 [ffffaf9940307840] __schedule at ffffffff9618f6d0 + #1 [ffffaf99403078f8] schedule at ffffffff96190a27 + #2 [ffffaf9940307908] __bio_queue_enter at ffffffff957e121c + #3 [ffffaf9940307968] blk_mq_submit_bio at ffffffff957f358c + #4 [ffffaf99403079f0] __submit_bio at ffffffff957e1e3c + #5 [ffffaf9940307a58] submit_bio_noacct_nocheck at ffffffff957e2326 + #6 [ffffaf9940307ac0] ext4_mpage_readpages at ffffffff955ceafc + #7 [ffffaf9940307be0] read_pages at ffffffff95381d1a + #8 [ffffaf9940307c40] page_cache_ra_unbounded at ffffffff95381ff5 + #9 [ffffaf9940307ca8] filemap_fault at ffffffff953761b5 + #10 [ffffaf9940307d48] __do_fault at ffffffff953d1895 + #11 [ffffaf9940307d70] do_fault at ffffffff953d2425 + #12 [ffffaf9940307da0] __handle_mm_fault at ffffffff953d8c6b + #13 [ffffaf9940307e88] handle_mm_fault at ffffffff953d95c2 + #14 [ffffaf9940307ec8] do_user_addr_fault at ffffffff950b34ea + #15 [ffffaf9940307f28] exc_page_fault at ffffffff96186e4e + #16 [ffffaf9940307f50] asm_exc_page_fault at ffffffff962012a6 + RIP: 0000556b7a7468d8 RSP: 00007ffde2ffb560 RFLAGS: 00000206 + RAX: 00000000000bec82 RBX: 00007f5331a0dc82 RCX: 0000556b7a75b92a + RDX: 00007ffde2ffd8d0 RSI: 00000000200bec82 RDI: 0000556ba8edf960 + RBP: 00007ffde2ffb7c0 R8: 0000000000000000 R9: 0000000000000000 + R10: 0000000000000000 R11: 0000000000000202 R12: 00000000200bec82 + R13: 0000556ba8edf960 R14: 00007ffde2ffd8d0 R15: 0000556b7a760708 + ORIG_RAX: ffffffffffffffff CS: 0033 SS: 002b + +Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2303267 +(cherry picked from commit b2d682a4730ead8b4ae07e5aaf6fa230c5eec305) +--- + appliance/init | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/appliance/init b/appliance/init +index 128a3c20e..dae06dbbe 100755 +--- a/appliance/init ++++ b/appliance/init +@@ -104,8 +104,6 @@ udevadm settle --timeout=600 + # Increase the SCSI timeout so we can read remote images. + shopt -s nullglob + for f in /sys/block/sd*/device/timeout; do echo 300 > $f; done +-# https://access.redhat.com/site/solutions/5427 +-for f in /sys/block/{h,s,ub,v}d*/queue/scheduler; do echo noop > $f; done + shopt -u nullglob + + # Set up the network. +-- +2.43.0 + diff --git a/libguestfs.spec b/libguestfs.spec index e62beeb..a37d235 100644 --- a/libguestfs.spec +++ b/libguestfs.spec @@ -42,7 +42,7 @@ Summary: Access and modify virtual machine disk images Name: libguestfs Epoch: 1 Version: 1.52.2 -Release: 3%{?dist} +Release: 4%{?dist} License: LGPL-2.1-or-later # Build only for architectures that have a kernel @@ -86,6 +86,7 @@ Patch0003: 0003-RHEL-Disable-unsupported-remote-drive-protocols-RHBZ.patch Patch0004: 0004-RHEL-Reject-use-of-libguestfs-winsupport-features-ex.patch Patch0005: 0005-New-APIs-findfs_partuuid-and-findfs_partlabel.patch Patch0006: 0006-inspection-Resolve-PARTUUID-and-PARTLABEL-in-etc-fst.patch +Patch0007: 0007-appliance-init-Don-t-set-impossible-noop-disk-schedu.patch BuildRequires: autoconf, automake, libtool, gettext-devel @@ -1112,9 +1113,11 @@ rm ocaml/html/.gitignore %changelog -* Wed Aug 28 2024 Richard W.M. Jones - 1:1.52.2-3 +* Wed Aug 28 2024 Richard W.M. Jones - 1:1.52.2-4 - Synchronize patches with RHEL 9.5 resolves: RHEL-56325 +- appliance/init: Don't set impossible "noop" disk scheduler + resolves: RHEL-56157 * Thu Aug 08 2024 Troy Dawson - 1:1.52.2-2 - Bump release for Aug 2024 java mass rebuild