Boot – Ubuntu 23.10 Does Not Start After CHKDSK from Windows

23.10bootdisk-checkdual-bootgrub2

In my system I have two SDDs:

  1. with Ubuntu 23.10 and Windows 11
  2. two main partitions: one ext4 for /home and one NTFS for generic storage in Windows

Until few weeks ago I was able to mount the "storage" partition in Ubuntu, then it refused to mount it anymore and reading the answers here I started Windows (for 99% of time I run Ubuntu only) and I ran chkdsk on the "storage" partition.

After rebooting, Ubuntu does not start anymore.
It hangs after mounting the snap stuff.

The last message is: "Press ctrl+c to cancel the disk checking" (not sure about the exact words – it is in Italian). But nothing happens neither pressing ctrl+c nor waiting for hours.

What I tried:

  • boot from an older kernel
  • boot in recovery mode and run fsck: if I confirm to remount the drives it fails because they are mounted, if I do not confirm it does nothing
  • boot in recovery mode and manually run fsck on all Linux partitions, no errors found
  • boot in recovery mode and run badblocks -sv on both drives, no errors found
  • edit the grub cmdline adding fsck. mode=skip: it actually does not show the message but still freezes at the same point
  • change the console (i.e. alt+f6), log in and try to manually start gnome with exec gnome-session: it requests again the login
  • change the console (i.e. alt+f6), log in and try to manually start gnome with sudo /etc/init.d/gdm3 start: it says: "Starting gdm3 (via systemctl): gdm3.service" but nothing else happens (the same in I start the service directly)
  • check in /etc/fstab for the Windows partition: as expected is not there, as I mount it manually only when needed
  • run apt update && apt upgrade
  • from the recovery menu select "check for damaged packages"

Here some output of dmesg that sounds suspicious (I cannot post here the whole content) but I'm not sure if they are related to the current issue:

