ThinkPad T450s 上的 VirtualBox 7.0.14 和内核 6.5.0-14 导致模块出现内核错误

ThinkPad T450s 上的 VirtualBox 7.0.14 和内核 6.5.0-14 导致模块出现内核错误

首先,在我的台式机上运行 Ubuntu 22.04(内核 6.5.0-14)和 VirtualBox 7.0.14,一切正常。没有错误消息。但如果我在笔记本电脑 ThinkPad T450s 上尝试相同的组合,我会在系统日志中收到以下消息以及数百条类似的消息,一个接一个:

Jan 21 13:38:50 thinkpad kernel: [  150.108653] UBSAN: array-index-out-of-bounds in /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:1897:78
Jan 21 13:38:50 thinkpad kernel: [  150.108657] index 1 is out of range for type 'page *[1]'
Jan 21 13:38:50 thinkpad kernel: [  150.108660] CPU: 3 PID: 2060 Comm: VirtualBoxVM Tainted: G           OE      6.5.0-14-generic #14~22.04.1-Ubuntu
Jan 21 13:38:50 thinkpad kernel: [  150.108663] Hardware name: LENOVO 20BX000TUK/20BX000TUK, BIOS JBET49WW (1.14 ) 05/21/2015
Jan 21 13:38:50 thinkpad kernel: [  150.108665] Call Trace:
Jan 21 13:38:50 thinkpad kernel: [  150.108666]  <TASK>
Jan 21 13:38:50 thinkpad kernel: [  150.108669]  dump_stack_lvl+0x48/0x70
Jan 21 13:38:50 thinkpad kernel: [  150.108678]  dump_stack+0x10/0x20
Jan 21 13:38:50 thinkpad kernel: [  150.108680]  __ubsan_handle_out_of_bounds+0xc6/0x110
Jan 21 13:38:50 thinkpad kernel: [  150.108685]  rtR0MemObjNativeMapUser+0x3d3/0x3e0 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108722]  VBoxHost_RTR0MemObjMapUserExTag+0x124/0x280 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108757]  VBoxHost_RTR0MemObjMapUserTag+0x15/0x30 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108791]  SUPR0GipMap+0x39d/0x5c0 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108819]  supdrvIOCtl+0x137b/0x3620 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108845]  ? _copy_from_user+0x30/0xa0
Jan 21 13:38:50 thinkpad kernel: [  150.108849]  VBoxDrvLinuxIOCtl_7_0_14+0x17c/0x270 [vboxdrv]
Jan 21 13:38:50 thinkpad kernel: [  150.108873]  __x64_sys_ioctl+0xa3/0xf0
Jan 21 13:38:50 thinkpad kernel: [  150.108877]  do_syscall_64+0x5b/0x90
Jan 21 13:38:50 thinkpad kernel: [  150.108880]  ? exit_to_user_mode_prepare+0x30/0xb0
Jan 21 13:38:50 thinkpad kernel: [  150.108884]  ? syscall_exit_to_user_mode+0x37/0x60
Jan 21 13:38:50 thinkpad kernel: [  150.108887]  ? do_syscall_64+0x67/0x90
Jan 21 13:38:50 thinkpad kernel: [  150.108889]  ? do_user_addr_fault+0x17a/0x6b0
Jan 21 13:38:50 thinkpad kernel: [  150.108891]  ? exit_to_user_mode_prepare+0x30/0xb0
Jan 21 13:38:50 thinkpad kernel: [  150.108894]  ? irqentry_exit_to_user_mode+0x17/0x20
Jan 21 13:38:50 thinkpad kernel: [  150.108897]  ? irqentry_exit+0x43/0x50
Jan 21 13:38:50 thinkpad kernel: [  150.108899]  ? exc_page_fault+0x94/0x1b0
Jan 21 13:38:50 thinkpad kernel: [  150.108902]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
Jan 21 13:38:50 thinkpad kernel: [  150.108905] RIP: 0033:0x7f0d0331a94f
Jan 21 13:38:50 thinkpad kernel: [  150.108925] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <41> 89 c0 3d 00 f0 ff ff 77 1f 48 8b 44 24 18 64 48 2b 04 25 28 00
Jan 21 13:38:50 thinkpad kernel: [  150.108927] RSP: 002b:00007ffe9d1db4b0 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
Jan 21 13:38:50 thinkpad kernel: [  150.108929] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f0d0331a94f
Jan 21 13:38:50 thinkpad kernel: [  150.108931] RDX: 00007ffe9d1db550 RSI: 00000000c0305694 RDI: 0000000000000007
Jan 21 13:38:50 thinkpad kernel: [  150.108932] RBP: 00007ffe9d1db510 R08: 0000000000000000 R09: 000055d290e6a970
Jan 21 13:38:50 thinkpad kernel: [  150.108933] R10: 0000000000000077 R11: 0000000000000246 R12: 0000000000000000
Jan 21 13:38:50 thinkpad kernel: [  150.108934] R13: 00007f0d0314e508 R14: 00007f0d030e03f0 R15: 000055d290e6a970
Jan 21 13:38:50 thinkpad kernel: [  150.108936]  </TASK>
Jan 21 13:38:50 thinkpad kernel: [  150.108937] ================================================================================

Ubuntu 22.04 内核升级后 Virtualbox 6 停止工作

答案1

“解决方案”是重新启动回到 6.2.0-39 内核,一切运行正常。

只是这个解决方案只适用于笔记本电脑。在台式机上它不起作用,因为我有多个显示器,而最近(几天前)升级到 Ubuntu 22.04 破坏了 X11 支持中的某些功能,因此即使我在 /etc/gdm3/custom.conf 中禁用 Xwayland,我仍然无法使用 6.2.0-39 启动并使用多个显示器,而且只能使用 1024x768 分辨率,而不是原生 4K。因此在台式机上我必须使用 6.5.0-14 启动并忽略系统日志中的错误消息。虚拟机似乎运行良好。

相关内容