Virtualbox behaving strangely in RT kernels. Randomly boots or not.

I was trying to use virtualbox in my Manjaro installation, but booting became a challenge. It rarely boots, but usually freezes while booting because of vboxdrv .This strange behavior happened on RT kernels (5.6.10_rt-1 and 5.4.39_rt23-1) with their respective host kernel modules. However, when i booted with a non-rt kernel, it worked flawlessly, but I want to work on RT kernels.
inxi -Fx:

System:    Host: gdgamerz-pc Kernel: 5.4.39-rt23-MANJARO x86_64 bits: 64 compiler: gcc v: 9.3.0 
           Desktop: KDE Plasma 5.18.5 Distro: Manjaro Linux 
Machine:   Type: Desktop Mobo: ASUSTeK model: PRIME B350-PLUS v: Rev X.0x serial: <root required> 
           UEFI: American Megatrends v: 0612 date: 05/05/2017 
CPU:       Topology: 6-Core model: AMD Ryzen 5 1600 bits: 64 type: MT MCP arch: Zen rev: 1 L2 cache: 3072 KiB 
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm bogomips: 76689 
           Speed: 2054 MHz min/max: 1550/3200 MHz Core speeds (MHz): 1: 2054 2: 2490 3: 2954 4: 3304 5: 2832 6: 2845 
           7: 2978 8: 3087 9: 2745 10: 2730 11: 2923 12: 2731 
Graphics:  Device-1: Advanced Micro Devices [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] 
           vendor: Sapphire Limited Nitro+ driver: amdgpu v: kernel bus ID: 22:00.0 
           Display: x11 server: X.Org 1.20.8 driver: amdgpu FAILED: ati unloaded: modesetting resolution: 1366x768~60Hz 
           OpenGL: renderer: Radeon RX 570 Series (POLARIS10 DRM 3.35.0 5.4.39-rt23-MANJARO LLVM 10.0.0) 
           v: 4.6 Mesa 20.0.6 direct render: Yes 
Audio:     Device-1: AMD Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] vendor: Sapphire Limited 
           driver: snd_hda_intel v: kernel bus ID: 22:00.1 
           Device-2: Advanced Micro Devices [AMD] Family 17h HD Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel 
           bus ID: 24:00.3 
           Device-3: MYPOWER 2.4G Wireless headset type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 3-2:2 
           Device-4: C-Media Blue Snowball type: USB driver: hid-generic,snd-usb-audio,usbhid bus ID: 3-3:3 
           Sound Server: ALSA v: k5.4.39-rt23-MANJARO 
Network:   Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: ASUSTeK driver: r8169 v: kernel 
           port: f000 bus ID: 1e:00.0 
           IF: enp30s0 state: up speed: 1000 Mbps duplex: full mac: 88:d7:f6:e2:32:aa 
Drives:    Local Storage: total: 1.46 TiB used: 283.46 GiB (19.0%) 
           ID-1: /dev/sda vendor: Western Digital model: WD10EZEX-21WN4A0 size: 931.51 GiB 
           ID-2: /dev/sdb vendor: Samsung model: SSD 840 EVO 120GB size: 111.79 GiB 
           ID-3: /dev/sdc vendor: Western Digital model: WDS480G2G0B-00EPW0 size: 447.14 GiB 
Partition: ID-1: / size: 430.17 GiB used: 283.46 GiB (65.9%) fs: ext4 dev: /dev/sdc2 
           ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sdc3 
Sensors:   System Temperatures: cpu: 45.0 C mobo: N/A gpu: amdgpu temp: 30 C 
           Fan Speeds (RPM): N/A gpu: amdgpu fan: 995 
Info:      Processes: 345 Uptime: N/A Memory: 15.62 GiB used: 1.61 GiB (10.3%) Init: systemd Compilers: gcc: 9.3.0 
           Shell: bash v: 5.0.16 inxi: 3.0.37 

Journal when rarely boots:

