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 731035 - Unclean shutdown in sftp backend
Unclean shutdown in sftp backend
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: sftp backend
1.21.x
Other Linux
: Normal minor
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2014-05-31 08:20 UTC by Ross Lagerwall
Modified: 2014-06-05 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sftp: Quit more cleanly on remote shutdown (3.25 KB, patch)
2014-05-31 08:27 UTC, Ross Lagerwall
committed Details | Review

Description Ross Lagerwall 2014-05-31 08:20:21 UTC
If the remote sftp server dies (i.e. using pkill sftp-server), the sftp backend correctly detects it and calls force_unmount but then proceeds with reading from the connection (since force_unmount doesn't quit immediately). This results in output like:
"""
** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not registered (g-io-error-quark, 16)
"""

before the sftp backend finally exits.
Comment 1 Ross Lagerwall 2014-05-31 08:27:37 UTC
Created attachment 277608 [details] [review]
sftp: Quit more cleanly on remote shutdown

Don't issue any operations after g_vfs_backend_force_unmount() is
called.

This prevents output like:
"""
forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)

forced_unregister_mount_callback

** (process:3348): WARNING **: Error unregistering mount: Mountpoint not
registered (g-io-error-quark, 16)
"""

when the remote sftp-server process quits unexpectedly.
Comment 2 Ondrej Holy 2014-06-05 11:45:58 UTC
Review of attachment 277608 [details] [review]:

Looks good, but the commit message could be shorter...
Comment 3 Ross Lagerwall 2014-06-05 20:26:41 UTC
(In reply to comment #2)
> Review of attachment 277608 [details] [review]:
> 
> Looks good, but the commit message could be shorter...

That's a good point :-)

Pushed to master as e103eba, with a shorter commit message. Thanks for the review!