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 702385 - Nautilus re-connects to SSH / SFTP server bookmark mounts when you click the unmount button
Nautilus re-connects to SSH / SFTP server bookmark mounts when you click the ...
Status: RESOLVED OBSOLETE
Product: nautilus
Classification: Core
Component: Sidebar
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-06-16 12:12 UTC by javiermon
Modified: 2013-11-29 22:08 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description javiermon 2013-06-16 12:12:57 UTC
Hi

Using fedora 19, amd64. 

When I access a ssh server and then click the unmount button in nautilus, it re-connects to the server. If I need to enter credentials then a dialog asking for password shows up, if the credentials are stored (for example if accesing via pubkey) then the remote server is mounted. This happens all the time.

The expected result should be that the remote server is unmounted.

yum info nautilus
Complementos cargados:langpacks, refresh-packagekit, remove-with-leaves
Paquetes instalados
Nombre        : nautilus
Arquitectura        : x86_64
Versión     : 3.8.1
Lanzamiento     : 1.fc19
Tamaño        : 13 M
Repositorio        : installed
Desde el repositorio   : koji-override-0
Resumen     : File manager for GNOME
URL         : http://projects.gnome.org/nautilus/
Licencia     : GPLv2+
Descripción :Nautilus is the file manager and graphical shell for the GNOME
           : desktop that makes it easy to manage your files and the rest of
           : your system. It allows to browse directories on local and remote
           : filesystems, preview files and launch applications associated with
           : them. It is also responsible for handling the icons on the GNOME
           : desktop.
Comment 1 Jean-François Fortin Tam 2013-07-10 04:41:54 UTC
I'm seeing this problem too.

I haven't quite figured out what triggers this exactly, but I have two suspicions, because it happens especially when I try to "unmounting" one of the two bookmarks I have on a server of mine. It keeps reappearing, needing to be unmounted twice.

So I'm wondering if it is:
- Something to do with the state of the sidebar's scrollbar (my initial thought)...

- Something to do with the fact that there are two bookmarks on different locations of the same server. Are you in the same situation as me?
Comment 2 Jean-François Fortin Tam 2013-07-17 03:12:08 UTC
Ah, I noticed something interesting just now. Let's say I have my local ~/Downloads folder (the xdg downloads dir) in the sidebar, and a bookmark to a sftp remote (named "foo").

If you click foo, it mounts the remote (so it appears at the bottom).

If you click to go to another local folder (such as ~/Downloads) and then try to directly click the unmount icon for "foo", you'll never be able to unmount it as it will be remounted everytime. However, if you click foo to enter that directory before clicking the unmount icon, unmounting will work properly.

