Bug 972371 - f19 virt-manager consistently leaks memory ( > 1GB in 12 hours)
f19 virt-manager consistently leaks memory ( > 1GB in 12 hours)
Product: Fedora
Classification: Fedora
Component: virt-manager (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Cole Robinson
Fedora Extras Quality Assurance
: 882148 974287 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2013-06-08 19:32 EDT by Cole Robinson
Modified: 2013-10-09 20:56 EDT (History)
15 users (show)

See Also:
Fixed In Version: virt-manager-0.10.0-4.fc19
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-09 20:56:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Some valgrind output (16.15 KB, text/plain)
2013-06-17 08:02 EDT, Cole Robinson
no flags Details

  None (edit)
Description Cole Robinson 2013-06-08 19:32:45 EDT
Start virt-manager, have it connect to a qemu connection with a bunch of offline VMs, come back in a few hours and see that it's memory has climbed pretty high and is still rising. Likely some side effect of the gtk3 conversion, need to track it down.
Comment 1 Cole Robinson 2013-06-12 15:37:46 EDT
*** Bug 882148 has been marked as a duplicate of this bug. ***
Comment 2 Cole Robinson 2013-06-14 09:11:30 EDT
*** Bug 974287 has been marked as a duplicate of this bug. ***
Comment 3 Cole Robinson 2013-06-17 08:02:59 EDT
Created attachment 762012 [details]
Some valgrind output

That is the major memory bits from a 24 hour virt-manager run under valgrind.

I tried some python specific memory debugging but total objects in memory seems to be staying quite static, so it seems something below the python code is leaking. That report seems to indicate pygobject. I poked at it for a while but couldn't find anything simple.
Comment 4 Jens Petersen 2013-07-06 00:39:31 EDT
Not sure but I feel like f19 v-m leaks pretty quickly... :-|
Comment 5 Honza Horak 2013-07-08 02:50:29 EDT
(In reply to Jens Petersen from comment #4)
> Not sure but I feel like f19 v-m leaks pretty quickly... :-|

Well, I am sure, it really does.
Comment 6 Robert Solomon 2013-08-12 12:06:39 EDT
I am experiencing a fast memory leak using virt-manager (virt-manager-0.10.0-1.fc19.noarch) crashes my gnome session and sometime my whole machine in a few minutes.  Locks up.  If the box is responsive at all, I start getting out of memory messages.

Steps to reproduce: start virt-manager, view a local machine.  If the desktop hasn't frozen right away, close the viewer and watch it freeze.

Tested on Lenovo q190 and Thinkpad X61.  Both are upgraded from F-18 using the yum upgrade method.  

Let me know if you need additional information.  The q190 is not in production and I can change anything on it.  My (F-18) production viewer is stable with virt-manager running for weeks at a time.  All three machines have 4G memory.



I assume the q190 has the same packages as the X61.

Comment 7 Robert Solomon 2013-08-17 17:31:03 EDT
A few more notes:

virt-manager seems to crash only when run from a root command prompt.  No crashes if run as a normal user and then authenticated.

My memory problems turned out to be due to deja-dup-monitor sucking up 80% of the memory; may or may not be related.

Hope this helps someone.
Comment 8 Cole Robinson 2013-09-02 09:57:14 EDT
Okay I poked at this some more and made some progress. AFAICT this still isn't virt-manager's fault really, but I pushed a couple commits that effectively stop the leak when the app isn't being used:


The trick is that you have to hide all stats graphs in the main screen from the View menu. Even without doing that, after those 2 commits the leak should be much smaller. And the graph trick only has any effect after those commits. I'll backport them to F19 soonish
Comment 9 Honza Horak 2013-09-12 04:30:34 EDT
I'm glad I can confirm the patches above do quite good job. I tried to apply them and virt-manager's leaked memory amount has decreased significantly, approx. to one tenth.
Comment 10 Fedora Update System 2013-09-24 11:48:55 EDT
virt-manager-0.10.0-2.fc19 has been submitted as an update for Fedora 19.
Comment 11 Fedora Update System 2013-09-26 02:23:55 EDT
Package virt-manager-0.10.0-2.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing virt-manager-0.10.0-2.fc19'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
Comment 12 Cole Robinson 2013-10-03 18:37:06 EDT
FWIW I filed a pygobject bug:

Comment 13 Jens Petersen 2013-10-04 00:44:16 EDT
virt-manager-0.10.0-3.fc19 is already stable now.
Comment 14 Fedora Update System 2013-10-06 15:40:29 EDT
virt-manager-0.10.0-4.fc19 has been submitted as an update for Fedora 19.
Comment 15 Fedora Update System 2013-10-09 20:56:40 EDT
virt-manager-0.10.0-4.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.