VirtualBox

Opened 4 years ago

Closed 4 years ago

#19772 closed defect (fixed)

macOS Catalina 10.15.6 host crashes when executing a VM for several hours (memory leak)

Reported by: fth0 Owned by:
Component: VMM Version: VirtualBox 6.1.10
Keywords: macOS Catalina 10.15.6 memory leak Cc:
Guest type: all Host type: Mac OS X

Description

When a VirtualBox VM (or a VMware Fusion VM) has been running on a macOS Catalina 10.15.6 host for a few hours, the host OS crashes. The crashes have already been analyzed to some degree in a VirtualBox forum thread (https://forums.virtualbox.org/viewtopic.php?f=8&t=99161) and in a VMware Fusion forum thread (https://communities.vmware.com/thread/640143). What is known so far:

  • The crashes occur only on macOS Catalina 10.15.6, not on macOS Catalina 10.15.5.
  • The VirtualBox version probably doesn't matter (e.g. 6.1.12, 6.1.10, 6.0.22).
  • In the macOS kernel memory zone named "kalloc.32", continuously allocation of memory takes place, with a rate of about 1GB per hour. This can be easily observed using sudo zprint -d. When the kernel memory is exhausted, macOS randomly terminates processes but cannot recover, eventually leading to crashes in a random process.
  • Terminating a VM doesn't free the kernel memory, so the memory usage is accumulating until the next macOS reboot.
  • A VMware Fusion developer (Darius, dariusd) has "narrowed down the problem to a regression in the com.apple.security.sandbox kext (or one of its related components)" and "filed a comprehensive report with Apple". They have no known workaround at the moment, other than not using macOS Catalina 10.15.6 or running VMs only shortly.

After reproducing the crash, I've stripped down a VM to virtually nothing (see attached Empty.vbox). This VM contains no storage controller, no graphics controller, no everything I could get rid of. Even this VM exhibits the memory allocation, while endlessly displaying at the "No bootable medium found" message, albeit at a much slower rate of 4 KB per second (still more than enough for debugging ;)).

Attachments (1)

Empty.vbox (2.4 KB ) - added by fth0 4 years ago.
Very minimal VirtualBox VM ;)

Download all attachments as: .zip

Change History (10)

by fth0, 4 years ago

Attachment: Empty.vbox added

Very minimal VirtualBox VM ;)

comment:1 by fth0, 4 years ago

The VMware Fusion developer Darius has posted several VM details and how they influence the growth of the unwanted memory consumption. Due to the general nature of this issue, this is probably also applicable to VirtualBox VMs: https://communities.vmware.com/message/2973899#2973899.

comment:2 by Kevin L Mitchell, 4 years ago

Being affected by this. (This "me too" post courtesy of the lack of a subscription mechanism in bugs...)

comment:3 by Yauheni, 4 years ago

+1

comment:4 by KBART, 4 years ago

I am running 10.15.6 without issue. However, I usually shut it down after I'm through which typically is less than 4 hours. I don't use any printer or other devices and I have audio turned off. This is with Windows 8.1 guest. I do however notice that Activity monitor shows very high CPU usage many times maxed out and fan runs often as it gets hot. This is on a MacBook Air 2018 w/ 1.6 GHz Dual-Core Intel Core i5 and 8GB of RAM. I allocate 4GB to the guest and have 6.1.10 r138449 (Qt5.6.3) version of virtual box. Storage is Normal (VDI) 60 GB Dynamically allocated storage. Just an FYI, in hopes that this helps with diagnosing. I don't leave it up and running as it starts up so fast. But then again, I don't have any background services or processes that I need continuously running.

comment:5 by Kevin L Mitchell, 4 years ago

Apple recently released a fix for 10.15.6 that corrects the issue. Make sure you've applied the latest update, and that should eliminate the crashing/memory leaking issue.

comment:6 by fth0, 4 years ago

Apple has released a macOS Catalina 10.15.6 Supplemental Update (19G2021) on 2020-08-12, addressing the memory leak. A VMware Fusion lead developer (Darius, involved in filing the bug with Apple) has confirmed the bugfix. The VirtualBox users that initially reported the problem in the VirtualBox forums have also confirmed the bugfix, and my own tests also do not show the memory leak any more.

In consequence, this bug ticket can be closed.

Last edited 4 years ago by fth0 (previous) (diff)

comment:7 by rajasaur, 4 years ago

Im not sure if this is related, but ive been having more issues after a persistent use of VirtualBox (more than few hours at a time) when VirtualBox becomes unresponsive. I use minikube (which creates a VirtualMachine where Kubernetes is installed) and after a few hours, none of the commands , either UI or VBoxManage or minikube related commands dont work.

Im not sure what logs are needed but VBox.log for my machine doesnt seem to have any errors.

Im on OSX 10.15.6 (with the supplemental update installed) and Virtualbox is on 6.1.12.

comment:8 by Kevin L Mitchell, 4 years ago

rajasaur, have you installed the MacOS Catalina 10.15.6 Supplemental Update (19G2021) that Apple released on 2020-08-12? That seems to correct the issue this ticket was meant to track. If you have that installed, the mac shouldn't then crash.

Or are you saying that only VirtualBox becomes unresponsive? If so, then it's probably a different bug; the issue being tracked by this ticket was a memory leak that caused the host OS itself to misbehave and crash.

comment:9 by aeichner, 4 years ago

Resolution: fixed
Status: newclosed

I think we can conclude that this was a bug in macOS and Apple released a fix for this, closing.

Note: See TracTickets for help on using tickets.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette