Linux 在关闭时停滞不前——该怎么办?

Linux 在关闭时停滞不前——该怎么办?

我尝试重新启动运行 Ubuntu 20.04 ( Linux 5.15.0-67-generic #74~20.04.1-Ubuntu) 的计算机,但它一直在黑屏上输出错误或警告消息并且无法关闭。我应该怎么办?长按电源键5秒强制关机好不好?或者说,会不会导致磁盘出现不一致的情况?

大约在以下时间点,关闭消息开始与平常的消息有所不同。

[ *** ] A stop job is running for /data (11s / 1min 32s)
[756977.526939] RIP: 0010:release_pages+0x278/0x4e0
[756977.527758] Code: b8 49 8d 7f 50 e8 ......
[756977.528654] RSP: 0018:ffff......
[756977.529559] RAX: dead000000000122 RBX: 0000......
 :
 :
[ OK ] Unmounted /data
[ OK ] Reached target Unmount All Filesystems.
[ OK ] Stopped File System Check on /dev/disk/by-label/......
[ OK ] Removed slice system-systemd\x2dfsck.slice.
[ OK ] Stopped target Local File Systems (Pre).
       Stopping Monitoring of LVM2 mirrors, snapshots, etc. using dmeventd or progress polling...
[ OK ] Stopped Create Static Device Nodes in /dev.
[ OK ] Stopped Create System Users.
[ OK ] Stopped Remount Root and Kernel File Systems.
[ OK ] Stopped Monitoring of LVM2 mirrors, snapshots etc. using dmeventd or progress polling...
[ OK ] Reached target Shutdown.
[ OK ] Reached target Final Step.
[ OK ] Finished Reboot.
[ OK ] Reached target Reboot.
[756977.819522] systemd-shutdown[1]: Syncing filesystems and block devices.
[757007.823383] systemd-shutdown[1]: Syncing filesystems and block devices - timeed out, issuing SIGKILL to PID 382289.
[757007.827668] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[757007.831640] systemd-journald[377]: Received SIGTERM from PID 1 (systemd-shutdow).
[757017.831895] systemd-shutdown[1]: Waiting for process: (sd-sync)
[757097.831617] systemd-shutdown[1]: Sending SIGKILL to remaining remaining processes...
[757097.842836] systemd-shutdown[1]: Sending SIGKILL to PID 382289 ((sd-sync)).
[757107.844080] systemd-shutdown[1]: Waiting for process: (sd-sync)
[757187.849840] systemd-shutdown[1]: Unmounting file systems.
[757187.854008] [382290]: Remounting '/' read-only in with options 'errors=remount-ro'.
[757188.790620] EXT4-fs (dm-1): re-mounted. Opts: errors=remount-ro. Quota mode:none.

这里的......意思是我省略了其余的行,两个竖的:s表示省略了几行。

屏幕继续运行。目前它正在重复发出类似(但略有变化)的消息,如下所示:

[762469.371157] rcu: INFO: rcu_sched detected stalls on CPUs/tasks:
[762469.371816] rcu: $0-...0: (130 GPs behind) idle=689/1/0x4000000000000000 softirq=7399238/7399238 fqs=650925
[762469.372457] $(detected by 2, t=1320148 jiffies, g=23438573, q=695)
[762469.373098] Sending NMI from CPU 2 to CPUs 0:
[762469.373730] NMI backtrace for cpu 0
[762469.373731] CPU: 0 PID: 382290 Comm: (sd-remount) Tainted: G    B D    OE    5.15.0-67-generic #74~20.04.1-Ubuntu
[762469.373732] Hardware name: LENOVO ........
[762469.373733] RIP: 0010:native_queued_spin_lock_slowpath+0x79/0x230
[762469.373734] Code: 7c f0 0f ba 2b 08 0f ......
[762469.373735] RSP: 0018:ffff........
[762469.373736] RAX: 00000000......
 :
 :
[762469.373743] Call Trace:
[762469.373743]  <TASK>
[762469.373744]  _raw_spin_lock_irqsave+0x3b/0x50
[762469.373745]  lock_page_lruvec_irqsave+0x62/0x90
[762469.373747]  release_pages+0x264/0x4e0
[762469.373749]  __pagevec_release+0x30/0x70
[762469.373750]  __invalidate_mapping_pages+0x201/0x270
[762469.373752]  ? __wait_for_common+0xf7/0x160
[762469.373756]  invalidate_mapping_pages+0x10/0x20
[762469.373757]  invalidate_bdev+0x5b/0x60
[762469.373759]  reconfigure_super+0x12d/0x240
[762469.373761]  path_mount+0x969/0xa70
[762469.373762]  ? putname+0x57/0x70
[762469.373764]  do_mount+0x80/0xa0
[762469.373766]  __x64_sys_mount+0x8b/0xe0
[762469.373768]  do_syscall_64+0x59/0xc0
[762469.373769]  entry_SYSCALL_64_after_hwframe+0x61/0xcb
[762469.373770] RIP: 0033:0x7f07bc......
[762469.373771] Code: 48 8b 0d 15 c2 0c 00 ......
[762469.373772] RSP: 002b:00007ffd......
[762469.373773] RAX: ffffffff......
 :
 :
[762469.373777]  </TASK>

答案1

我记得有那些魔法 SysRq 键。按住Left-AltSysRq ( ) 键和 SysRq ( Prt Scn) 键的同时,我一一按下REISU和。B

我看到一条消息,比如

This SysRq key is disabled.

或类似的RE、 和I。然后, SU、 和出现不同的消息B。之后B,计算机重新启动。

重新启动后,计算机至少暂时可以正常运行。我仍然不知道错误是什么。如果有人可以发布正确的答案,我会很高兴。

相关内容