...
[   12.014265] vboxdrv: Found 32 processor cores/threads
[   12.014372] ================================================================================
[   12.014373] UBSAN: array-index-out-of-bounds in /tmp/vbox.0/common/log/log.c:1791:41
[   12.014374] index 1 is out of range for type 'uint32_t [1]'
[   12.014375] CPU: 6 PID: 2161 Comm: modprobe Tainted: P           OE      6.5.0-15-generic #15-Ubuntu
[   12.014377] Hardware name: ASUS System Product Name/ROG STRIX X670E-E GAMING WIFI, BIOS 0705 10/05/2022
[   12.014378] Call Trace:
[   12.014379]  <TASK>
[   12.014381]  dump_stack_lvl+0x48/0x70
[   12.014385]  dump_stack+0x10/0x20
[   12.014387]  __ubsan_handle_out_of_bounds+0xc6/0x110
[   12.014391]  VBoxHost_RTLogGroupSettings+0x49f/0x4c0 [vboxdrv]
[   12.014404]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014407]  ? rtR0MemAllocEx+0x57/0xd0 [vboxdrv]
[   12.014419]  VBoxHost_RTLogCreateExV+0x297/0x4a0 [vboxdrv]
[   12.014433]  VBoxHost_RTLogCreate+0x6f/0xb0 [vboxdrv]
[   12.014446]  ? rtR0MemAllocEx+0x57/0xd0 [vboxdrv]
[   12.014457]  supdrvInitDevExt+0x59/0x330 [vboxdrv]
[   12.014471]  VBoxDrvLinuxInit+0x87/0xff0 [vboxdrv]
[   12.014483]  ? __pfx_VBoxDrvLinuxInit+0x10/0x10 [vboxdrv]
[   12.014494]  do_one_initcall+0x5b/0x340
[   12.014498]  do_init_module+0x91/0x290
[   12.014501]  load_module+0xba1/0xcf0
[   12.014505]  init_module_from_file+0x96/0x100
[   12.014507]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014508]  ? init_module_from_file+0x96/0x100
[   12.014511]  idempotent_init_module+0x11c/0x2b0
[   12.014514]  __x64_sys_finit_module+0x64/0xd0
[   12.014516]  do_syscall_64+0x59/0x90
[   12.014518]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014519]  ? ext4_llseek+0xc3/0x130
[   12.014522]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014523]  ? ksys_lseek+0x7d/0xd0
[   12.014525]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014526]  ? exit_to_user_mode_prepare+0x30/0xb0
[   12.014528]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014529]  ? syscall_exit_to_user_mode+0x37/0x60
[   12.014532]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014533]  ? do_syscall_64+0x68/0x90
[   12.014534]  ? irqentry_exit+0x43/0x50
[   12.014535]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014536]  ? exc_page_fault+0x94/0x1b0
[   12.014537]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   12.014539] RIP: 0033:0x7f45ca925cfd
[   12.014556] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d eb 80 0d 00 f7 d8 64 89 01 48
[   12.014557] RSP: 002b:00007fff8e6d97a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   12.014559] RAX: ffffffffffffffda RBX: 0000563dedd68ae0 RCX: 00007f45ca925cfd
[   12.014560] RDX: 0000000000000000 RSI: 0000563debe56727 RDI: 0000000000000003
[   12.014560] RBP: 0000563debe56727 R08: 0000000000000040 R09: 00007fff8e6d98b0
[   12.014561] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 0000000000040000
[   12.014562] R13: 0000563dedd68460 R14: 0000563dedd699d0 R15: 0000563dedd68dc0
[   12.014564]  </TASK>
[   12.014565] ================================================================================
[   12.014572] ================================================================================
[   12.014573] UBSAN: array-index-out-of-bounds in /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:399:33
[   12.014574] index 1 is out of range for type 'page *[1]'
[   12.014574] CPU: 6 PID: 2161 Comm: modprobe Tainted: P           OE      6.5.0-15-generic #15-Ubuntu
[   12.014576] Hardware name: ASUS System Product Name/ROG STRIX X670E-E GAMING WIFI, BIOS 0705 10/05/2022
[   12.014576] Call Trace:
[   12.014577]  <TASK>
[   12.014577]  dump_stack_lvl+0x48/0x70
[   12.014579]  dump_stack+0x10/0x20
[   12.014580]  __ubsan_handle_out_of_bounds+0xc6/0x110
[   12.014582]  rtR0MemObjLinuxAllocPages+0x31c/0x330 [vboxdrv]
[   12.014595]  rtR0MemObjNativeAllocCont+0x5f/0x130 [vboxdrv]
[   12.014607]  VBoxHost_RTR0MemObjAllocContTag+0x4e/0xa0 [vboxdrv]
[   12.014620]  supdrvGipCreate+0x66/0xdf0 [vboxdrv]
[   12.014632]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014633]  ? rtR0MemAllocEx+0x57/0xd0 [vboxdrv]
[   12.014645]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014647]  supdrvInitDevExt+0x14d/0x330 [vboxdrv]
[   12.014659]  VBoxDrvLinuxInit+0x87/0xff0 [vboxdrv]
[   12.014670]  ? __pfx_VBoxDrvLinuxInit+0x10/0x10 [vboxdrv]
[   12.014681]  do_one_initcall+0x5b/0x340
[   12.014684]  do_init_module+0x91/0x290
[   12.014686]  load_module+0xba1/0xcf0
[   12.014689]  init_module_from_file+0x96/0x100
[   12.014691]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014692]  ? init_module_from_file+0x96/0x100
[   12.014695]  idempotent_init_module+0x11c/0x2b0
[   12.014698]  __x64_sys_finit_module+0x64/0xd0
[   12.014700]  do_syscall_64+0x59/0x90
[   12.014701]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014702]  ? ext4_llseek+0xc3/0x130
[   12.014704]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014705]  ? ksys_lseek+0x7d/0xd0
[   12.014706]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014707]  ? exit_to_user_mode_prepare+0x30/0xb0
[   12.014709]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014710]  ? syscall_exit_to_user_mode+0x37/0x60
[   12.014711]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014712]  ? do_syscall_64+0x68/0x90
[   12.014713]  ? irqentry_exit+0x43/0x50
[   12.014714]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014715]  ? exc_page_fault+0x94/0x1b0
[   12.014717]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   12.014718] RIP: 0033:0x7f45ca925cfd
[   12.014720] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d eb 80 0d 00 f7 d8 64 89 01 48
[   12.014721] RSP: 002b:00007fff8e6d97a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   12.014722] RAX: ffffffffffffffda RBX: 0000563dedd68ae0 RCX: 00007f45ca925cfd
[   12.014723] RDX: 0000000000000000 RSI: 0000563debe56727 RDI: 0000000000000003
[   12.014723] RBP: 0000563debe56727 R08: 0000000000000040 R09: 00007fff8e6d98b0
[   12.014724] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 0000000000040000
[   12.014724] R13: 0000563dedd68460 R14: 0000563dedd699d0 R15: 0000563dedd68dc0
[   12.014727]  </TASK>
[   12.014727] ================================================================================
[   12.014728] ================================================================================
[   12.014728] UBSAN: array-index-out-of-bounds in /tmp/vbox.0/r0drv/linux/memobj-r0drv-linux.c:596:45
[   12.014729] index 3 is out of range for type 'page *[1]'
[   12.014729] CPU: 6 PID: 2161 Comm: modprobe Tainted: P           OE      6.5.0-15-generic #15-Ubuntu
[   12.014730] Hardware name: ASUS System Product Name/ROG STRIX X670E-E GAMING WIFI, BIOS 0705 10/05/2022
[   12.014731] Call Trace:
[   12.014731]  <TASK>
[   12.014732]  dump_stack_lvl+0x48/0x70
[   12.014733]  dump_stack+0x10/0x20
[   12.014735]  __ubsan_handle_out_of_bounds+0xc6/0x110
[   12.014737]  rtR0MemObjLinuxVMap+0xb7/0xc0 [vboxdrv]
[   12.014749]  rtR0MemObjNativeAllocCont+0x76/0x130 [vboxdrv]
[   12.014760]  VBoxHost_RTR0MemObjAllocContTag+0x4e/0xa0 [vboxdrv]
[   12.014772]  supdrvGipCreate+0x66/0xdf0 [vboxdrv]
[   12.014783]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014784]  ? rtR0MemAllocEx+0x57/0xd0 [vboxdrv]
[   12.014795]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014797]  supdrvInitDevExt+0x14d/0x330 [vboxdrv]
[   12.014808]  VBoxDrvLinuxInit+0x87/0xff0 [vboxdrv]
[   12.014819]  ? __pfx_VBoxDrvLinuxInit+0x10/0x10 [vboxdrv]
[   12.014830]  do_one_initcall+0x5b/0x340
[   12.014833]  do_init_module+0x91/0x290
[   12.014835]  load_module+0xba1/0xcf0
[   12.014839]  init_module_from_file+0x96/0x100
[   12.014840]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014841]  ? init_module_from_file+0x96/0x100
[   12.014844]  idempotent_init_module+0x11c/0x2b0
[   12.014847]  __x64_sys_finit_module+0x64/0xd0
[   12.014849]  do_syscall_64+0x59/0x90
[   12.014850]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014851]  ? ext4_llseek+0xc3/0x130
[   12.014853]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014854]  ? ksys_lseek+0x7d/0xd0
[   12.014855]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014856]  ? exit_to_user_mode_prepare+0x30/0xb0
[   12.014858]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014859]  ? syscall_exit_to_user_mode+0x37/0x60
[   12.014860]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014861]  ? do_syscall_64+0x68/0x90
[   12.014862]  ? irqentry_exit+0x43/0x50
[   12.014863]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014864]  ? exc_page_fault+0x94/0x1b0
[   12.014865]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   12.014866] RIP: 0033:0x7f45ca925cfd
[   12.014868] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d eb 80 0d 00 f7 d8 64 89 01 48
[   12.014869] RSP: 002b:00007fff8e6d97a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   12.014870] RAX: ffffffffffffffda RBX: 0000563dedd68ae0 RCX: 00007f45ca925cfd
[   12.014871] RDX: 0000000000000000 RSI: 0000563debe56727 RDI: 0000000000000003
[   12.014871] RBP: 0000563debe56727 R08: 0000000000000040 R09: 00007fff8e6d98b0
[   12.014872] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 0000000000040000
[   12.014872] R13: 0000563dedd68460 R14: 0000563dedd699d0 R15: 0000563dedd68dc0
[   12.014875]  </TASK>
[   12.014875] ================================================================================
[   12.014878] ================================================================================
[   12.014878] UBSAN: array-index-out-of-bounds in /tmp/vbox.0/SUPDrvGip.c:1956:44
[   12.014879] index 2 is out of range for type 'SUPGIPCPU [1]'
[   12.014879] CPU: 6 PID: 2161 Comm: modprobe Tainted: P           OE      6.5.0-15-generic #15-Ubuntu
[   12.014880] Hardware name: ASUS System Product Name/ROG STRIX X670E-E GAMING WIFI, BIOS 0705 10/05/2022
[   12.014881] Call Trace:
[   12.014881]  <TASK>
[   12.014881]  dump_stack_lvl+0x48/0x70
[   12.014883]  dump_stack+0x10/0x20
[   12.014884]  __ubsan_handle_out_of_bounds+0xc6/0x110
[   12.014886]  supdrvGipCreate+0xda7/0xdf0 [vboxdrv]
[   12.014897]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014899]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014901]  supdrvInitDevExt+0x14d/0x330 [vboxdrv]
[   12.014912]  VBoxDrvLinuxInit+0x87/0xff0 [vboxdrv]
[   12.014923]  ? __pfx_VBoxDrvLinuxInit+0x10/0x10 [vboxdrv]
[   12.014934]  do_one_initcall+0x5b/0x340
[   12.014937]  do_init_module+0x91/0x290
[   12.014938]  load_module+0xba1/0xcf0
[   12.014942]  init_module_from_file+0x96/0x100
[   12.014943]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014944]  ? init_module_from_file+0x96/0x100
[   12.014948]  idempotent_init_module+0x11c/0x2b0
[   12.014951]  __x64_sys_finit_module+0x64/0xd0
[   12.014953]  do_syscall_64+0x59/0x90
[   12.014954]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014955]  ? ext4_llseek+0xc3/0x130
[   12.014956]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014957]  ? ksys_lseek+0x7d/0xd0
[   12.014959]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014960]  ? exit_to_user_mode_prepare+0x30/0xb0
[   12.014961]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014962]  ? syscall_exit_to_user_mode+0x37/0x60
[   12.014963]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014964]  ? do_syscall_64+0x68/0x90
[   12.014965]  ? irqentry_exit+0x43/0x50
[   12.014966]  ? srso_alias_return_thunk+0x5/0x7f
[   12.014967]  ? exc_page_fault+0x94/0x1b0
[   12.014969]  entry_SYSCALL_64_after_hwframe+0x6e/0xd8
[   12.014970] RIP: 0033:0x7f45ca925cfd
[   12.014972] Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d eb 80 0d 00 f7 d8 64 89 01 48
[   12.014972] RSP: 002b:00007fff8e6d97a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[   12.014973] RAX: ffffffffffffffda RBX: 0000563dedd68ae0 RCX: 00007f45ca925cfd
[   12.014974] RDX: 0000000000000000 RSI: 0000563debe56727 RDI: 0000000000000003
[   12.014974] RBP: 0000563debe56727 R08: 0000000000000040 R09: 00007fff8e6d98b0
[   12.014975] R10: ffffffffffffffc0 R11: 0000000000000246 R12: 0000000000040000
[   12.014976] R13: 0000563dedd68460 R14: 0000563dedd699d0 R15: 0000563dedd68dc0
[   12.014978]  </TASK>
[   12.014978] ================================================================================
[   12.032481] ================================================================================
...
[  287.273183] audit: type=1400 audit(1706804289.805:217): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=19619 comm="snap-confine" capability=38  capname="perfmon"
[  318.777572] audit: type=1400 audit(1706804321.309:218): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=21504 comm="snap-confine" capability=12  capname="net_admin"
[  318.777586] audit: type=1400 audit(1706804321.309:219): apparmor="DENIED" operation="capable" class="cap" profile="/snap/snapd/20671/usr/lib/snapd/snap-confine" pid=21504 comm="snap-confine" capability=38  capname="perfmon"
[  670.069858] Bluetooth: RFCOMM TTY layer initialized
[  670.069868] Bluetooth: RFCOMM socket layer initialized
[  670.069872] Bluetooth: RFCOMM ver 1.11
[  765.074203] traps: gdm3[54970] trap int3 ip:7f1105f46a0d sp:7ffec7bf8e60 error:0 in libglib-2.0.so.0.7800.0[7f1105f02000+9a000]
[  766.434234] traps: gdm3[55036] trap int3 ip:7fb10cc8fa0d sp:7fffc1138010 error:0 in libglib-2.0.so.0.7800.0[7fb10cc4b000+9a000]
[  767.970139] traps: gdm3[55180] trap int3 ip:7f1048e37a0d sp:7ffe6f224cb0 error:0 in libglib-2.0.so.0.7800.0[7f1048df3000+9a000]
[  769.446560] traps: gdm3[55328] trap int3 ip:7fcb70fbea0d sp:7ffe712cd6c0 error:0 in libglib-2.0.so.0.7800.0[7fcb70f7a000+9a000]
[  770.934558] traps: gdm3[55513] trap int3 ip:7efdf4ae4a0d sp:7ffc701d29f0 error:0 in libglib-2.0.so.0.7800.0[7efdf4aa0000+9a000]