Seems like something is not handling click targets correctly here.
Comment 3 António Fernandes 2013-07-17 06:03:43 UTC
(In reply to comment #2)
> Seems like something is not handling click targets correctly here.

It remind me of bug 699183. Does the patch commited for that bug fix this one?
Comment 4 Philip Langdale 2013-11-24 18:11:01 UTC
This applies to all mounted backends, I think. I've been trying to fix some crash on exit scenarios in the gvfs-mtp backend, and I see that Nautilus will often issue a query_info request after the unmount. This originally led to the crash, but now it leads to either a successful remount or a Nautilus error. I haven't found a way to make Nautilus silently accept that the operation failed either.
Comment 5 Michał Sawicz 2013-11-25 22:12:45 UTC
I'm getting this here, too.

It feels like this is caused by the fact that bookmarks are duplicated in network mounts, if matching.

Unmounting is only possible under Network, but nautilus re-selects the bookmark after unmounting the entry and goes into a race - sometimes it will remount, sometimes error out.

A simple fix from user-experience PoV would be to not display a separate entry under Networks, but just display the icon next to the bookmark entry, so it would behave more like other mounts.
Comment 6 Philip Langdale 2013-11-29 17:56:51 UTC
I did some digging and I can confirm it's related to unmounting from the button in the sidebar. If you unmount some other way (such as right clicking on the device in the location bar and choosing unmount) then no inappropriate operations are triggered on the device.

I believe this is the relevant backtrace:

  • #0 g_file_query_info_async
    at /build/buildd/glib2.0-2.38.1/./gio/gfile.c line 1242
  • #1 file_info_start
    at nautilus-directory-async.c line 3453
  • #2 start_or_stop_io
    at nautilus-directory-async.c line 4464
  • #3 nautilus_directory_async_state_changed
    at nautilus-directory-async.c line 4530
  • #4 nautilus_file_invalidate_attributes
  • #5 nautilus_file_invalidate_count_and_mime_list
    at nautilus-directory-async.c line 2165
  • #6 nautilus_directory_invalidate_count_and_mime_list
    at nautilus-directory-async.c line 2182
  • #7 nautilus_directory_force_reload_internal
  • #8 begin_location_change
    at nautilus-window-slot.c line 940
  • #9 nautilus_window_slot_open_location_full
  • #10 open_selected_uri
  • #11 open_selected_bookmark
  • #12 open_selected_bookmark
  • #13 bookmarks_row_activated_cb
    at nautilus-places-sidebar.c line 2933

It occurs twice for two file locations:

(gdb) p *((*file)->details)
$10 = {directory = 0x143b5c0, name = 0x18e2d04 "usb:005,002 (mtp)", type = G_FILE_TYPE_DIRECTORY, 
  display_name = 0x1544fe4 "Unnamed Device", 

(gdb) p *((*file)->details)
$11 = {directory = 0x143b5c0, name = 0x18a9d74 "Internal storage", type = G_FILE_TYPE_DIRECTORY, 
  display_name = 0x18a9d74 "Internal storage", 

I believe the first location is fine, as that gets handled inside nautilus but the second one is dispatched to the backend, leading to the errors.

Obviously, we should not be seeing #11 bookmarks_row_activated_cb -> #10 open_selected_bookmark occurring when that unmount button is clicked.
Comment 7 Philip Langdale 2013-11-29 18:07:27 UTC
Further note - this only applies to Nautilus 3.8 where there is still the custom sidebar. In 3.9/10, we've got the GtkPlacesSidebar which may not may not be buggy.

With respect to 3.8, I notice:

static void
bookmarks_row_activated_cb (GtkWidget *widget,
                            GtkTreePath *path,
                            GtkTreeViewColumn *column,
                            NautilusPlacesSidebar *sidebar)
{
        GtkTreeIter iter;
        GtkTreePath *clicked_path = NULL;
        GtkTreeModel *model = gtk_tree_view_get_model (GTK_TREE_VIEW (widget));

        if (!gtk_tree_model_get_iter (model, &iter, path)) {
                return;
        }

        if (!clicked_eject_button (sidebar, &clicked_path)) {
                open_selected_bookmark (sidebar, model, &iter, 0);
        } else {
                gtk_tree_path_free (clicked_path);
        }
}

So it does attempt to avoid this problem, but that clicked_eject_button() test clearly isn't working.

Will update with more details on that.
Comment 8 Philip Langdale 2013-11-29 18:27:03 UTC
*doh*.

Now it all makes sense. The fix for the sidebar activation was made *after* 3.8.2 was released and there's never been a 3.8.3. So that's what's going on here. So I suspect everything is actually fine if your build is new enough and 3.9/10 should be fine too.
Comment 9 Jean-François Fortin Tam 2013-11-29 21:26:44 UTC
Yes, in 3.8 the workaround of right-clicking to unmount does the trick, and the actual fix never made it into a 3.8.3 release.

3.10 is not affected by this bug. I'm tempted to say it could be marked resolved fixed then...
Comment 10 António Fernandes 2013-11-29 22:08:46 UTC
Marking as resolved as per comment 9.

Please feel free to reopen this bug if the problem still occurs with a newer version of GNOME (3.10 or later).