VirtualBox

Ticket #13770 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

VBoxService memory leak when DBUS is not running in the guest

Reported by: PeterB Owned by:
Priority: minor Component: guest additions
Version: VirtualBox 4.3.20 Keywords: VBoxService dbus vminfo
Cc: Guest type: Linux
Host type: Linux

Description

VBoxService leaks memory with a rate of ca. 3 MB/day.

I have a minimal Linux guest VM (with no X installed) used as a simple server. With an uptime of 30 days I gradually reached a ~100 MB memory footprint for the VBoxService process (and increasing...)

Using GDB to analyze the heap of the VBoxService process, I tracked down the issue to be related to DBus, as the heap was _full_ of these strings:

Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
org.freedesktop.DBus.Error.FileNotFound

The error is understandable as I don't have DBus installed in the guest. The problem is that the error messages stay on the heap and don't get freed.

Digging further, I suspect that the problem is in VBoxServiceVMInfo.cpp: (line 798)

if (   pConnection
    && dbus_error_is_set(&dbErr))
    dbus_error_free(&dbErr);

In my case pConnection is NULL, since the DBus connection attempt with dbus_bus_get() was not successfull. However, the dbErr buffer is filled in and will not be freed.

Please let me know if you need any more info.

Change History

comment:1 Changed 3 years ago by frank

Thank you for this analysis! I think you are right. The fix will be available in the upcoming maintenance release.

comment:2 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to fixed

Fix is part of 4.3.22.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use