gvfs doesn't manage sftp and ftp backends properly

Bug #206267 reported by Savvas Radevic
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gvfs-backends

Ubuntu Hardy Heron 8.04 amd64 / x86_64
alpha / beta updated

Note: Everything below happens with ftp (with login) option as well.
Note 2: I think nautilus affects this bug as well. The weird thing about this bug is that it doesn't happen always, therefore I also think nautilus (or something) "caches" or stores the retrieved list of contents of the server folder. Use a new username or server to test this, because when I re-added the 'connect to server', the new window and the connection were ok if I visited previously browsed folders from previous connections, but when I went to a folder or a username that I haven't visited or used before, the window or the connection do not respond and the list of contents of the folder is not shown.
Note 3: As I stated in note 2, we have two situations, one with a greyed out unresponsive window and one with a responsive window (being able to close without "force quit") but with a mouse pointer as "waiting". From what I've tested, they're randomly produced with the steps I explain below.
Note 4: If I hit ctrl-L and enter sftp://<email address hidden>/home/user/ everything is normal, I can also unmount it normally. Only sporadically do I get an unresponsive greyed out window (see note 2). I have to kill the (two) processes related to the sftp connection in order to use it.
Note 5: In my opinion, something goes wrong while it tries to get the list of contents of a destination / folder.

I used 'connect to server' to connect to an sftp (SSH) connection.
Menu Places > Connect to Server
Type: SSH
Server: sftp.example.com
Port: (left blank)
Folder: /home/user
User name: user
Add bookmark: checked
Bookmark name: mysftp

When I hit the connect button, it pops up a new nautilus window, trying to browse the sftp. That's when the problems appear, and I end up with an unresponsive window, probably when it's trying to retrieve the folder's contents. Sometimes the window can be closed (although the mouse pointer is "waiting"), or I have to use the "force quit" option it gives me for nautilus, see note 3.
That very first new window that is automatically opened after hitting the connect button seems to mess up the whole connection.
I'm saying this because I killed the two processes related to this and connected through the sftp bookmark, which was created previously (using 'connect to server'). I used the menu Places > Bookmarks > user (the name of the bookmark), it opened a new window and I could browse my server with no problems. This success could be related to a cached list of contents, see note 2.

Some errors I come accross:
1) If I leave the window (with the mouse pointer as "waiting") open for several minutes, it eventually returns an error:
The folder contents could not be displayed.
Sorry, couldn't display all the contents of "user": DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

2) Trying to unmount using the side pane, I right click on the sftp virtual filesystem and select unmount. After some time I get an error saying this:
Unable to unmount sftp on example.com
DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

3) If I close the nautilus window and open a new one, then double click on the side pane to show the sftp:
Couldn't display "sftp://<email address hidden>/".
Error: DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
Please select another viewer and try again.

Connecting to the server looks ok from the command line:
$ sftp <email address hidden>
Connecting to example.com...
Password:
sftp> ls
[...]
sftp>

The connection is established as netstat outputs:
$ netstat -ep | grep ssh
tcp 0 0 ubuntu.local:43650 example.com:ssh ESTABLISHED user 151065 26425/ssh
$ ps ax | grep -i sftp
26421 ? S 0:00 /usr/lib/gvfs/gvfsd-sftp --spawner :1.3 /org/gtk/gvfs/exec_spaw/6
26425 pts/0 Ss+ 0:00 ssh -oForwardX11 no -oForwardAgent no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -l user -s example.com sftp

Revision history for this message
Savvas Radevic (medigeek) wrote :

Nothing in the /var/log/ logs, nothing that I could detect at least.
Except for this:
$ ps -ax | grep -i sftp
25721 ? S 0:00 /usr/lib/gvfs/gvfsd-sftp --spawner :1.3 /org/gtk/gvfs/exec_spaw/2
25725 pts/2 Ss+ 0:00 ssh -oForwardX11 no -oForwardAgent no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -l user -s example.com sftp

Revision history for this message
Savvas Radevic (medigeek) wrote :

I killed these two processes, that cleared up the mounted server.
I re-entered the info in 'connect to server', it does open a nautilus window upon hitting the 'connect' button (in the connect to server dialog), I get a "waiting" mouse pointer when I have my mouse over that window though.

The connection seems established:
$ netstat -ep | grep ssh
tcp 0 0 ubuntu.local:43650 example.com:ssh ESTABLISHED user 151065 26425/ssh
$ ps ax | grep -i sftp
26421 ? S 0:00 /usr/lib/gvfs/gvfsd-sftp --spawner :1.3 /org/gtk/gvfs/exec_spaw/6
26425 pts/0 Ss+ 0:00 ssh -oForwardX11 no -oForwardAgent no -oClearAllForwardings yes -oProtocol 2 -oNoHostAuthenticationForLocalhost yes -l user -s example.com sftp

Revision history for this message
Savvas Radevic (medigeek) wrote :

Finally, that open nautilus window resulted to an error:
The folder contents could not be displayed.
Sorry, couldn't display all the contents of "user": DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.

(Really sorry for the spam)

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

Thank you for your bug report. The description is confusing, could you describe easy steps to trigger the issue?