may 25 16:23:55 gdgamerz-pc kernel: vboxdrv: loading out-of-tree module taints kernel.
may 25 16:23:55 gdgamerz-pc kernel: vboxdrv: module verification failed: signature and/or required key missing - tainting kernel
may 25 16:23:55 gdgamerz-pc kernel: vboxdrv: Found 12 processor cores
may 25 16:23:55 gdgamerz-pc systemd[1]: modprobe@drm.service: Succeeded.
may 25 16:23:55 gdgamerz-pc systemd[1]: Finished Load Kernel Module drm.
may 25 16:23:55 gdgamerz-pc kernel: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-modules/426
may 25 16:23:55 gdgamerz-pc kernel: caller is VBoxHost_RTThreadPreemptDisable+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel: CPU: 4 PID: 426 Comm: systemd-modules Tainted: G           OE     5.4.39-rt23-MANJARO #1
may 25 16:23:55 gdgamerz-pc kernel: Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0612 05/05/2017
may 25 16:23:55 gdgamerz-pc kernel: Call Trace:
may 25 16:23:55 gdgamerz-pc kernel:  dump_stack+0x66/0x90
may 25 16:23:55 gdgamerz-pc kernel:  debug_smp_processor_id.cold+0x4e/0x53
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTThreadPreemptDisable+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTMpOnSpecific+0x7a/0x100 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? supdrvTscDeltaSync2_Before+0x260/0x260 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipInitMeasureTscFreq+0x196/0x3c0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipCreate+0x6b9/0xae0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? rtR0MemAllocEx+0x152/0x240 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvInitDevExt+0x185/0x350 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxDrvLinuxInit+0x96/0x1000 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? 0xffffffffc034c000
may 25 16:23:55 gdgamerz-pc kernel:  do_one_initcall+0x62/0x2a4
may 25 16:23:55 gdgamerz-pc kernel:  do_init_module+0x5c/0x230
may 25 16:23:55 gdgamerz-pc kernel:  load_module+0x28a0/0x2b90
may 25 16:23:55 gdgamerz-pc kernel:  ? __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  do_syscall_64+0x4e/0x140
may 25 16:23:55 gdgamerz-pc kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
may 25 16:23:55 gdgamerz-pc kernel: RIP: 0033:0x7f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: Code: 48 8b 0d 95 f0 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 62 f0 0b 00 f7 d8 64 89 01 48
may 25 16:23:55 gdgamerz-pc kernel: Console: switching to colour frame buffer device 128x48
may 25 16:23:55 gdgamerz-pc kernel: RSP: 002b:00007ffe48c9da88 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
may 25 16:23:55 gdgamerz-pc kernel: RAX: ffffffffffffffda RBX: 0000555b77f32950 RCX: 00007f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: RDX: 00007f29f895d97d RSI: 00000000000b4be8 RDI: 0000555b78741030
may 25 16:23:55 gdgamerz-pc kernel: RBP: 0000555b78741030 R08: 0000555b77f3101a R09: 0000000000000000
may 25 16:23:55 gdgamerz-pc kernel: R10: 0000555b77f31010 R11: 0000000000000246 R12: 00007f29f895d97d
may 25 16:23:55 gdgamerz-pc kernel: R13: 0000000000000000 R14: 0000555b77f32a10 R15: 0000555b77f32950
may 25 16:23:55 gdgamerz-pc kernel: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-modules/426
may 25 16:23:55 gdgamerz-pc kernel: caller is VBoxHost_RTMpOnSpecific+0x7f/0x100 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel: CPU: 4 PID: 426 Comm: systemd-modules Tainted: G           OE     5.4.39-rt23-MANJARO #1
may 25 16:23:55 gdgamerz-pc kernel: Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0612 05/05/2017
may 25 16:23:55 gdgamerz-pc kernel: Call Trace:
may 25 16:23:55 gdgamerz-pc kernel:  dump_stack+0x66/0x90
may 25 16:23:55 gdgamerz-pc kernel:  debug_smp_processor_id.cold+0x4e/0x53
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTMpOnSpecific+0x7f/0x100 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? supdrvTscDeltaSync2_Before+0x260/0x260 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipInitMeasureTscFreq+0x196/0x3c0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipCreate+0x6b9/0xae0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? rtR0MemAllocEx+0x152/0x240 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvInitDevExt+0x185/0x350 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxDrvLinuxInit+0x96/0x1000 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? 0xffffffffc034c000
may 25 16:23:55 gdgamerz-pc kernel:  do_one_initcall+0x62/0x2a4
may 25 16:23:55 gdgamerz-pc kernel:  do_init_module+0x5c/0x230
may 25 16:23:55 gdgamerz-pc kernel:  load_module+0x28a0/0x2b90
may 25 16:23:55 gdgamerz-pc kernel:  ? __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  do_syscall_64+0x4e/0x140
may 25 16:23:55 gdgamerz-pc kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
may 25 16:23:55 gdgamerz-pc kernel: RIP: 0033:0x7f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: Code: 48 8b 0d 95 f0 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 62 f0 0b 00 f7 d8 64 89 01 48
may 25 16:23:55 gdgamerz-pc kernel: RSP: 002b:00007ffe48c9da88 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
may 25 16:23:55 gdgamerz-pc kernel: RAX: ffffffffffffffda RBX: 0000555b77f32950 RCX: 00007f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: RDX: 00007f29f895d97d RSI: 00000000000b4be8 RDI: 0000555b78741030
may 25 16:23:55 gdgamerz-pc kernel: RBP: 0000555b78741030 R08: 0000555b77f3101a R09: 0000000000000000
may 25 16:23:55 gdgamerz-pc kernel: R10: 0000555b77f31010 R11: 0000000000000246 R12: 00007f29f895d97d
may 25 16:23:55 gdgamerz-pc kernel: R13: 0000000000000000 R14: 0000555b77f32a10 R15: 0000555b77f32950
may 25 16:23:55 gdgamerz-pc kernel: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-modules/426
may 25 16:23:55 gdgamerz-pc kernel: caller is VBoxHost_RTThreadPreemptRestore+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel: CPU: 4 PID: 426 Comm: systemd-modules Tainted: G           OE     5.4.39-rt23-MANJARO #1
may 25 16:23:55 gdgamerz-pc kernel: Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0612 05/05/2017
may 25 16:23:55 gdgamerz-pc kernel: Call Trace:
may 25 16:23:55 gdgamerz-pc kernel:  dump_stack+0x66/0x90
may 25 16:23:55 gdgamerz-pc kernel:  debug_smp_processor_id.cold+0x4e/0x53
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTThreadPreemptRestore+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTMpOnSpecific+0x9d/0x100 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? supdrvTscDeltaSync2_Before+0x260/0x260 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipInitMeasureTscFreq+0x196/0x3c0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipCreate+0x6b9/0xae0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? rtR0MemAllocEx+0x152/0x240 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvInitDevExt+0x185/0x350 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxDrvLinuxInit+0x96/0x1000 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? 0xffffffffc034c000
may 25 16:23:55 gdgamerz-pc kernel:  do_one_initcall+0x62/0x2a4
may 25 16:23:55 gdgamerz-pc kernel:  do_init_module+0x5c/0x230
may 25 16:23:55 gdgamerz-pc kernel:  load_module+0x28a0/0x2b90
may 25 16:23:55 gdgamerz-pc kernel:  ? __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  __do_sys_init_module+0x154/0x1a0
may 25 16:23:55 gdgamerz-pc kernel:  do_syscall_64+0x4e/0x140
may 25 16:23:55 gdgamerz-pc kernel:  entry_SYSCALL_64_after_hwframe+0x44/0xa9
may 25 16:23:55 gdgamerz-pc kernel: RIP: 0033:0x7f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: Code: 48 8b 0d 95 f0 0b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 90 f3 0f 1e fa 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 62 f0 0b 00 f7 d8 64 89 01 48
may 25 16:23:55 gdgamerz-pc kernel: RSP: 002b:00007ffe48c9da88 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
may 25 16:23:55 gdgamerz-pc kernel: RAX: ffffffffffffffda RBX: 0000555b77f32950 RCX: 00007f29f8cc7dfe
may 25 16:23:55 gdgamerz-pc kernel: RDX: 00007f29f895d97d RSI: 00000000000b4be8 RDI: 0000555b78741030
may 25 16:23:55 gdgamerz-pc kernel: RBP: 0000555b78741030 R08: 0000555b77f3101a R09: 0000000000000000
may 25 16:23:55 gdgamerz-pc kernel: R10: 0000555b77f31010 R11: 0000000000000246 R12: 00007f29f895d97d
may 25 16:23:55 gdgamerz-pc kernel: R13: 0000000000000000 R14: 0000555b77f32a10 R15: 0000555b77f32950
may 25 16:23:55 gdgamerz-pc kernel: BUG: using smp_processor_id() in preemptible [00000000] code: systemd-modules/426
may 25 16:23:55 gdgamerz-pc kernel: caller is VBoxHost_RTThreadPreemptDisable+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel: CPU: 4 PID: 426 Comm: systemd-modules Tainted: G           OE     5.4.39-rt23-MANJARO #1
may 25 16:23:55 gdgamerz-pc kernel: Hardware name: System manufacturer System Product Name/PRIME B350-PLUS, BIOS 0612 05/05/2017
may 25 16:23:55 gdgamerz-pc kernel: Call Trace:
may 25 16:23:55 gdgamerz-pc kernel:  dump_stack+0x66/0x90
may 25 16:23:55 gdgamerz-pc kernel:  debug_smp_processor_id.cold+0x4e/0x53
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTThreadPreemptDisable+0x12/0x30 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTMpOnSpecific+0x7a/0x100 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  ? VBoxHost_RTTimerStart+0x1c0/0x1c0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  VBoxHost_RTTimerStart+0x136/0x1c0 [vboxdrv]
may 25 16:23:55 gdgamerz-pc kernel:  supdrvGipCreate+0x75b/0xae0 [vboxdrv]

The journal continues like this, I can't paste it all and I don't know how to get the log file.

This doesn't happen when booting using a non-rt kernel.

I didn't find ANY solution to this problem and I am pretty desperate, please help! If I'm missing some info, I'll provide it.

You could blacklist virtualboxs kernel modules and modprobe them only if needed.
It will probably cause the same ruckus as you see now, but you'll be able to switch to a working non-rt kernel before using virtualbox and keep using the rt-kernel the rest of the time.

Why?

Are you sure that this should work?

You already have a solution - use a standard kernel.

1 Like

That powerful CPU Ryzen 1600 should be able to manage latency critical applications without any realtime kernel.

Also, using a latency-critical application within a VM isn't going to work particularly well anyway.

I wanted to use the RT kernel because I note the difference when playing some very precise rhythm games, but anyway I'm going to stick having both kernels in case I need to use the VMs, thanks.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.

Forum kindly sponsored by