每次启动时都会失效的进程,如果我不杀死它,它会在关闭期间挂起

每次启动时都会失效的进程,如果我不杀死它,它会在关闭期间挂起

每次启动我的电脑(Ubuntu 20.04.2 LTS)时,我都会遇到一个已失效的进程:

johan@johan-desktop:~$ ps -AF | grep qemu
libvirt+    1596       1  0     0     0  15 07:17 ?        00:00:00 [qemu-system-x86] <defunct>
johan       4109    4099  0  2260  2688   6 07:17 pts/1    00:00:00 grep --color=auto qemu

我可以很好地杀死它,并且杀死信号会立即得到处理:

johan@johan-desktop:~$ sudo kill -9 1596
johan@johan-desktop:~$ ps -AF | grep qemu
johan       6924    4099  0  2260   660   6 07:30 pts/1    00:00:00 grep --color=auto qemu

如果不这样做,系统将在关闭期间挂起。它会关闭 UI,但会在“达到目标关闭电源”后卡住: 卡在关机状态

起初它甚至没有显示“等待进程”位,使最后一位“达到目标断电”,但电脑将继续运行。

我确实有这个条目dmesg,它也指的是qemu

[   12.315976] BUG: kernel NULL pointer dereference, address: 0000000000000040
[   12.315978] #PF: supervisor read access in kernel mode
[   12.315978] #PF: error_code(0x0000) - not-present page
[   12.315979] PGD 0 P4D 0 
[   12.315981] Oops: 0000 [#1] SMP NOPTI
[   12.315983] CPU: 15 PID: 1596 Comm: qemu-system-x86 Tainted: P           OE     5.4.0-73-generic #82-Ubuntu
[   12.315984] Hardware name: System manufacturer System Product Name/ROG CROSSHAIR VII HERO, BIOS 2901 10/16/2019
[   12.315990] RIP: 0010:sev_ioctl_do_pdh_export+0x185/0x2f0 [ccp]
[   12.315991] Code: 48 01 d0 48 0b 05 db 0c 2c cb 49 89 44 24 10 8b 45 cc 41 89 44 24 18 eb 06 45 31 ff 45 31 f6 48 8b 05 07 5d 00 00 48 8d 53 0c <83> 78 40 01 74 1b 48 89 d7 48 89 55 b0 e8 29 f5 ff ff 48 8b 55 b0
[   12.315992] RSP: 0018:ffffa87f8248fd98 EFLAGS: 00010246
[   12.315993] RAX: 0000000000000000 RBX: ffffa87f8248fe00 RCX: 0000000000000000
[   12.315994] RDX: ffffa87f8248fe0c RSI: ffffffffc038e2d9 RDI: ffff9b2478407800
[   12.315994] RBP: ffffa87f8248fde8 R08: ffff9b247ebf0080 R09: ffff9b2478407800
[   12.315995] R10: ffff9b247ebe9ac0 R11: ffffffffffc352a6 R12: ffff9b246589f920
[   12.315996] R13: ffff9b247875f690 R14: 0000000000000000 R15: 0000000000000000
[   12.315997] FS:  00007f00b59735c0(0000) GS:ffff9b247ebc0000(0000) knlGS:0000000000000000
[   12.315997] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   12.315998] CR2: 0000000000000040 CR3: 0000000feb17e000 CR4: 0000000000340ee0
[   12.315999] Call Trace:
[   12.316004]  sev_ioctl+0x3f2/0x510 [ccp]
[   12.316007]  do_vfs_ioctl+0x407/0x670
[   12.316008]  ? putname+0x4a/0x50
[   12.316009]  ksys_ioctl+0x67/0x90
[   12.316011]  __x64_sys_ioctl+0x1a/0x20
[   12.316014]  do_syscall_64+0x57/0x190
[   12.316017]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   12.316018] RIP: 0033:0x7f00b6d7750b
[   12.316019] Code: 0f 1e fa 48 8b 05 85 39 0d 00 64 c7 00 26 00 00 00 48 c7 c0 ff ff ff ff c3 66 0f 1f 44 00 00 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 55 39 0d 00 f7 d8 64 89 01 48
[   12.316020] RSP: 002b:00007fffd3258698 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[   12.316021] RAX: ffffffffffffffda RBX: 000055aac046fab0 RCX: 00007f00b6d7750b
[   12.316022] RDX: 00007fffd32586b0 RSI: 00000000c0105300 RDI: 0000000000000010
[   12.316022] RBP: 0000000000000010 R08: 0000000000000000 R09: 0000000000000005
[   12.316023] R10: 0000000000000000 R11: 0000000000000246 R12: 00007fffd32586b0
[   12.316023] R13: 00007fffd32587d0 R14: 00007fffd32587c8 R15: 00007fffd32586c0
[   12.316025] Modules linked in: ip6t_REJECT nf_reject_ipv6 xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c nf_tables nfnetlink ip6table_filter ip6_tables iptable_filter bpfilter bridge stp llc aufs overlay binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio snd_hda_intel snd_intel_dspcfg snd_hda_codec snd_usb_audio snd_hda_core snd_usbmidi_lib snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq uvcvideo kvm snd_seq_device videobuf2_vmalloc snd_timer videobuf2_memops videobuf2_v4l2 eeepc_wmi videobuf2_common snd asus_wmi videodev sparse_keymap joydev mc input_leds video wmi_bmof mxm_wmi ccp k10temp soundcore mac_hid nvidia_uvm(OE) sch_fq_codel parport_pc ppdev lp parport ip_tables x_tables autofs4 uas usb_storage hid_maltron hid_generic usbhid hid nvidia_drm(POE) nvidia_modeset(POE)
[   12.316048]  nvidia(POE) crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel drm_kms_helper crypto_simd cryptd syscopyarea glue_helper sysfillrect sysimgblt fb_sys_fops drm nvme igb i2c_piix4 dca i2c_algo_bit ahci nvme_core libahci gpio_amdpt wmi gpio_generic
[   12.316056] CR2: 0000000000000040
[   12.316057] ---[ end trace f90d6aeffb75307d ]---
[   12.316060] RIP: 0010:sev_ioctl_do_pdh_export+0x185/0x2f0 [ccp]
[   12.316060] Code: 48 01 d0 48 0b 05 db 0c 2c cb 49 89 44 24 10 8b 45 cc 41 89 44 24 18 eb 06 45 31 ff 45 31 f6 48 8b 05 07 5d 00 00 48 8d 53 0c <83> 78 40 01 74 1b 48 89 d7 48 89 55 b0 e8 29 f5 ff ff 48 8b 55 b0
[   12.316061] RSP: 0018:ffffa87f8248fd98 EFLAGS: 00010246
[   12.316062] RAX: 0000000000000000 RBX: ffffa87f8248fe00 RCX: 0000000000000000
[   12.316062] RDX: ffffa87f8248fe0c RSI: ffffffffc038e2d9 RDI: ffff9b2478407800
[   12.316063] RBP: ffffa87f8248fde8 R08: ffff9b247ebf0080 R09: ffff9b2478407800
[   12.316064] R10: ffff9b247ebe9ac0 R11: ffffffffffc352a6 R12: ffff9b246589f920
[   12.316064] R13: ffff9b247875f690 R14: 0000000000000000 R15: 0000000000000000
[   12.316065] FS:  00007f00b59735c0(0000) GS:ffff9b247ebc0000(0000) knlGS:0000000000000000
[   12.316066] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   12.316066] CR2: 0000000000000040 CR3: 0000000feb17e000 CR4: 0000000000340ee0

最后,我经常不得不这样做,systemctl restart libvirtd因为否则任何 virsh 命令都会挂起。

我什至不知道为什么它试图在启动时运行 qemu,我没有预计在启动时启动的虚拟机。

qemu在我杀死不存在的进程并重新启动 libvirtd 后运行正常,所以我猜测启动时有些东西变得很奇怪,使得整个事情变得很奇怪?有任何想法吗?

答案1

最后通过升级到 Ubuntu 22 解决了这个问题。我仍然不知道是什么原因造成的。

相关内容