gvfsd memory leak

Bug #433500 reported by HankB
136
This bug affects 29 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: gvfs

I found my system generally unresponsive after running overnight. I could not get the X screen saver to respond but was able to <ctrl><alt><F1> to a console window, log in and run 'top' where I found that all RAM and swap were exhausted (0 swap available) and top reported that gvfsd was using 75% of RAM. I killed firefox (using about 10% of RAM) and saw that gvfsd went up to about 77% in a couple of minutes. At that point I rebooted the system to try to restore normal operation.

I'm not sure if this is related to difficulty mounting a Sansa Fuze device earlier in the day. The device failed to mount on the first try but mounted OK on the second attempt (plugging in the USB cable.) The Sansa Fuze has 2GB flash and an 8GB micro-SDHC card and is new so I do not have much experience using it with this system.

I found the following relevant thread: http://ubuntuforums.org/showthread.php?t=1151645

ProblemType: Bug
Architecture: amd64
DistroRelease: Ubuntu 9.04
Package: gvfs 1.2.2-0ubuntu2
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: gvfs
Uname: Linux 2.6.28-15-generic x86_64

Revision history for this message
HankB (hbarta) wrote :
Revision history for this message
HankB (hbarta) wrote :

Further information -

Earlier in the day I copied about 4GB of files from an NFS mount to the Sansa Fuze. During the copy, my wireless connection (iwlagn, Intel 5300) dropped and I restored it by running "sudo iwconfig wlan0 down up". When the connection resumed, the file copy (using Nautilus drag and drop) continued automatically.

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please try to obtain a valgrind log following the instructions at https://wiki.ubuntu.com/Valgrind and attach the file to the bug report. This will greatly help us in tracking down your problem.

Changed in gvfs (Ubuntu):
assignee: nobody → Ubuntu Desktop Bugs (desktop-bugs)
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Pedro Villavicencio (pedro) wrote :

We are closing this bug report because it lacks the information we need to investigate the problem, as described in the previous comments. Please reopen it if you can give us the missing information, and don't hesitate to submit bug reports in the future. To reopen the bug report you can click on the current status, under the Status column, and change the Status back to New. Thanks again!.

