VirtualBox

Opened 10 months ago

Closed 2 months ago

#21752 closed defect (fixed)

Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.x x>12

Reported by: PepperSalsa Owned by:
Component: network Version: VirtualBox-7.0.6
Keywords: VBoxIntNetSwitch, memory leak, RAM, Mac, macOS, Linux, network, Whonix Cc:
Guest type: Linux Host type: Mac OS X

Description (last modified by PepperSalsa)

--- 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 —-

  1. 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.
  2. Shut down both VMs and VirtualBox itself.
  3. Observe if the VBoxIntNetSeitch process is open in macOS’ Activity Monitor.
  4. 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.

Attachments (1)

Whonix Gateway and Workstation VirtualBox Logs.7z (41.7 KB ) - added by PepperSalsa 10 months ago.
7zip archive of the Whonix Gateway and Workstation VM logs.

Download all attachments as: .zip

Change History (12)

by PepperSalsa, 10 months ago

7zip archive of the Whonix Gateway and Workstation VM logs.

comment:1 by PepperSalsa, 10 months ago

Description: modified (diff)

comment:2 by PepperSalsa, 10 months ago

Description: modified (diff)

comment:3 by aeichner, 9 months ago

Summary: Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.x

Thanks for the report, this should be fixed in the next 7.0.x maintenance release.

comment:4 by aeichner, 9 months ago

There is a 7.0 testbuild available with the fixes here, would be great if you could give it a try.

comment:5 by galitsyn, 6 months ago

Resolution: fixed
Status: newclosed

Hi PepperSalsa,

We just released a new version of VirtualBox today. This issue should be fixed there. Closing it. Please leave a comment if it is still actual for you. As usual, builds are available on Downloads page. Thank you for reporting.

comment:6 by aaaaa2, 4 months ago

This is still a problem with VB 7.0.12. Same reproduction steps as above. VBoxIntNetSwitch leaks memory (takes 3.97GB according to Activity Monitor but only 2.7MB real mem) and doesn't quit when VB quits - must be manually forced to quit.

comment:7 by paulson, 3 months ago

Resolution: fixed
Status: closedreopened

There were additional memory leaks addressed in VBoxIntNetSwitch in VirtualBox 7.0.14. Could you try it out and report back on your experience?

comment:8 by aaaaa2, 3 months ago

Getting there. It doesn't leak anymore on 7.0.14 (<3mb after a few hours) but it still doesn't quit when VB quits. It needs to be manually force quit.

comment:9 by paulson, 2 months ago

Thanks for the feedback regarding the memory leaks. Could you file a separate ticket for the VBoxIntNetSwitch lack of graceful exit issue? It's best to keep one issue per filed ticket. Thanks!

in reply to:  9 comment:10 by aaaaa2, 2 months ago

Replying to paulson:

Thanks for the feedback regarding the memory leaks. Could you file a separate ticket for the VBoxIntNetSwitch lack of graceful exit issue? It's best to keep one issue per filed ticket. Thanks!

Sure, done #21999

comment:11 by paulson, 2 months ago

Resolution: fixed
Status: reopenedclosed
Summary: Memory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.xMemory Leak in the VBoxIntNetSwitch Process in VirtualBox 7 => fixed in SVN/7.0.x x>12

All of the memory leaks in the VBoxIntNetSwitch should be addressed as of 7.0.14. The separate issue around VBoxIntNetSwitch not exiting gracefully is being tracked in ticket #21999. Thanks again for the report and fix verification.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use