After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646867 - Memory leak on gvfsd "listMounts" dbus call
Memory leak on gvfsd "listMounts" dbus call
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
1.7.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2011-04-06 00:54 UTC by Alistair Buxton
Modified: 2011-04-15 11:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
python testcase demonstrating the bug (259 bytes, text/x-python)
2011-04-06 00:54 UTC, Alistair Buxton
Details
valgrind log showing the memory leak (153.70 KB, text/plain)
2011-04-06 01:00 UTC, Alistair Buxton
Details

Description Alistair Buxton 2011-04-06 00:54:37 UTC
Created attachment 185243 [details]
python testcase demonstrating the bug

Whenever something calls the gvfsd "listMounts" call on dbus, gvfsd leaks some memory. It's not a huge amount normally but on my system two factors conspired to make the overall impact huge: Firstly, my gvfs is clogged with http URLs I clicked on in pidgin, and secondly, gnome-system-monitor calls listMounts 17 times for every refresh of it's display.

A valgrind log and python testcase are attached. The python testcase causes gvfsd to use hundreds of mb of ram within seconds by just calling listMounts on a loop.

Bug can be found in 1.6.4 and 1.7.3 (ubuntu maverick and natty respectively.)
Comment 1 Alistair Buxton 2011-04-06 01:00:42 UTC
Created attachment 185244 [details]
valgrind log showing the memory leak

valgrind log showing the leak. it's the big one at the end - 1.5GB in 20 minutes, and this was without the testcase. log is from gvfsd 1.6.4.
Comment 2 C de-Avillez 2011-04-06 23:33:25 UTC
original Ubuntu bug: https://bugs.launchpad.net/ubuntu/bugs/751523
Comment 3 Alistair Buxton 2011-04-08 09:16:02 UTC
above link does not work, try this one: https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/751523
Comment 4 Alexander Larsson 2011-04-15 11:07:51 UTC
Good catch, fixed this (and a bunch of other leaks!!!)
Commited as:
http://git.gnome.org/browse/gvfs/commit/?id=7460f26f9243e6b1745a448b8dc05b15d12aa86e