Description of problem: Using the latest stable release (0.10.0) of virt-manager, built using Gentoo. As seen from 'top', the application keeps on adding about 8KB per second to its RSS eventually running the system out of memory after 2 days of uptime. Version-Release number of selected component (if applicable): How reproducible: Every time. Steps to Reproduce: 1. Run the app. 2. Connect to couple of server using qemu+ssh. 3. Wait for few hours and see RSS of virt-manager swell, leading to eventual crash of the system. Actual results: Virt-manager kills the system. Expected results: Virt-manager keeps running for 24x7, 365days a week. Additional info:
That's not 8KB per second. That's 8KB per 3 seconds. Sorry.
There's some more info in this Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=972371 The root issue is in pygobject but I haven't narrowed it down to file a bug yet. Upstream virt-manager has some workarounds that entirely avoid the leak if you hide performance graphs in the main manager window, but that's the best we can do until pygobject is fixed. Commits are referenced in that bug.
I used this systemtap script to look at the issue http://blog.verbum.org/2011/03/19/analyzing-memory-use-with-systemtap/ Five second usage g_slice: 149200 g_malloc: 4095 GObject GdkPixbuf: 0 GObject PangoLayout: 0 Five second usage g_slice: 147320 g_malloc: 4039 GObject GdkPixbuf: 0 GObject PangoLayout: 0 Five second usage g_slice: 160576 g_malloc: 4095 GObject GdkPixbuf: 0 GObject PangoLayout: 0 That's 150kb leaked every 5 seconds, with one connection open with 4 inactive Vms. If i disconnect from active connections, then only 32 bytes are leaked Five second usage g_slice: 32 g_malloc: 0 Five second usage g_slice: 32 g_malloc: 0 Five second usage g_slice: 32 g_malloc: 0 Unfortunately I'm unable to obtain userspace stack traces for these g_slice allocs
I came up with a minimal reproducer and filed a pygobject bug: https://bugzilla.gnome.org/show_bug.cgi?id=709397 Upstream virt-manager has bits to reduce the impact of the leak, and if you turn off all graphs in the UI it reduces it almost to nothing. So that's about the best we can do for now.
I have pygobject 3.12.2 and virt-manager-0.10.0-r2 using Gentoo portage, both of which are supposed to have upstream fixes for the leak. But the issue with virt-manager is very much there. The rate may be even faster than before about 32KB/sec. Is anyone testing this thing at all? I mean I just need to open virt-manager, connect to a host using qemu/ssh and just open the console of the one of the VMs. 'top' shows the leak right away. No fancy graphics or anything. Just regular console of the VM.
Those packages are not the latest upstream release, so you need to file a bug with your distro. On Fedora the memory leak has been fixed for a long time