GVFS Samba mounts time out after inactivity

Bug #1401917 reported by Samuel Seay
50
This bug affects 10 people
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Confirmed
High
Unassigned

Bug Description

In Ubuntu 14.04, gvfs version 1.20.1.-1ubuntu1, Samba mounts time out after a period of inactivity. I did some network traffic logging between gvfs and cifs as any samba mounts via cifs never time out.

I discovered that CIFS periodicly sends an SMB Echo Request packet to keep the socket connection open while GVFS fails to do this. As a result a file server may kill the inactive connection however the mount inside of the file browser stays around. As a result, attempts to access the disconnected share results in waiting for an error box to pop up just so it can be unmounted and remounted.

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
Yvan Masson (yvan-masson) wrote :

This is interesting to know that gvfs does not do this SMB Echo Request...
That is a pity, because gvfs is as simple as the "net use" command on Windows, and uses the Kerberos ticket, so it is a very interesting tool for companies trying to migrate to Ubuntu for desktops.

Currently, as a workaround, I did a small bash script that does exactly this (with the ls command) and which I run after user login :

#!/bin/bash
cd /run/user/$UID/gvfs/
while true
do
 for i in ./smb* ; do
  if [ -d "$i" ]; then
   ls $(basename "$i")/ &> /dev/null
  fi
 done
 sleep 120
done

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.

Changed in gvfs (Ubuntu):
importance: Undecided → High
Revision history for this message
Samuel Seay (lightningth) wrote :

I located bug #578139 in the upstream at gnome.org that appears to also be this issue. I reported on it the findings here and gave them this bug number just incase.

Revision history for this message
Samuel Seay (lightningth) wrote :

I didn't read through all of the comments, that bug had a comment on it noting this report. There is an even further upstream bug report #10615 at samba.org. That bug report is from 5/2014 so I'm not sure how to push it further along. Any input on anything I can do to help get this fixed is appreciated.

Revision history for this message
Michael (mk-uone) wrote :

Apparently this has been fixed upstream[1] in libsmbclient. Any chance we can get libsmbclient 4.1.12+ backported to Precise?

[1]
https://bugzilla.samba.org/show_bug.cgi?id=11079

Revision history for this message
Ian Abbott (ian-abbott) wrote :

The upstream bug mentioned by Michael in comment #6 was fixed in libsmbclient 4.1.18 and 4.2.1.

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.