I'm running out of ideas.
What should I do to find out why my system refuses to start and how to fix it?

UPDATE

After the comment of DanielT.
I'm using VirtualBox almost daily without any problem. Anyway, in order to try to boot again into Gnome, I tried to remove it. Actually I had to remove the virtualbox-7.0 package.

Unfortunately the behavior is the same.
Here the current errors:

$ sudo dmesg -l err
[    0.364620] ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP7.UP00.DP40.UP00.DP68], AE_NOT_FOUND (20230331/dswload2-162)
[    0.364632] ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20230331/psobject-220)
[    6.311861] hub 10-0:1.0: config failed, hub doesn't have any ports! (err -19)
[   10.471789] iwlwifi 0000:09:00.0: WRT: Invalid buffer destination

[   11.910476] iwlwifi 0000:09:00.0: WRT: Invalid buffer destination
[   13.921769] ================================================================================
[   13.921783] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:2323:28
[   13.921793] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   13.922137] ================================================================================
[   13.922146] ================================================================================
[   13.922152] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:2003:44
[   13.922161] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   13.922427] ================================================================================
[   13.922434] ================================================================================
[   13.922440] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:713:68
[   13.922448] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   13.922722] ================================================================================
[   13.922729] ================================================================================
[   13.922735] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:2009:63
[   13.922743] index 1 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   13.923001] ================================================================================
[   13.942298] ================================================================================
[   13.942307] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_mmu.c:425:17
[   13.942316] index 0 is out of range for type 'uvm_page_directory_t *[*]'
[   13.942619] ================================================================================
[   13.942630] ================================================================================
[   13.942636] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_mmu.c:411:51
[   13.942644] index 16 is out of range for type 'uvm_page_directory_t *[*]'
[   13.942910] ================================================================================
[   14.025724] ================================================================================
[   14.025738] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_mmu.c:425:17
[   14.025748] index 57 is out of range for type 'uvm_page_directory_t *[*]'
[   14.026005] ================================================================================
[   14.063684] ================================================================================
[   14.063688] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:2563:71
[   14.063690] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   14.064242] ================================================================================
[   14.064245] ================================================================================
[   14.064246] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:795:45
[   14.064248] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   14.064748] ================================================================================
[   14.064750] ================================================================================
[   14.064751] UBSAN: array-index-out-of-bounds in /var/lib/dkms/nvidia/525.147.05/build/nvidia-uvm/uvm_pmm_gpu.c:822:39
[   14.064752] index 0 is out of range for type 'uvm_gpu_chunk_t *[*]'
[   14.065223] ================================================================================

