Heavy CPU on 5.2.20 after waking host

Discussions related to using VirtualBox on Mac OS X hosts.
thechrisroberts
Posts: 2
Joined: 21. Apr 2016, 14:01

Heavy CPU on 5.2.20 after waking host

Post by thechrisroberts »

MacOS Mojave, VirtualBox 5.2.20, using with Vagrant 2.2.0 and guest OS Ubuntu 16.04

Since upgrading to 5.2.20 (I don't remember previous version, but not that far behind), I'm intermittently running into high CPU usage on my vagrant box after my Mac wakes from sleep. VirtualBox had been performing fine on Mojave, this has just started happening since 5.2.20. When I first launch the guest, there's no problem. Close my MacBook or otherwise let it go into sleep mode for a while, come back, and often once I wake the Mac the guest will start using high CPU, enough to trigger the fan, which is pretty rare on my MacBook. It doesn't happen every time, and doesn't seem to happen if the MacBook has only been in sleep mode for a while (I'm guessing it's actually hibernate/safe sleep that triggers the behavior). If I check the process list on the guest, nothing running is utilizing high CPU.

Two co-workers just got brand new Macs with Mojave and did clean installs of VirtualBox and Vagrant and are also running into the problem, so it's unrelated to upgrading from an older version.

I'll see if I can grab a log next time it happens (which should be after I head home from work today), but note that any logs can't be from a quick round of start-hit error-shutdown-logs since the problem only happens when it's been running at least long enough for the host to have entered safe sleep.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Heavy CPU on 5.2.20 after waking host

Post by socratis »

Vagrant is a program that relies on VirtualBox, but modifies its configuration files in unknown ways to us, and with unknown consequences. It is not supported on these VirtualBox user forums, they have their own Vagrant support channels. If you are having this problem with a standalone version of VirtualBox (after a complete uninstallation of Vagrant), then we can continue this discussion.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
VortualBix
Posts: 6
Joined: 31. Oct 2018, 11:31

Re: Heavy CPU on 5.2.20 after waking host

Post by VortualBix »

Have same problem on OSX 10.13.6 on iMac. Vagrant (whatever it is) has never been installed. Very hot, very slow. Previous version of VB was unproblematic.
Is it possible to downgrade VB without guest-issues?
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Heavy CPU on 5.2.20 after waking host

Post by socratis »

VortualBix wrote:Is it possible to downgrade VB without guest-issues?
Yes, absolutely! I do it all the time. In fact, it would be the first thing I would suggest to troubleshoot this. Don't forget your Extension Pack (if you have in installed) and the Guest Additions in your guest.

If it doesn't work, we have to see a complete VBox.log, from a complete VM run:
  • Start the VM from cold-boot (not from a paused or saved state) / Observe error / Shutdown the VM (force close it if you have to).
  • With the VM completely shut down (not paused or saved), right-click on the VM in the VirtualBox Manager and select "Show Log".
  • Save only the first "VBox.log", ZIP it and attach it to your response. See the "Upload attachment" tab below the reply form.
Image
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
McJimmeh
Posts: 5
Joined: 5. Jul 2017, 01:52

Re: Heavy CPU on 5.2.20 after waking host

Post by McJimmeh »

Chiming in with similar. Any clues on this one yet?

Host: OS X 10.11.6. Vbox: ver5.2.20 r125813 (Qt5.6.3). Guest: Fedora 27 (kernel 4.18.16 with VBox GAs installed). Not using Vagrant.

CPU usage (both host and guest) seems normal until the host is put to sleep. On waking, and unpausing the VM, the host CPU usage goes to 100% even though the guest is idle. It will stay this way until the guest is restarted.

Haven't tried the downgrade path yet.

Thanks.
Attachments
ciap_workstation_f27-2018-11-01-10-16-58.log.zip
vbox log
(26.5 KiB) Downloaded 41 times
VortualBix
Posts: 6
Joined: 31. Oct 2018, 11:31

Re: Heavy CPU on 5.2.20 after waking host

Post by VortualBix »

I hoped to reproduce last afternoon, but it crashed and garbled the network-settings after two hours, so I restored a 5.2-18-backup w/o problems ... and hope for a future fix on somebody elses initiative.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Heavy CPU on 5.2.20 after waking host

Post by socratis »

Please take a look at https://www.virtualbox.org/ticket/18089 and at viewtopic.php?f=8&t=89896

It seems to be widespread, we need to find what's the common denominator. Somehow I have the feeling that 10.13 or higher, 5.2.20, and maybe sleep might be involved.
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Heavy CPU on 5.2.20 after waking host

Post by socratis »

I forgot that I got a 'ping' to post an update on this, oops... :o

From a developer's comment on the IRC, it seems that this might be audio related. Could you disable your audio in the VM Settings and try again?


PS. Apologies a priori if you receive a duplicate notification from the ticket...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ybot
Posts: 1
Joined: 9. Nov 2018, 19:51

Re: Heavy CPU on 5.2.20 after waking host

Post by ybot »

socratis wrote: From a developer's comment on the IRC, it seems that this might be audio related. Could you disable your audio in the VM Settings and try again?
I was experiencing the same high CPU issue on Mojave / 5.2.20. I disabled audio on my VM, slept the host, and didn't experience the issue again. Will follow up if I see it pop up again, but looks like that may have fixed the issue.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Heavy CPU on 5.2.20 after waking host

Post by socratis »

ybot wrote:but looks like that may have fixed the issue.
Yes, disabling audio might fix it in 5.2.20, thanks for confirming that. But, you should try 5.2.22, it should contain the real fix:
  • Audio: fixed a regression in the Core Audio backend causing a hang when returning from host sleep when processing input buffers
Can you confirm that please?
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
ra1ph
Posts: 1
Joined: 10. Nov 2018, 17:38

Re: Heavy CPU on 5.2.20 after waking host

Post by ra1ph »

I've been having the same problem, and I just upgraded to 5.2.22. My VM is Ubuntu server which has no window manager installed, and I launch headless. I just created this account to reply.

I had the same 100% CPU issue after upgrading to 5.2.22, and I just tried disabling audio as suggested which has fixed the problem for me. So I can attest that 5.2.22 does not fix the audio issues causing 100% CPU usage after waking from sleep on MacOS.
McJimmeh
Posts: 5
Joined: 5. Jul 2017, 01:52

Re: Heavy CPU on 5.2.20 after waking host

Post by McJimmeh »

Can confirm it seems to be audio related. After recent updates...
Host: OS X 10.11.6. Vbox: ver 5.2.22 r126460 (Qt5.6.3) Guest: Fedora 28 (kernel 4.18.17 with VBox GAs installed). No Vagrant.

With VM > Settings > Audio > Enable Audio: Off
Started and paused the VM, set the host to sleep, woke the host, unpaused the VM => host cpu usage 'normal'.

Enable Audio: On
Started and paused the VM, set the host to sleep, woke the host ('normal' host cpu usage), unpaused the VM => host cpu usage is over 100% until VM is restarted.

Thanks
pentagonik
Oracle Corporation
Posts: 283
Joined: 19. May 2008, 16:09
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Too many to specify!
Contact:

Re: Heavy CPU on 5.2.20 after waking host

Post by pentagonik »

I'm currently trying to investigate and reproduce the issue, but failed so far.

So I have a couple of questions to those where to issue actually is reproducible:

- This only happens on guests which use the AC'97 device emulation?
- What happens if you select the NULL driver (backend) instead of the CoreAudio, is this still reproducible then?
- Does the guest play (output) or record (input) anything while the issue appears?

Thank you!
VortualBix
Posts: 6
Joined: 31. Oct 2018, 11:31

Re: Heavy CPU on 5.2.20 after waking host

Post by VortualBix »

I can only try 1 test/24 hours as I cannot hibernate while at work; my guest consists of OS+Oracle DB so it should use no audio.
I have enabled audio now, and set the driver to null -- will see how it behaves tomorrow. Perhaps others can test other combinations meanwhile?
VortualBix
Posts: 6
Joined: 31. Oct 2018, 11:31

Re: Heavy CPU on 5.2.20 after waking host

Post by VortualBix »

No performance problems after hibernation with Enabled audio (both In&Out), with AC97 using the NULL-driver. 5.2.22r126460.
Will switch away from AC97 tonight, favoring SoundBlaster16.
Post Reply