Why might sd-sync hang during shutdown?

When shutting down my Dell 7610 (i7-11800H with RTX 3060 and nvidia driver from rpmfusion), shutdown sometimes hangs for a few minutes. The error in the logs is “Syncing filesystems and block devices - timed out, issuing SIGKILL to PID…”

I’m pasting the last bit of the log file below, from when it starts unmounting things. There’s a kernel bug message in here that might be related, and an error that my luks device is failing to unmount. (On install, I selected the default LUKS encryption option.)

During the actual shutdown, after the logged error, it prints other messages revealing that the process holding things up is sd-sync. It waits for a handful of timeouts and then finally shuts down the system. I have an M.2 NVMe SSD. When I google the error, I get a handful of results relating to server administration and nothing clearly relevant to a simple desktop user. Any advice where I might start in trying to fix this?

Feb 28 14:02:33 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=auditd comm="syste>
Feb 28 14:02:33 inspiron7610 systemd[1]: systemd-tmpfiles-setup.service: Deactivated successfully.
Feb 28 14:02:33 inspiron7610 kernel: audit: type=1131 audit(1646074953.958:319): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:33 inspiron7610 kernel: audit: type=1131 audit(1646074953.959:320): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:33 inspiron7610 kernel: audit: type=1131 audit(1646074953.959:321): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:33 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-tmpfiles-s>
Feb 28 14:02:33 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=import-state comm=>
Feb 28 14:02:33 inspiron7610 systemd[1]: Stopped Create Volatile Files and Directories.
Feb 28 14:02:33 inspiron7610 systemd[1]: import-state.service: Deactivated successfully.
Feb 28 14:02:33 inspiron7610 systemd[1]: Stopped Import network configuration from initramfs.
Feb 28 14:02:33 inspiron7610 systemd[1]: Stopped target Local File Systems.
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting /boot/efi...
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting /home...
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting Temporary Directory /tmp...
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting Mount unit for core18, revision 2284...
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting Mount unit for freeplane-mindmapping, revision 31...
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounting Mount unit for snapd, revision 14978...
Feb 28 14:02:33 inspiron7610 kernel: ------------[ cut here ]------------
Feb 28 14:02:33 inspiron7610 kernel: kernel BUG at mm/vmalloc.c:2631!
Feb 28 14:02:33 inspiron7610 kernel: fbcon: Taking over console
Feb 28 14:02:33 inspiron7610 kernel: invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
Feb 28 14:02:33 inspiron7610 kernel: CPU: 2 PID: 2355 Comm: umount Tainted: P     U     OE     5.16.11-200.fc35.x86_64 #1
Feb 28 14:02:33 inspiron7610 kernel: Hardware name: Dell Inc. Inspiron 16 7610/09FDV3, BIOS 1.4.0 12/10/2021
Feb 28 14:02:33 inspiron7610 kernel: RIP: 0010:__vunmap+0x1f8/0x280
Feb 28 14:02:33 inspiron7610 kernel: Code: db eb 17 31 f6 83 c3 01 e8 65 57 00 00 e8 60 30 9c 00 41 8b 46 28 39 d8 76 48 49 8b 56 20 48 63 c3 48 8b 3c c2 48>
Feb 28 14:02:33 inspiron7610 kernel: RSP: 0018:ffff953f40c1fdd8 EFLAGS: 00010246
Feb 28 14:02:33 inspiron7610 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: RDX: ffff88dac888c700 RSI: ffffca4ec5330440 RDI: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: RBP: 0000000000000000 R08: ffff88db0cc11580 R09: 0000000080400015
Feb 28 14:02:33 inspiron7610 kernel: R10: ffff88db0cc11580 R11: 0000000000000000 R12: 0000000000000001
Feb 28 14:02:33 inspiron7610 kernel: R13: ffff953f42b42000 R14: ffff88dac7028680 R15: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: FS:  00007f3c7aa65800(0000) GS:ffff88de3f480000(0000) knlGS:0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 28 14:02:33 inspiron7610 kernel: CR2: 00007f3c7acedd40 CR3: 000000010ca6a003 CR4: 0000000000770ee0
Feb 28 14:02:33 inspiron7610 kernel: PKRU: 55555554
Feb 28 14:02:33 inspiron7610 kernel: Call Trace:
Feb 28 14:02:33 inspiron7610 kernel:  <TASK>
Feb 28 14:02:33 inspiron7610 kernel:  xz_dec_lzma2_end+0x22/0x30
Feb 28 14:02:33 inspiron7610 kernel:  xz_dec_end+0x1a/0x30
Feb 28 14:02:33 inspiron7610 kernel:  squashfs_xz_free+0x16/0x20 [squashfs]
Feb 28 14:02:33 inspiron7610 kernel:  squashfs_decompressor_destroy+0x39/0x70 [squashfs]
Feb 28 14:02:33 inspiron7610 kernel:  squashfs_put_super+0x39/0x80 [squashfs]
Feb 28 14:02:33 inspiron7610 kernel:  generic_shutdown_super+0x71/0x120
Feb 28 14:02:33 inspiron7610 kernel:  kill_block_super+0x21/0x50
Feb 28 14:02:33 inspiron7610 kernel:  deactivate_locked_super+0x33/0xa0
Feb 28 14:02:33 inspiron7610 kernel:  cleanup_mnt+0x131/0x190
Feb 28 14:02:33 inspiron7610 kernel:  task_work_run+0x59/0x90
Feb 28 14:02:33 inspiron7610 kernel:  exit_to_user_mode_prepare+0x229/0x230
Feb 28 14:02:33 inspiron7610 kernel:  syscall_exit_to_user_mode+0x18/0x40
Feb 28 14:02:33 inspiron7610 kernel:  do_syscall_64+0x48/0x90
Feb 28 14:02:33 inspiron7610 kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xae
Feb 28 14:02:33 inspiron7610 kernel: RIP: 0033:0x7f3c7ac7591b
Feb 28 14:02:33 inspiron7610 kernel: Code: 13 85 0e 00 f7 d8 64 89 01 48 83 c8 ff c3 90 f3 0f 1e fa 31 f6 e9 05 00 00 00 0f 1f 44 00 00 f3 0f 1e fa b8 a6 00>
Feb 28 14:02:33 inspiron7610 kernel: RSP: 002b:00007fffeac481a8 EFLAGS: 00000202 ORIG_RAX: 00000000000000a6
Feb 28 14:02:33 inspiron7610 kernel: RAX: 0000000000000000 RBX: 000055d7d91d49a0 RCX: 00007f3c7ac7591b
Feb 28 14:02:33 inspiron7610 kernel: RDX: 0000000000000000 RSI: 0000000000000002 RDI: 000055d7d91d3700
Feb 28 14:02:33 inspiron7610 kernel: RBP: 000055d7d91d34d0 R08: 0000000000000000 R09: 000055d7d91d2010
Feb 28 14:02:33 inspiron7610 kernel: R10: 00007f3c7ad5eaa0 R11: 0000000000000202 R12: 0000000000000002
Feb 28 14:02:33 inspiron7610 kernel: R13: 000055d7d91d3700 R14: 000055d7d91d35e0 R15: 000055d7d91d34d0
Feb 28 14:02:33 inspiron7610 kernel:  </TASK>
Feb 28 14:02:33 inspiron7610 kernel: Modules linked in: rfcomm snd_seq_dummy snd_hrtimer nft_objref nf_conntrack_netbios_ns nf_conntrack_broadcast nft_fib_i>
Feb 28 14:02:33 inspiron7610 kernel:  pmt_class coretemp mac80211 kvm_intel nvidia_drm(POE) nvidia_modeset(POE) libarc4 kvm uvcvideo snd_hda_intel btusb snd>
Feb 28 14:02:33 inspiron7610 kernel:  i2c_algo_bit ttm drm_kms_helper nvme nvme_core cec intel_ish_ipc ucsi_acpi hid_multitouch crct10dif_pclmul crc32_pclmu>
Feb 28 14:02:33 inspiron7610 kernel: ---[ end trace 69b45b99e1262222 ]---
Feb 28 14:02:33 inspiron7610 kernel: RIP: 0010:__vunmap+0x1f8/0x280
Feb 28 14:02:33 inspiron7610 kernel: Code: db eb 17 31 f6 83 c3 01 e8 65 57 00 00 e8 60 30 9c 00 41 8b 46 28 39 d8 76 48 49 8b 56 20 48 63 c3 48 8b 3c c2 48>
Feb 28 14:02:33 inspiron7610 kernel: RSP: 0018:ffff953f40c1fdd8 EFLAGS: 00010246
Feb 28 14:02:33 inspiron7610 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: RDX: ffff88dac888c700 RSI: ffffca4ec5330440 RDI: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: RBP: 0000000000000000 R08: ffff88db0cc11580 R09: 0000000080400015
Feb 28 14:02:33 inspiron7610 kernel: R10: ffff88db0cc11580 R11: 0000000000000000 R12: 0000000000000001
Feb 28 14:02:33 inspiron7610 kernel: R13: ffff953f42b42000 R14: ffff88dac7028680 R15: 0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: FS:  00007f3c7aa65800(0000) GS:ffff88de3f480000(0000) knlGS:0000000000000000
Feb 28 14:02:33 inspiron7610 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Feb 28 14:02:33 inspiron7610 kernel: CR2: 00007f3c7acedd40 CR3: 000000010ca6a003 CR4: 0000000000770ee0
Feb 28 14:02:33 inspiron7610 kernel: PKRU: 55555554
Feb 28 14:02:33 inspiron7610 systemd[1]: boot-efi.mount: Deactivated successfully.
Feb 28 14:02:33 inspiron7610 systemd[1]: Unmounted /boot/efi.
Feb 28 14:02:34 inspiron7610 kernel: Console: switching to colour frame buffer device 384x120
Feb 28 14:02:34 inspiron7610 systemd[1]: home.mount: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted /home.
Feb 28 14:02:34 inspiron7610 systemd[1]: tmp.mount: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted Temporary Directory /tmp.
Feb 28 14:02:34 inspiron7610 systemd[1]: var-lib-snapd-snap-core18-2284.mount: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted Mount unit for core18, revision 2284.
Feb 28 14:02:34 inspiron7610 systemd[1]: var-lib-snapd-snap-freeplane\x2dmindmapping-31.mount: Mount process exited, code=killed, status=11/SEGV
Feb 28 14:02:34 inspiron7610 systemd[1]: var-lib-snapd-snap-freeplane\x2dmindmapping-31.mount: Failed with result 'signal'.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted Mount unit for freeplane-mindmapping, revision 31.
Feb 28 14:02:34 inspiron7610 systemd[1]: var-lib-snapd-snap-snapd-14978.mount: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted Mount unit for snapd, revision 14978.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped target Block Device Preparation for /dev/mapper/luks-bbf48173-4bae-4757-a5ec-f0cc42c8d369.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped target Swaps.
Feb 28 14:02:34 inspiron7610 systemd[1]: Deactivating swap Compressed Swap on /dev/zram0...
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounting /boot...
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopping Cryptography Setup for luks-bbf48173-4bae-4757-a5ec-f0cc42c8d369...
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-fsck@dev-disk-by\x2duuid-A8B4\x2d53D8.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-fsck@dev-d>
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped File System Check on /dev/disk/by-uuid/A8B4-53D8.
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.075:322): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 systemd-cryptsetup[2362]: Device luks-bbf48173-4bae-4757-a5ec-f0cc42c8d369 is still in use.
Feb 28 14:02:34 inspiron7610 systemd-cryptsetup[2362]: Failed to deactivate: Device or resource busy
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-cryptsetup@luks\x2dbbf48173\x2d4bae\x2d4757\x2da5ec\x2df0cc42c8d369.service: Control process exited, code=e>
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-cryptsetup@luks\x2dbbf48173\x2d4bae\x2d4757\x2da5ec\x2df0cc42c8d369.service: Failed with result 'exit-code'.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped Cryptography Setup for luks-bbf48173-4bae-4757-a5ec-f0cc42c8d369.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-cryptsetup>
Feb 28 14:02:34 inspiron7610 systemd[1]: dev-zram0.swap: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Deactivated swap Compressed Swap on /dev/zram0.
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.092:323): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopping Create swap on /dev/zram0...
Feb 28 14:02:34 inspiron7610 kernel: zram0: detected capacity change from 16777216 to 0
Feb 28 14:02:34 inspiron7610 systemd[1]: boot.mount: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Unmounted /boot.
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-zram-setup@zram0.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped Create swap on /dev/zram0.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-zram-setup>
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.099:324): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 systemd[1]: Removed slice Slice /system/systemd-zram-setup.
Feb 28 14:02:34 inspiron7610 systemd[1]: Reached target Unmount All Filesystems.
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-fsck@dev-disk-by\x2duuid-7f5229d3\x2db442\x2d4a33\x2d8661\x2dd6272e3d4a8a.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped File System Check on /dev/disk/by-uuid/7f5229d3-b442-4a33-8661-d6272e3d4a8a.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-fsck@dev-d>
Feb 28 14:02:34 inspiron7610 systemd[1]: Removed slice Slice /system/systemd-fsck.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped target Preparation for Local File Systems.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopping Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-remount-fs.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped Remount Root and Kernel File Systems.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-remount-fs>
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-tmpfiles-s>
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-tmpfiles-setup-dev.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped Create Static Device Nodes in /dev.
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.100:325): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.100:326): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 kernel: audit: type=1131 audit(1646074954.100:327): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0>
Feb 28 14:02:34 inspiron7610 systemd[1]: lvm2-monitor.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Stopped Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=lvm2-monitor comm=>
Feb 28 14:02:34 inspiron7610 systemd[1]: Reached target System Shutdown.
Feb 28 14:02:34 inspiron7610 systemd[1]: Reached target Late Shutdown Services.
Feb 28 14:02:34 inspiron7610 systemd[1]: systemd-poweroff.service: Deactivated successfully.
Feb 28 14:02:34 inspiron7610 systemd[1]: Finished System Power Off.
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff >
Feb 28 14:02:34 inspiron7610 audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=systemd-poweroff c>
Feb 28 14:02:34 inspiron7610 systemd[1]: Reached target System Power Off.
Feb 28 14:02:34 inspiron7610 systemd[1]: Shutting down.
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 audit: BPF prog-id=0 op=UNLOAD
Feb 28 14:02:34 inspiron7610 systemd-shutdown[1]: Syncing filesystems and block devices.
Feb 28 14:03:24 inspiron7610 systemd-shutdown[1]: Syncing filesystems and block devices - timed out, issuing SIGKILL to PID 2369.
Feb 28 14:03:24 inspiron7610 systemd-shutdown[1]: Sending SIGTERM to remaining processes...
Feb 28 14:03:24 inspiron7610 systemd-journald[1057]: Journal stopped