They are about Nvidia – I don't understand if (and how) they can be related with my issue.

UPDATE 2

I didn't mess with Nvidia drivers since several months.
Anyway:

$ nvidia-smi
Thu Feb  1 20:41:44 2024       
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 525.147.05   Driver Version: 525.147.05   CUDA Version: 12.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  NVIDIA GeForce ...  Off  | 00000000:01:00.0  On |                  N/A |
|  0%   30C    P8    13W / 320W |      1MiB / 16376MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+
                                                                               
+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+

And it seems correct to me.
Ubuntu says:

$ ubuntu-drivers devices
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
udevadm hwdb is deprecated. Use systemd-hwdb instead.
== /sys/devices/pci0000:00/0000:00:01.1/0000:01:00.0 ==
modalias : pci:v000010DEd00002704sv0000196Esd000013BCbc03sc00i00
vendor   : NVIDIA Corporation
model    : AD103 [GeForce RTX 4080]
driver   : nvidia-driver-545 - distro non-free
driver   : nvidia-driver-535-server - distro non-free
driver   : nvidia-driver-525 - distro non-free
driver   : nvidia-driver-525-open - distro non-free
driver   : nvidia-driver-535-server-open - distro non-free
driver   : nvidia-driver-525-server - distro non-free
driver   : nvidia-driver-535 - distro non-free recommended
driver   : nvidia-driver-545-open - distro non-free
driver   : nvidia-driver-535-open - distro non-free
driver   : xserver-xorg-video-nouveau - distro free builtin

I tried sudo ubuntu-drivers autoinstall but after rebooting… it still hangs claiming to check the filesystem errors, but it does nothing actually.

Best Answer

Not sure if and how my activity on Windows could have raised the issue in Ubuntu, but I found the solution inspecting /var/log/syslog:

2024-02-02T15:39:46.874574+01:00 mark gdm3: Gdm: GdmSession: no session desktop files installed, aborting...

Hence I wild guessed a:

sudo apt install --reinstall ubuntu-session

and it fixed the issue.

Related Question