Opened 9 years ago

Closed 9 years ago

#13770 closed defect (fixed)

VBoxService memory leak when DBUS is not running in the guest

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


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

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

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 (2)

comment:1 by Frank Mehnert, 9 years ago

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

comment:2 by Frank Mehnert, 9 years ago

Resolution: fixed
Status: newclosed

Fix is part of 4.3.22.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use