VirtualBox

Opened 10 years ago

Closed 10 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

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

comment:1 by Frank Mehnert, 10 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, 10 years ago

Resolution: fixed
Status: newclosed

Fix is part of 4.3.22.

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