Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.x
|Reported by:||PepperSalsa||Owned by:|
|Keywords:||VBoxIntNetSwitch, memory leak, RAM, Mac, macOS, Linux, network, Whonix||Cc:|
|Guest type:||Linux||Host type:||Mac OS X|
Description (last modified by )
--- More Detailed Summary ---
Memory leak in the VBoxIntNetSwitch process in VirtualBox 7. If two virtual machines are set up to communicate with each other over the internal network, the VBoxIntNetSwitch process is launched when one of the two VMs is launched. Memory/RAM usage for the process increases as downloaded data in either VM increases. The process holds onto this memory, only a tiny amount is released when the VMs are closed, and the closing of the two VMs and VirtualBox does not stop the VBoxIntNetSwitch process. The process has to be Force Quit to release the memory. It could presumably cause the host OS (macOS) to run out of memory if lots of data is downloaded in the VM(s).
—- Detailed Issue —-
I found a thread from over six months ago where a user found a memory leak with the VBoxIntNetSwitch process on macOS, specific to VirtualBox version 7.0.x (they fixed it by downgrading), when running two VMs that are communicating with each other on "internal networks," as the user says. In their case, it was a massive leak, causing their Mac to run out of memory. https://forums.virtualbox.org/viewtopic.php?t=108417&sid=bf3fa83cbfda91e2689211930efdc7b3
In my case, I'm using the Whonix Gateway and Whonix Workstation VMs. Whonix Gateway runs Tor, and Whonix Workstation runs user software, like the Tor browser. All network activity on the Workstation VM goes through the Gateway VM.
Due to this communication between the VMs, the VBoxIntNetSwitch process starts when the Gateway VM is launched (which is to be launched before the Workstation VM), and it increases in memory usage with any incoming data, such as downloading a file in the Workstation VM’s Tor browser, so there is a correlation between VBoxIntNetSwitch's memory usage and VM network activity.
The issue is, it only falls in memory usage by a very small amount when the VMs are closed, and the process doesn't quit when both VMs and VirtualBox are closed. It will hold onto the memory, which could presumably cause the host OS to run out of memory if a lot of data was downloaded in the VM(s) and/or if there’s other software using large amounts of memory. I cannot use the Quit button in macOS' Activity Monitor to stop the VBoxIntNetSwitch process. I have to use Force Quit, which will then release the memory. It is the only VirtualBox-related process that persists after VirtualBox and all VMs are closed. I’ve confirmed with a Whonix developer that this isn’t a problem with Whonix, it’s on VirtualBox’s end.
I don’t think this is considered a memory leak since I’m not experiencing the same problem as the person in the thread I linked to. However, we both have the same issue of closing both VMs, but still needing to kill the VBoxIntNetSwitch process.
--- Disclaimer ---
I'm unsure if this occurs with other guest operating systems that communicate with each other over the internal network, or if it's just Linux. I also haven't yet tried a test build of VirtualBox.
—- Reproduction Steps —-
- Use two VMs that communicate with each other over the internal network, such as Whonix Gateway and Whonix Workstation. Gateway is to be launched before Workstation is launched.
- Shut down both VMs and VirtualBox itself.
- Observe if the VBoxIntNetSeitch process is open in macOS’ Activity Monitor.
- Try to Quit the process. If it won’t close, Force Quit the process.
—- Expected Behavior —-
Closing the VMs stops the VBoxIntNetSwitch process.
—- Actual Behavior —-
Closing the VMs does not stop the VBoxIntNetSwitch process, causing it to stay alive and hold onto system memory. The process has to be Force Quit.
—- Software Versions and Processor Type —-
- macOS Monterey 12.6.7
- Intel x86 processor
- VirtualBox 7.0.8 and Extension Pack 7.0.8
—- Other —-
- Full log files attached for both the Whonix Gateway and Whonix Workstation VMs. Edit: I used a 7z archive because I wasn't aware two different attachments could be uploaded.
- No matching bug report has been filed.
- Somewhat similar issue mentioned in macOS host forums.
Change History (6)
comment:3 by , 4 months ago
|Summary:||Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 → Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.x|