gvfsd-smb: very high CPU utilisation

Bug #1409032 reported by Ken Sharp
326
This bug affects 74 people
Affects Status Importance Assigned to Milestone
samba
Unknown
Unknown
gvfs (Fedora)
Won't Fix
Undecided
gvfs (Ubuntu)
Invalid
High
Unassigned
samba (Ubuntu)
Fix Released
High
Unassigned

Bug Description

Example:

I use Virtualbox and mount a .vdi on an SMB server. Using gvfsd-smb (browsing within Gnome to find the share), gvfsd-smb uses up to 50% CPU which slows down the entire system when accessing the network share. Mounting using sudo ($ sudo mount -t smbfs -o guest,nounix,noperm //server/share /media/share) so that cifs is used uses around 8% CPU. The difference is dramatic!

If I didn't have sudo access my machine would grind to a halt when trying to use the remote share.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: gvfs-backends 1.12.1-0ubuntu1.2
ProcVersionSignature: Ubuntu 3.11.0-26.45~precise1-generic 3.11.10.12
Uname: Linux 3.11.0-26-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.8
Architecture: i386
Date: Fri Jan 9 14:32:20 2015
MarkForUpload: True
ProcEnviron:
 LANGUAGE=en_GB:en
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_GB.UTF-8
 SHELL=/bin/bash
SourcePackage: gvfs
UpgradeStatus: Upgraded to precise on 2014-12-07 (33 days ago)

Revision history for this message
Ken Sharp (kennybobs) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gvfs (Ubuntu):
status: New → Confirmed
Revision history for this message
Martin Weis (martin-weis-newsadress) wrote :

This affects me without using a virtual machine.
There are other bugs about excessive CPU usage,. which might be related:
#369194
#1404765

Similar other bugs were filed against other protocol types (dav, http, ssh, sftp, fuse), so these issues might be related, e.g.
#1401351
#1174663
#1404765
#1059332
#880637

How to debug this?

Ken Sharp (kennybobs)
tags: added: performance
Revision history for this message
Steven Harms (sharms) wrote :

Confirmed for 16.04 Beta and here is the Red Hat bug: https://bugzilla.redhat.com/show_bug.cgi?id=1303300

Revision history for this message
Ron (ramayer+ubuntu) wrote :

Confirmed for 16.04 Beta 2 as well.

Revision history for this message
Peter J McDade (rocket859) wrote :

Confirmed for 16.04 Beta 2 as well here.

Revision history for this message
Chris J Arges (arges) wrote :

Just did a fresh ISO install of xenial and discovered this same issue. 'killall gvfsd-smb-browse' temporarily solved my issue.

Changed in gvfs (Ubuntu):
importance: Undecided → High
Revision history for this message
AndreK (andre-k) wrote :

i just need to log on and open nautilus to make it start on 16.04

Revision history for this message
qu9542 (quhaiyan-rs) wrote :

same issue on Ubuntu 16.04.

[How to duplicate]
[1] Restart Ubuntu 16.04
[2] Launch Nautilus
[3] Open System Monitor, and gvfsd-smb-browse will use one of the CPU core 100%, and will stay at 100% for 5~6 minutes. After 5~6 minutes, gvfsd-smb-browse will stop consuming CPU. I would rather kill gvfsd-smb-browse instead of waiting for 5~6 minutes.

Revision history for this message
rattskjelke (rattskjelke) wrote :

This has never happened before until I installed Xubuntu 16.04 recently.
gvfsd-smb-browse uses 100% CPU until I kill it.
I don't know how to determine what causes it.
I thought it might have been other software I installed or maybe I broke something so I did a fresh install again and it still happens.

Revision history for this message
Mike (ceratoph) wrote :

Same here as with with Mr. rattskjelke above: I never had any reason to notice gvfsd-smb-browse until I upgraded to 16.04 and noticed my laptop's fans spinning and this stupid process at the top of the list.

Searching with google or DDG for "gvfsd-smb-browse high CPU" reveals that this problem has appeared in the past ( way back in 2010!) and it is not clear what resolved it or whether the user simply became frustrated and stopped using samba or even all of Ubuntu.

At first I tried to uninstall the package that contains it (gvfs-backends) but that would probably break software-center, and other things i want:

-------------------------------------------------------
sudo apt-get remove gvfs-backends
.
.
.
The following packages were automatically installed and are no longer required:
  oneconf oneconf-common python-cups python-debtagshw python-oneconf
  python-piston-mini-client python-xapian python3-oneconf
  python3-piston-mini-client software-center-aptdaemon-plugins
-------------------------------------------------------

I do not use samba (It's just another half-arsed Microsoft network protocol, designed to not work right on other platforms to compel you to use Windows) or care about it so I did the following:

-------------------------------------------------------
sudo mv /usr/lib/gvfs/gvfsd-smb-browse /usr/lib/gvfs/gvfsd-smb-browse.disabled
-------------------------------------------------------

Revision history for this message
bluefox64 (bluefox64) wrote :

The same thing for me ...

This has never happened before until I upgraded ubuntu-mate 15.10 to ubuntu-mate 16.04 yesterday on two desktop pc. Same things on the two PC

gvfsd-smb-browse uses 100% CPU until I kill it. Try to access my NAS whith a Samba server (files open on the process)

Bizarre...

Revision history for this message
bluefox64 (bluefox64) wrote :

bluefox@lenovo:~$ dpkg-query -W -f='${Package} ${Version} ${Source} ${Status}\n' | grep samba
libsmbclient 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
libwbclient0 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
python-samba 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
samba 2:4.3.8+dfsg-0ubuntu1 install ok installed
samba-common 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
samba-common-bin 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
samba-libs 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
smbclient 2:4.3.8+dfsg-0ubuntu1 samba install ok installed
system-config-samba 1.2.63-0ubuntu6 install ok installed
vlc-plugin-samba 3.0.0~~git20160413+r64193+39~ubuntu16.04.1 vlc install ok installed

Revision history for this message
Alex Perez (aperez-6) wrote :

I am also experiencing this issue, on Ubuntu 16.04. gvfsd-smb-browse uses 100% CPU until I kill it.

Revision history for this message
bluefox64 (bluefox64) wrote :

Here are what I found on my 2 PC machines. (sorry for my poor English)

To find the local machines on my lan I have edited the /etc/hosts file to add the IP (fixe) of the PC on the network whith alias (ex: 127.0.0.1 localhost 192.0.168.0.10 server, etc...) and my IP NAS.
When I remove the IP of the NAS (whith a Samba & upnp server) ALL BECAME FINE !!!

Check your hosts file. Also search what HOST gvfsd-smb-browse try to connect. (pocessus view open files)
Good luck
FL

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. The issue you are reporting is an upstream one and it would be nice if somebody having it could send the bug to the developers of the software by following the instructions at https://wiki.ubuntu.com/Bugs/Upstream/GNOME. If you have done so, please tell us the number of the upstream bug (or the link), so we can add a bugwatch that will inform us about its status. Thanks in advance.

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

In fact the Redhat bug suggests it's likely a samba issue...

Changed in samba (Ubuntu):
importance: Undecided → High
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in samba (Ubuntu):
status: New → Confirmed
Revision history for this message
Ismail Gjevori (isgjevori) wrote :

This happens to me also but only the first time i open nautilus after logging in AND if the wi-fi is on. If i disconnect and after i open nautilus i DON'T encounter this bug.

Revision history for this message
Paul Eggert (eggert-gnu) wrote :

This happened to me too, I think just after I started up Rhythmbox on my 16.04 desktop. I don't use Windows shares. It's pretty annoying.

Revision history for this message
sibe39 (sibe39) wrote : Re: [Bug 1409032] Re: gvfsd-smb: very high CPU utilisation

bug is resolved, this "IPV6" who overloading cpu.

2016-05-07 22:59 GMT+02:00 Paul Eggert <email address hidden>:

> This happened to me too, I think just after I started up Rhythmbox on my
> 16.04 desktop. I don't use Windows shares. It's pretty annoying.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (1556665).
> https://bugs.launchpad.net/bugs/1409032
>
> Title:
> gvfsd-smb: very high CPU utilisation
>
> Status in gvfs package in Ubuntu:
> Confirmed
> Status in samba package in Ubuntu:
> Confirmed
> Status in samba package in Fedora:
> Unknown
>
> Bug description:
> Example:
>
> I use Virtualbox and mount a .vdi on an SMB server. Using gvfsd-smb
> (browsing within Gnome to find the share), gvfsd-smb uses up to 50%
> CPU which slows down the entire system when accessing the network
> share. Mounting using sudo ($ sudo mount -t smbfs -o
> guest,nounix,noperm //server/share /media/share) so that cifs is used
> uses around 8% CPU. The difference is dramatic!
>
> If I didn't have sudo access my machine would grind to a halt when
> trying to use the remote share.
>
> ProblemType: Bug
> DistroRelease: Ubuntu 12.04
> Package: gvfs-backends 1.12.1-0ubuntu1.2
> ProcVersionSignature: Ubuntu 3.11.0-26.45~precise1-generic 3.11.10.12
> Uname: Linux 3.11.0-26-generic i686
> NonfreeKernelModules: nvidia
> ApportVersion: 2.0.1-0ubuntu17.8
> Architecture: i386
> Date: Fri Jan 9 14:32:20 2015
> MarkForUpload: True
> ProcEnviron:
> LANGUAGE=en_GB:en
> TERM=xterm
> PATH=(custom, no user)
> LANG=en_GB.UTF-8
> SHELL=/bin/bash
> SourcePackage: gvfs
> UpgradeStatus: Upgraded to precise on 2014-12-07 (33 days ago)
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1409032/+subscriptions
>

Revision history for this message
Nick W (nickinhelena) wrote :

I used the terminal to back up the gvfsd-smb-browse, then removed it. I think I do not use this file for anything. It looks like the system is still running fine as far as I can see. The CPU has a normal load after boot up...

Revision history for this message
David Chatterton (dmchatterton) wrote :

I have found this bug on several computers running Ubuntu 16.04 and Raspberry Pi 2s and a 3 running Ubuntu MATE 16.04. With a quad core CPU, gvsfd-smb-browse seems to consume 100% of one of the cores.

On a Dell XPS13 laptop, this causes the cooling fan to come on. On the Raspberry Pi 2 and 3, it uses up excessive CPU resources preventing some processor-intensive apps from running properly and contributing to the CPU temperature rise.

The solution that I have used is to remove the execute permission from the file as follows - execute from the terminal: sudo chmod 744 /usr/lib/gvfs/gvfsd-smb-browse

This seems to prevent the rogue file from running and appears to have no detrimental affect on the running of the operating systems.

Perhaps we can have a permanent solution implemented in the next Xenial software upgrade.

Revision history for this message
Greg (ernestg541) wrote :

I had this particular problem with one of my processor cores topping out at 100%, and I was not using samba. Found under process management and killed it. Happened so far only once so far may just uninstall samba since I don't use it. My computer is a HP Envy Phoenix 810 series. Thanks for your time.

Revision history for this message
ryan (rpgarrison) wrote :

Ubuntu 16.04. gvfsd-smb-browse uses 100% CPU until I kill it.

Revision history for this message
John Kreis (johnnykilo) wrote :

I have noticed this issue as well. Once I kill gvfsd-smb-browse python2 kicks in and goes up to 100%. My system has been completely unstable and just shutting with no message. The best hunch I have so far is a power issue possibly related to this

Revision history for this message
GizmoChicken (gizmochicken) wrote :

I had this issue (nearly 100% CPU use by gvfsd-smb-browse) on a laptop that is running Ubuntu 16.04.

In my case, removing the package "gvfs-backends" (which is needed for Samba and other things) is a workaround for the CPU usage issue. I don't use Samba on this laptop, and at least so far, I haven't noticed any other ill effects. Your mileage may vary.

Revision history for this message
Brett Bogert (bbogert24) wrote :

I am also having this problem on multiple machines. Every time I hear the
fans running on high (except when I am remastering) its due to this bug.

I am running 16.04 64bit with Unity desktop.

Just wanted to add myself to the list of those seeing the problem.

Revision history for this message
Brett Bogert (bbogert24) wrote :

After not be satisfied with any of the above workarounds to the problem
I decided to take a look at the problem and see if I could come up with
a "cleaner" workaround or fix.

I found that this problem occurs in Ubuntu 16.04 with Unity Gnome 3.18
GnomeShell Gnome 3.20, Budgie Gnome 3.18 and Fedora 24 Beta.

After some troubleshooting I found the following solution that does
not require changing executable permissions or removing packages:

1- Make a backup copy of the smb.conf file in /etc/samba.

2- Edit the /etc/samba/smb.conf file using your favorite editor
and add the following line under the "[global]" statement:

name resolve order = wins lmhosts bcast

The file should look like this:

[global]
name resolve order = wins lmhosts bcast

3- Save the file and reboot.

The problem should be fixed and you should notice that the
"Network" Icon and label shows up much quicker in your
file browser than before and the 100% CPU usage is gone.

Hope this helps.

Revision history for this message
Jimmy Pan (dspjmr) wrote :

Really annoying bug, I have to remove the exec file of gvfsd-smb-browse

Revision history for this message
Nick W (nickinhelena) wrote :

Can anyone briefly state what gvfsd-smb-browse does? I know samba is used to connect to Windows networks. Perhaps clarity on this would help people decide weather to keep, remove, or find a work-around to it.

Revision history for this message
Ismail Gjevori (isgjevori) wrote :

The output of sudo strace -T -p {pid} is:
restart_syscall(<... resuming interrupted poll ...>)
when it use 100% CPU. Hope this can help.

Revision history for this message
cogset (jackfog66) wrote :

I think I may have the same issue in Trusty, possibly even worse: the gvfsd-smb process would randomly start and totally max out the CPU for no apparent reason - the thing is, not only I don't use samba at all, I have actually *purged* all samba packages from this system.

I really can't see how this process, which should be spawned by samba, should even start at all (let alone load the CPU to its max) when samba isn't even installed any more in my system.

This being an old laptop which easily overheats, after getting nowhere trying to figure out why gvfsd-smb does this, I've resolved to remove the executable bit from gvfsd-smb and gvfsd-dnssd (which also starts for no apparent reason) and finally got rid of this big issue.

But nonetheless I believe that such an annoying (and potentially harmful) long-standing bug should be properly investigated and fixed once and for all.

Revision history for this message
Said Akkas (saidakkas) wrote :

I don't have any smb.conf, just installed Ubuntu 16.04 as main and only OS of my laptop, there is no Windows filesystem on my computer or on network.

I noticed this process will work on and off, utilizing %100 of 2 CPU cores.

Any harm in removing this package or making it not-executable?

Revision history for this message
jowfdoijdfdwfwdf (dsfkljo322332) wrote :

How come this high impact bug stays open for 1.5 years and still unassigned?

Revision history for this message
Peter (imfromhell777) wrote :

Currently having the same issue with gvfsd-smb-browse on my Mid-2012 Macbook Pro. While a fix comes out, can someone point me in the direction on how to uninstall it?

Revision history for this message
Rashkae (rashkae) wrote :

As well as removing hosts lookup in the smb.conf file (#29) you can also prevent this behaviour by installing the libnss-winbind package and adding wins to the hosts line in /etc/nsswitch.conf

Ex:

hosts: files wins mdns4_minimal [NOTFOUND=return] dns

That should allow samba to find all the hosts it sees in broadcasts, without sending the lookup to the broken dns server(s).

Alternatively, you an modify your search domain so you don't inherit an internet domain from the router.

Revision history for this message
Francois Thirioux (fthx) wrote :

I use Ub. Gnome 16.04. If I use lightdm, the bug happens (one thread, gvfs-smb-browse using 100 % of a virtual CPU) when I open Nautilus. I switched back to gdm (NB : gdm is not working with Nvidia proprietary drivers...) (!!!) and I do not see this high CPU usage.

Revision history for this message
pureblood (freeseek) wrote :

I have noticed the same problem for the first time today at work (so no commercial USA ISP).

I tried to strace the process to see what it does:
sudo strace -T -p 13921
strace: Process 13921 attached
restart_syscall(<... resuming interrupted poll ...>
But I got no insight.

no longer affects: samba (Fedora)
Revision history for this message
Gary Turnbull (gaturnb) wrote :

Using Ubuntu 16.04. Issue effects me as well.

I implemented the suggestions in post #29 and #37.

When I open Files, gvfsd-smb-browse maxes out one core at 100% for about 10 minutes.

Revision history for this message
Lou (lou-gregory42) wrote :

Just upgraded one of my machines to Xubuntu 16.04 and encountered this bug. The info in post #29 solved it for me but I will be waiting for an official fix before upgrading my other machine. Inconceivable that this is unassigned after 18 months.

Revision history for this message
ironstorm (ironstorm-gmail) wrote :

This f-ing bug literally melts my old laptop causing it to thermal shutdown. Would be nice if we could get an proper f-ing fix released.

Revision history for this message
Lou (lou-gregory42) wrote :

Bugzilla/Gnome has an outstanding bug (#549463) from 2008(?!) that sounds the same but I wonder why (for me at least) this did not exist in 14.04 and is suddenly turning up in 16.04. At first I thought it might be due to the deprecated version of Nautilus in 16.04 but the same problem shows up in Gigolo and the common denominator seems to be gvfs.

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

there was another bug opened upstream yesterday with a patch
https://attachments.samba.org/attachment.cgi?id=12311

I'm going to have a look at backporting that one

Changed in gvfs (Ubuntu):
status: Confirmed → Invalid
Changed in samba (Ubuntu):
status: Confirmed → In Progress
Revision history for this message
Sebastien Bacher (seb128) wrote :

https://launchpad.net/ubuntu/+source/samba/2:4.4.5+dfsg-2ubuntu3

samba (2:4.4.5+dfsg-2ubuntu3) yakkety; urgency=medium

  * debian/patches/git_smbclient_cpu.patch:
    - backport upstream patch to fix smbclient users hanging/eating cpu on
      trying to contact a machine which is not there (lp: #1572260)

the SRU for xenial is coming next

Changed in samba (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
cogset (jackfog66) wrote :

Does the fact that I see this behavior in *Trusty* (see comment [url=https://bugs.launchpad.net/ubuntu/+source/gvfs/+bug/1409032/comments/33]33[/url] mean that I'm experiencing this same bug, or is it another issue altogether for which I should open a separate bug?

Please notice that (as stated in comment 33) I've actually purged all samba packages from this system, the only things left behind are some samba libraries, and yet the gvfsd-dnssd process would randomly start for no reason that I can thin kof and load the CPU to the max.

Revision history for this message
AnonymouseP (anonymouse.p) wrote :

This is fixed for me with the update as reported in bug #1572260

Revision history for this message
Lou (lou-gregory42) wrote :

If this is fixed at some point it needs to find its way to Trusty as well - not just Xenial.

Revision history for this message
Lou (lou-gregory42) wrote :

Addendum to post #48
After installing Xenial dist upgrade a few eeks ago the number of bugs caused me to reinstall Trusty 14.04.4 from cd. Although this gvfs problem did not exist in my original 14.04 system (installed in 2013) it cropped up in my new install - Nautilus could not find my NAS and the fan began to run at high speed. Applying the fix from post #29 followed by reboot fixed the problem immediately. I do not have Samba installed on this computer so it does seem to ba a gvfs problem.

Revision history for this message
Gabriel Staples (ercaguy) wrote :

I've noticed that this problem of gvfsd-smb taking up 50% of my CPU (100% of 1 of 2 cores) only exists if I am not logged in to a Windows share first via the terminal. In other words, I have Windows shares I like to access with my Linux computer running Xubuntu 16.04. If I open nemo (my main file manager I like) and click on "Network" on the left-hand side, then click on my Windows computer name ("Gabriel-Toshiba" in my case), gvfsd-smb locks up my CPU.

*However,* if I *first* mount one of my windows shares via the terminal with this command:

"sudo mount -t cifs //192.168.0.106/dev /home/gabriel/mnt/test -o username=gabriel,uid=gabriel,gid=gabriel"

and *then* navigate through my network via nemo, it works fine (I am able to actually navigate into my network shares, including others I did *not* mount), and it does NOT take up 100% of one of my CPUs!

So, that's my work-around for now: use the terminal to mount a share before trying to click around the Network in a file manager.

Revision history for this message
Gabriel Staples (ercaguy) wrote :

Update: after a while I got the problem again, so I implemented the fixes in Comments #29 and #37. WE'll see if this helps.

Changed in gvfs (Fedora):
importance: Unknown → Undecided
status: Unknown → Won't Fix
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.