[Bug 571093] Re: multipath + libvirtd eats away more memory over time

Nigel Jones dev at nigelj.com
Mon May 24 15:47:44 BST 2010


Okay, I've created a patch that should fix the issue in two ways, first
as observed in my previous comment I suspected that adding a
virNodeDeviceDefFree(def) to udevAddOneDevice() would solve the issue,
it for the most part did but still left approximately an 8k RES memory
leak.

Looking at the valgrind data that I had managed to generate (Comment
#13) I suspected a second leak and noticed that
udevProcessDeviceListEntry() after running udevAddOneDevice() ran
udev_device_unref(device); which according to the udev code does:

 * Drop a reference of a udev device. If the refcount reaches zero,
 * the resources of the device will be released.

Based on the fact that the reference is wiped at the end of
udevProcessDeviceListEntry() I have added it to
udevEventHandleCallback() which is the other main location of
udevAddOneDevice() getting called.

This is now resulting in no increase in RES memory (except for natural
increases).

Patch is attached.

** Patch added: "Rough patch that appears to fix the two main causes."
   http://launchpadlibrarian.net/49024396/9024-free-memory-for-invalid-devices.patch

-- 
multipath + libvirtd eats away more memory over time
https://bugs.launchpad.net/bugs/571093
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to libvirt in ubuntu.



More information about the Ubuntu-server-bugs mailing list