gnome-system-monitor spams dbus with requests for volume information

Bug #751523 reported by Alistair Buxton
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Gnome System Monitor
Fix Released
Medium
gnome-system-monitor (Ubuntu)
Fix Released
Low
Unassigned
gvfs (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: gnome-system-monitor

Steps to reproduce:

1. open gnome-system-monitor
2. switch to the "file systems" tab
3. in edit->preferences tick "show all filesystems" and set update interval to 1 second

gnome-system-monitor will now spam dbus with volume information requests until dbus eventually refuses to honour any more. At this point it will start filling .xsession-errors with error messages. This behaviour also seems to cause gfvsd to use incredible amounts of memor.

Showing all filesystems seems to be required to trigger the bug on some systems - notably clean VM installs with not much mounted filesystems. But when it's turned on the bug happens on lucid, maverick and natty clean/fully patched installs - although the leak happens very slowly in this case - about 1mb per minute.

On my main workstation (which is maverick) it's a different story - with "optimal" g-s-m settings, gvfs can leak 1GB in 10 minutes.

ProblemType: Bug
DistroRelease: Ubuntu 10.10
Package: gnome-system-monitor 2.28.1-1ubuntu1
ProcVersionSignature: Ubuntu 2.6.35-25.44-generic 2.6.35.10
Uname: Linux 2.6.35-25-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Tue Apr 5 15:54:06 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
ProcEnviron:
 PATH=(custom, user)
 LANG=en_GB.utf8
 SHELL=/bin/bash
SourcePackage: gnome-system-monitor

Related branches

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

.xsession-errors showing the error spam.

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This problem seems to very quickly expose the memory leaks in the various gvfs backends since it constantly hammers them with requests, see https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/433500

description: updated
tags: added: lucid natty
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Mounted gvfs filesystems on my main workstation where the problem is much worse than on a clean install.

description: updated
Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

This is the valgrind log of gvfsd from my maverick workstation with the bug in full effect. Leaking 1.5GB took about 30 minutes. Here's the relevant part:

==18126== 1,590,801,664 (1,795,104 direct, 1,589,006,560 indirect) bytes in 9,756 blocks are definitely lost in loss record 480 of 480
==18126== at 0x4C2815C: malloc (vg_replace_malloc.c:236)
==18126== by 0x57B965A: dbus_message_new_empty_header (dbus-message.c:1079)
==18126== by 0x57BD1C7: dbus_message_new_method_return (dbus-message.c:1241)
==18126== by 0x4085E7: dbus_message_function (mount.c:927)
==18126== by 0x57BEE4D: _dbus_object_tree_dispatch_and_unlock (dbus-object-tree.c:858)
==18126== by 0x57B248B: dbus_connection_dispatch (dbus-connection.c:4691)
==18126== by 0x4175E4: message_queue_dispatch (dbus-gmain.c:127)
==18126== by 0x5C41341: g_main_context_dispatch (gmain.c:2149)
==18126== by 0x5C452A7: g_main_context_iterate (gmain.c:2780)
==18126== by 0x5C457B4: g_main_loop_run (gmain.c:2988)
==18126== by 0x409099: main (main.c:128)

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

I was watching the session bus with dbus-monitor and i noticed that every URL i've clicked on in pidgin at least since the last reboot shows up as a dbus object under gvfs, and g-s-m constantly polls this stuff. That probably explains why the problem is so much worse on my workstation, i've clicked on a *lot* of URLs in the past month...

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

Some more investigation... valgrind points to "listMounts" dbus call as the culprit of the leaks. This is the same call that is full of old pidgin URLs and other cruft. I wrote a python script to call it and gvfsd leaks 200kb every time. But the real killer.....

gnome-system-monitor calls "listMounts" 17 times for every update, causing nearly 2mb to leak for every update.

I've sent the bug report and testcase for gvfsd upstream.

Changed in gnome-system-monitor:
importance: Unknown → Medium
status: Unknown → New
Changed in gvfs (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Changed in gvfs (Ubuntu):
status: Triaged → Fix Committed
Changed in gnome-system-monitor (Ubuntu):
status: New → Invalid
importance: Undecided → Low
Changed in gvfs (Ubuntu):
importance: Medium → Low
Changed in gnome-system-monitor (Ubuntu):
status: Invalid → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gvfs - 1.8.0-0ubuntu2

---------------
gvfs (1.8.0-0ubuntu2) natty; urgency=low

  * 90_git_leaks_fixes.patch: git commit to fix leaks (lp: #751523)
 -- Sebastien Bacher <email address hidden> Fri, 15 Apr 2011 15:39:56 +0200

Changed in gvfs (Ubuntu):
status: Fix Committed → Fix Released
Changed in gnome-system-monitor:
status: New → Fix Released
Revision history for this message
Néstor A.C. (nestorac) wrote :

Is this bug going to be fixed also in Ubuntu 10.04 LTS? It's also happening to me, and as you know, it's serious.

Thanks!

Revision history for this message
Andrew Somerville (andy16666) wrote :

Same question about the LTS release. Will we get a fix?

Revision history for this message
Dmitri Bachtin (damg) wrote :

The reported patch [2] applies successfully on lucid from bzr repo [1] and the gvfs source builds successfully on i386. I could not verify whether the patch fixes the problem due to my time constraints.

[1] - lp:ubuntu/lucid/gvfs
[2] - http://git.gnome.org/browse/gvfs/commit/?id=7460f26f9243e6b1745a448b8dc05b15d12aa86e

Revision history for this message
Robert Roth (evfool) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. However, I am closing it because the bug has been fixed in the latest development version of Ubuntu - Precise Pangolin.

If you need a fix for the bug in previous versions of Ubuntu, please follow the instructions for "How to request new packages" at https://help.ubuntu.com/community/UbuntuBackports#request-new-packages

Changed in gnome-system-monitor (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.