Possible idle bug running Ubuntu 22.04 guest on mac os x host

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
AndrewA
Posts: 18
Joined: 5. May 2021, 00:56

Possible idle bug running Ubuntu 22.04 guest on mac os x host

Post by AndrewA »

Below find excerpt of "top" on mac os X showing VirtualBox using 92% of CPU ... frequently shows 200%. Meanwhile, the only VM running in an Ubuntu 22.04 guest and top inside that guest shows very low or zero CPU utilization.

Any clues?

Thanks!

Code: Select all

PID    COMMAND      %CPU 
97873  VirtualBoxVM 92.1 
=======================================
top - 15:36:08 up 1 day, 14 min,  2 users,  load average: 0.00, 0.03, 0.00
Tasks: 159 total,   1 running, 156 sleeping,   0 stopped,   2 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st


And here are the "full" first few lines excerpted above
-------------------

Code: Select all

PID    COMMAND      %CPU  TIME     #TH   #WQ  #PORT MEM    PURG   CMPRS  PGRP  PPID  STATE    BOOSTS           %CPU_ME %CPU_OTHRS UID  FAULTS     COW       MSGSENT     MSGRECV     SYSBSD     SYSMACH     CSW         PAGEINS IDLEW     POWER INSTRS
97873  VirtualBoxVM 92.1  19:26:19 40    2    391   8377M  9508K  130M   97873 83270 sleeping *0[2238]         0.03219 0.00000    501  146050973+ 1008      6392284+    2718712+    141042523+ 22627430+   160564828+  589     9564570+  104.0 2298972496
3178   top          9.5   00:11.70 1/1   0    27    9364K  0B     0B     3178  98421 running  *0[1]            0.00000 0.00000    0    61602+     98        3484528+    1544426+    237796+    2058070+    7814+       0       8         9.5   197159459
161    WindowServer 8.8   14:06:08 13    5    9757+ 1454M+ 3008K+ 131M   161   1     sleeping *0[1]            0.19678 0.90384    88   43929024+  207804    1016174580+ 420878363+  725963863+ 1457593676+ 367408498+  1254    12818243+ 9.4   179395234

=================

top - 15:36:08 up 1 day, 14 min,  2 users,  load average: 0.00, 0.03, 0.00
Tasks: 159 total,   1 running, 156 sleeping,   0 stopped,   2 zombie
%Cpu(s):  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :   3924.0 total,    257.8 free,    408.6 used,   3257.6 buff/cache
MiB Swap:   1048.0 total,   1031.4 free,     16.6 used.   3235.6 avail Mem

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
   4919 root      20   0       0      0      0 I   0.3   0.0   0:57.04 kworker/0:2-events
      1 root      20   0  166252   9800   6560 S   0.0   0.2   0:02.75 systemd
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.03 kthreadd
      3 root       0 -20       0      0      0 I   0.0   0.0   0:00.00 rcu_gp
granada29
Volunteer
Posts: 711
Joined: 3. Mar 2015, 07:27
Primary OS: Mac OS X other
VBox Version: OSE other
Guest OSses: Linux, macOS, Windows

Re: Possible idle bug running Ubuntu 22.04 guest on mac os x host

Post by granada29 »

It would be good to see a session log to maybe get some idea of what is going on.

Please start the VM from a fully shutdown state - i.e. not saved, let it run until you observe the problem, then shut it down cleanly if possible.
Right-click the VM name in VirtualBox Manager and choose 'Show in Finder'
Open the Logs folder and right-click VBox.log to compress it it.
Post the compressed log as an attachment to a new message in this topic.
AndrewA
Posts: 18
Joined: 5. May 2021, 00:56

Re: Possible idle bug running Ubuntu 22.04 guest on mac os x host

Post by AndrewA »

I'll gather more information and report back when a good opportunity presents itself. I want to observe things a bit more.

I haven't seen another case of 200% host CPU vs 0% guest CPU but I can say for sure that the fans on my mac box are on way more than they used to be, and I've definitely see VirtualBox at the top of the host's top more than before.

I'm less confident in the "top" placement than the fans. The machine's definitely running hotter.

Perhaps something is not playing nice with the KVM scheduler I guess???
AndrewA
Posts: 18
Joined: 5. May 2021, 00:56

Re: Possible idle bug running Ubuntu 22.04 guest on mac os x host

Post by AndrewA »

Well, I am no longer going to be able to provide additional information about this because I used opencore to upgrade my 2014 i7 imac to Ventura, and now, VirtualBox does not get beyond the grub/bootloader stage booting either Linux or Windows guests.

Folks at opencore seem to think this is related to VirtualBox 7 using the new Apple virtualization framework.

I switched to QEMU (*with* the -M accel=hvf) and the machine's fans are rarely blowing now. God knows how much power I've been wasting the last few years, running VirtualBox!
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Possible idle bug running Ubuntu 22.04 guest on mac os x host

Post by mpack »

AndrewA wrote: I used opencore to upgrade my 2014 i7 imac to Ventura
...
Folks at opencore seem to think this is related to VirtualBox 7 using the new Apple virtualization framework.
It has no other choice on Ventura.
Post Reply