Changed in gvfs:
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Savvas Radevic (medigeek) wrote :

OK, I haven't rebooted yet, nor logged out, I don't know if it matters.
I erased my passwords from seahorse (password and encryption keys), to see if it's related to that.

I go to menu Places > Connect to Server
Type: SSH
Server: sftp.example.com
Port: (left blank)
Folder: /home/user
User name: user
Add bookmark: checked
Bookmark name: mysftp

A nautilus window opens to that sftp destination, but the window firstly tries to bring up the contents of the home folder, but eventually greys out and becomes inresponsive.
I'll try to log out later and check if that fixes it

Revision history for this message
Savvas Radevic (medigeek) wrote :

I've logged out and logged back in (also did sudo /etc/init.d/gdm restart) but it the problem is still there, even though netstat says it's an established connection, the window doesn't respond after some time.
FTP works though

Revision history for this message
Savvas Radevic (medigeek) wrote :

This seems connected to the http://bugs.launchpad.net/bugs/185756

Revision history for this message
nocrack (board-divers) wrote :

yes Savvas Radević, I've got the same problem but with cifs (as descibr on the topic that you mention)

Revision history for this message
Savvas Radevic (medigeek) wrote :

I fiddled around some more with ftp and sftp on the remote server I have access. It seems that the problems appear as soon as you mouse right click > unmount the remote location on the nautilus side pane

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

you mean that the umount command doesn't unmount the share at it should do?

Revision history for this message
Savvas Radevic (medigeek) wrote :

I'm using the sftp protocol. When you connect to a server using the 'connect to server' or nautilus (ctrl-l and put sftp://<email address hidden>), it adds a "link" in the side pane of nautilus, right below the "Network Servers". But as nocrack commented, it could be possible that some other protocols are affected as well. Anyway, back to my sftp problem :)

Now, scratch that last comment, it's not when I unmount through side pane. This happens only when I add it with 'connect to server'.
If I hit ctrl-L and enter sftp://<email address hidden>/home/user/ everything is normal, I can also unmount it normally.
I rebooted the machine, I removed and re-added once more through 'connect to server'.
When I hit connect, it pops up a new nautilus window, trying to browse the sftp. That's when the problems appear, and I end up with an unresponsive window, probably when it's trying to retrieve the folder's contents. Sometimes the unresponsive window can be closed (although the mouse pointer is "waiting"), or I have to use the "force quit" option it gives me for nautilus.

That very first new window that is automatically opened after hitting the connect button seems to mess up the whole connection.
I'm saying this because I killed the two processes related to this and connected through the sftp bookmark, which was created previously (using 'connect to server'). I used the menu Places > Bookmarks > user (the name of the bookmark), it opened a new window and I could browse my server with no problems.

I hope I am clear as to where the problem resides. It's a really weird situation. And I think nautilus affects this bug as well.

I also think nautilus (or something) "caches" or stores the retrieved list of contents of the server folder. Use a new username or server to test this, because when I re-added the 'connect to server', the new window and the connection were ok if I visited already browsed folders from previous connections, but when I went to a folder or a username that I haven't visited or used before, the window or the connection do not respond and the list of contents of the folder is not shown.

Revision history for this message
Favonia (favonia) wrote :

Same problem here (as Savvas Radević mentioned). Also, smb:// is broken in the same way.

description: updated
Revision history for this message
Christophe Sauthier (christophe.sauthier) wrote :

Facing, I think the same problem that it was evocated here...

Connecting my self on any ssh server using gvfs (and its sfrp) backend. I can log on the server, and "see" the remote directory but I cannot change directory ... Everytime I do that I have an error "DBus error org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken."

Restarting dbus do not fix it...

It was working great before the last update I think (I currently runs 0.2.1-1ubuntu1)

Revision history for this message
Savvas Radevic (medigeek) wrote :

Re-written the description, I believe now it's clear, reverting to confirmed, as other people are facing similar problems.

Changed in gvfs:
status: Incomplete → Confirmed
Revision history for this message
Sebastien Bacher (seb128) wrote :

could you try again using the new 0.2.2 version? it's supposed to fix a similar issue

Changed in gvfs:
status: Confirmed → Incomplete
Revision history for this message
Sebastien Bacher (seb128) wrote :

note that a clear description is a few clear points or a short text that you can quickly read and understand, not a one page text which makes you want to close the webbrowser before starting to read what is written

Revision history for this message
Savvas Radevic (medigeek) wrote :

It's really not my fault the backends do not provide a log about what's going on in the background. Or at least something "readable" I could upload :(
I would make it smaller, but just look at the 3 different errors and the 2 cases of the resulting window. I thought to better provide as much info as I can, in the case it can't be reproduced by all the default users. If it could be reproduced I'm sure you would've confirmed it by now.

I would like to be positive, this seems fixed, I've tried to reproduce it 3-4 times.
What was the similar bug?

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

the description of the upstream change is "* Fix race that caused a mount to hang for a client"

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

closing since you say it seems to be fixed, feel free to reopen if you get the issue again though

Changed in gvfs:
status: Incomplete → Fix Released
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.