Changed in gvfs (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Christian Berg (xeniac) wrote :

The same issue happend to my PC tonight.

I usalay leave my PC on overnight. This night i started an distcc daemon and compiled an kernel on my netbook with distcc.
This morning my PC was very unresponsive and slow, also some panel applets crashed (cpufreq, and audio mixer)
i started the gnome-system-monitor. CPU utilization was pretty normal, but gvfsd eats 3gib from my 4 Gig RAM

I don't have any Networkshares currently, so i didn't copied anything over gvfs.
Auto-Suspend ist off, but DPMS is activated after 5min, and power-management for Harddisks is active.

i leaved the faulty daemon open and reported this issue via ubuntu-bug, i hope this brings you a helpful backtrace. IMHO it's a plain Memoryleak

Revision history for this message
Casey Watson (watsoncj) wrote :

I seem to be able to reproduce this issue fairly reliably. I have VirtualBox setup to share a folder with the guest OS. This shared folder is being used as the iTunes music folder.

While playing music in the guest OS (i.e. reading lots of data from the shared folder) the memory usage of gvfsd rises at about 60MB/Minute. Eventually the system has to thrash as the memory usage of gvfsd hits 4GB.

I'm not sure if this is related, but gvfsd appears to have memory mapped each library multiple times. This is where the bulk of the memory usage seems to be coming from. Perhaps some file handles aren't being closed properly?

When I kill VirtualBox, the memory usage of gvfsd stops increasing.

I have attached a screenshot, please let me know if I can grab anything else. Sebastian's comment above mentions to grab a Valgrind, but I'm not sure that I can do with this daemon process.

Changed in gvfs (Ubuntu):
status: Invalid → New
Revision history for this message
Michiel Brentjens (m-a-brentjens) wrote :

We have a similar problem. gvfsd consumes a LOT of memory when gnome-system-monitor is running in KDE. I am running Kubuntu 9.10. uname-a: Linux michiel-desktop 2.6.31-19-generic #56-Ubuntu SMP Thu Jan 28 02:39:34 UTC 2010 x86_64 GNU/Linux. The amount of consumed memory remains the same even after gnome-system-monitor is killed. Once gnome-system -monitor is restarted, gvfsd leaks memory at roughly 300kb/s, which is equivalent to roughly a GB per hour.

I would like to run valgrind on this process, however, gvfsd seems to be restarted automatically every time I kill it, preventing me to run valgrind on the particular instance that does the leaking. Do you have any tips?

Michiel

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

I also have this problem ! I am running Ubuntu (vanilla/Gnome) 9.04.

The problem only appeared 3 days ago though, and from reading the above comments it seems I have the same context:

- leaving the computer running 24/7
- I did started a Virtualbox session a few days ago and it's been running 24/7 as well
- gfvsd ate 2GB yesterday evening. I ended the process and instantly got my 2GB back. This morning the machin was unresponsive and gfsd (must have restarted automatically, somehow ?), verdict : 3GB had leaked ! 2GB in RAM (hence filling/saturating the 3.2GB of RAM I have available), and putting the remaining 1GB on swap.

I am very surprised that such a disaster is considered only as a "low" importance bug ?!

I saw a comment above talking about power saving settings. If it does matter, then I guess I should add that all power saving features are disabled (it a desktop computer). No screensaver, hard drives alwyas running, everything always on.

I am not terribly skilled at debugging, and other subscribers to this bug seem more able than I am, but if there is sometihng useful that I could contribute, I will definitely make the effort, as this gigantic and fast growing memory leak is giving me nightmares now I have hit it ! :-/

Revision history for this message
Trouilliez vincent (vincent-trouilliez-modulonet) wrote :

I should add (sorry, can't find a way to edit my previous comment ?! ) that I am not using any network share. I do have an NFS server setup in Nautilus, but it is not mounted.

VirtualBox runs Windows XP but there is only one application running in it, and it does not connect to network.

Revision history for this message
Arthur Cruz (s3t-sk8) wrote :

It's right now with 2.9gb and growing!

Ubuntu 9.10, 32 bits... Kernel with PAE

Revision history for this message
yellowbkpk (ian-dees) wrote :

I'm seeing this when I try to update any of my podcasts from Rhythmbox 0.12.5 on Karmic (by right-clicking Podcasts and selecting "Update All Feeds"). I am subscribed to the following podcasts:

NPR: Car Talk, This American Life, or Radiolab

gvfsd-http consumes roughly one whole CPU core (while using a constant 3.2MiB) and gvsfd consumes almost no CPU and uses 1MiB of memory every second or so. If I let this sit for long enough, the system will run out of memory.

Revision history for this message
darking358 (gaowenyu1982) wrote :

when I upgrade to 10.04 from 9.10,found gvfsd eat a lot of memory,after umount network share and kill gvfsd,seem all will be ok

darking@darking-desktop:~/scripts/trunk$ gvfs-mount -l
Volume(0): cdrom0
  Type: GUnixVolume
Mount(0): fa -> file:///media/cnimg/fa
  Type: GUnixMount
Mount(1): fe -> file:///media/cnimg/fe
  Type: GUnixMount
Mount(2): fmg -> file:///media/cnimg/fmg
  Type: GUnixMount
Mount(3): fos -> file:///media/cnimg/fos
  Type: GUnixMount
darking@darking-desktop:~/scripts/trunk$ top

top - 10:35:09 up 1 day, 23:07, 3 users, load average: 3.94, 4.66, 4.51
Tasks: 262 total, 2 running, 260 sleeping, 0 stopped, 0 zombie
Cpu(s): 75.3%us, 24.3%sy, 0.0%ni, 0.0%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st
Mem: 2053668k total, 1904008k used, 149660k free, 26464k buffers
Swap: 2048276k total, 416928k used, 1631348k free, 130812k cached

  PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
22424 darking 20 0 1272m 1.2g 1868 S 0.7 58.8 7:31.46 gvfsd
 2123 darking 20 0 523m 277m 21m S 5.3 13.8 16:22.49 firefox-bin
 2091 darking 20 0 296m 54m 17m S 0.3 2.7 1:00.38 thunderbird-bin
  951 root 20 0 327m 22m 5620 S 0.0 1.1 5:49.14 Xorg
 1671 darking 20 0 64416 15m 9652 S 0.0 0.8 0:03.95 python
22529 darking 20 0 122m 15m 6268 S 4.0 0.8 78:38.13 x-session-mana

Revision history for this message
barnacle (barnacle) wrote :

I have a similar problem with gvfsd, where its memory usage grows in certain circumstances. I checked some of the other reports here, but cannot seem to reproduce it with file copies or connections. If I don't have gnome-system-monitor running, it does not seem to be a problem.

To reproduce on my setup, I just have to start gnome-system-monitor, but the problem does not appear, until I click the file "File Systems" tab. I then disabled all my remote mounts (mostly samba/windows shares) and switched between the "File Systems" and "Processes" tabs. Every time when on the "File System" tab the the memory used by gvfsd increased. When on any of the other tabs, there was no problem.

I then did a few tests by changing some of the settings.

In the preferences I changed the update interval to 20 seconds.
In one minute the memory usage increased from 310 KB to 324KB

I then ticked "Show all filesystems"
In one minute, the usage increased from 320Kb to 472KB

I then changed the update interval to 1 second and unchecked the "Show all filesystems"
In one minute the usage increased from 320KB to 376KB

I then checked the "Show all filesystems" and;
In one minute the usage increased from 320KB to 1.7MB

As I am no techie (so, I'm not sure I did it correctly) I ran system monitor with valgrind and attach the log - The problem was that it also was so unresponsive, that I could not switch between the tabs in the system monitor)

Revision history for this message
Steffen H. (shulegaa) wrote :

     I watched 8 Gb of RAM fill ... and bring my machine to a crawl/halt. I killed almost everything ... and then watched in horror as gvsfd grew in virtual memory size from 1.4 Gb to 2.2 Gb in just a few minutes. It seems to go up by 100Mg every minute. As I write this, it is stil growing. Wow. This is a disaster. I'm off to look into how to remove/deactivate gvfsd.

     This trashes my 10.04 system. It become totally unusable fast. I'm starting to miss 8.10 again. Bummer!

Revision history for this message
feci (feci1024) wrote :

I'm using Ubuntu 8.10 64bit and I have the same problem that most of you have already described.
My workstation has 4 Gb of ram and I usually have the swap partitions disabled, I only activate them if I really need to. I also have my workstation on 24/7 and a lot of services (like mysqld, sshd, apache, virtualbox, ...) running on it 24/7. I can't figure out the exact pattern which causes the memory leak in gvfsd, but I don't use network shares, neither NFS nor samba. I do use the shared folders feature of virtualbox, but I'm not convinced that the shared folders are really samba or nfs shares. So as far as I see the issue it isn't just related to sharing.
In my case the issue must have to do something with usb memory sticks, which are of course automatically mounted by gvfsd once inserted, but even if they are removed after being first unmounted, gvfsd will start eating up all the memory it can get.
If there is anything that I could do to provide useful information please tell me how to do so.

Revision history for this message
Alec Wright (alecjw) wrote :

I cant work out how to add this to the list at the top of the page, because launchpad confuses me. But I've forwarded the bug upstream: https://bugzilla.gnome.org/show_bug.cgi?id=622455
I've had the problem on gentoo and its been reported on opensuse too, so it must be an upstream bug

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for sending the bug to GNOME

Changed in gvfs (Ubuntu):
assignee: Ubuntu Desktop Bugs (desktop-bugs) → nobody
status: New → Triaged
Revision history for this message
Noto Yota (info-notoyota) wrote :

same here.
Ubuntu 10.10
wubi install
also using virtualbox, but no shared folders.

I have one nfs-volume mounted with fstab.
one smb-filesystem with nautilus/gvfs.
one ntfs filesystem with nautilus/gvfs.

Both the nfs and smb are from a Debian machine.

memory usage is growing at a rate of about 1MiB/s.
After killing the process it just starts at zero again and grows until the system freezes.

Regards,
Patrick

Revision history for this message
Märt Põder (boamaod) wrote :

Ubuntu 10.10, gvfsd starts to use huge amounts of memory.

I have several USB devices (cameras, phones, ipod, usb-hdd with many partitions, some of them ext4, some fat32) connected and I connect/disconnect them occasionally, some of them using sudo. At some point gvfsd starts to eat memory. It seems that it has something to do with connecting/disconnecting, but I haven't figured out the real cause.

Revision history for this message
Alexandre Gauthier (underwares) wrote :

Same issue here on 10.10 x86_64.

Streamed some music over a ssh mount through gvfs. Ever since doing that, even after multiple reboots -- gvfsd stands at ~1gb of private memory.

[0:530] callisto:~ $ ps waux | grep [g]vfsd
1000 9835 0.0 0.1 170148 5420 ? Sl 12:04 0:00 /usr/lib/gvfs/gvfsd-http --spawner :1.11 /org/gtk/gvfs/exec_spaw/3
1000 25512 1.8 23.0 983312 933956 ? S 11:39 0:59 /usr/lib/gvfs/gvfsd
1000 25629 0.0 0.0 130488 3576 ? S 11:39 0:00 /usr/lib/gvfs/gvfsd-trash --spawner :1.11 /org/gtk/gvfs/exec_spaw/0
1000 25675 0.0 0.0 45860 2616 ? S 11:39 0:00 /usr/lib/gvfs/gvfsd-metadata
1000 25719 0.0 0.0 52060 2700 ? S 11:39 0:00 /usr/lib/gvfs/gvfsd-burn --spawner :1.11 /org/gtk/gvfs/exec_spaw/1
1000 26664 0.0 0.0 66848 3320 ? S 11:40 0:00 /usr/lib/gvfs/gvfsd-computer --spawner :1.11 /org/gtk/gvfs/exec_spaw/2

This is rather unsettling, especially since ever since that happened dbus is now eating all the CPU as well :(

Revision history for this message
Pacho Ramos (pacho) wrote :

This is the gentoo bug showing the same problem:
http://bugs.gentoo.org/show_bug.cgi?id=341967

Revision history for this message
Christopher (captain-c) wrote :

I am on 10.10 x86_64. Everytime I copy a large file, the gvfsd-dav process takes up Gigabytes of memory. Seems like it puts the whole file into memory!

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

It seems that this memory leak can be triggered by a bug in gnome-system-monitor which causes it to spam requests to gvfsd over dbus, see https://bugs.launchpad.net/ubuntu/+source/gnome-system-monitor/+bug/751523

Revision history for this message
Landis (landis) wrote :

thank you all, for telling us that gvfsd is part of fuse (fuseiso).
i didn't like how much cpu time gvfsd-metadata was using.
Also, i didn't find fuse of any use. i installed it trying to mount an iso as a dvd and it Didn't work for that.
i could already mount an iso as a directory (folder), so fuse was once again, useless.
i had problems with fuse in the past messing up my mount table and moving mounts out of order
( it would try and mount a drive in a folder before the drive that contained the folder was mounted... )
fuse sucked back then, it sucks now .
fuse / fuseiso / gvfsd-* is now gone and my memory / cpu usage is back to norm...

thanks again,
Landis.

Revision history for this message
Jakub Orlowski (jakub-o) wrote :

this problem occurred to me without having any flash device attached. however i have installed zRam.
it occurred when i was watiching a flash video stream.

Revision history for this message
Jakub Orlowski (jakub-o) wrote :

to be precise it was gvfsd-http using about 500+ MB RAM but diminished now to 5,7MB

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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