GNOME Bugzilla – Bug 500538
the sftp method should properly handle sftp subprocess timeout
Last modified: 2018-08-17 13:48:56 UTC
Please describe the problem: The sftp module should restart a sftp subprocess, in a transparent way for the application, when it abnormally disappears (for example, when the connection closes on a timeout, or when the sftp process is killed). Patches follow. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 99872 [details] [review] gnome-vfs-2.20.1-sftp-timeout.patch this patch detects when the connection timeouts or when the subprocess is killed
Created attachment 99873 [details] [review] reconnect on connection eof error this patch forces a reconnection when the current connections state is GNOME_VFS_ERROR_EOF.
*** Bug 500539 has been marked as a duplicate of this bug. ***
Created attachment 101059 [details] [review] gnome-vfs-2.20.1-reconnect-on-io-error.patch (2) The old connection should be closed asap, not after the SFTP_CLOSE_TIMEOUT timeout.
Created attachment 101061 [details] [review] gnome-vfs-2.20.1-better-status-value-handling.patch A GnomeVFSResult status, that is the symptom of a problem with the sftp subprocess should be returned to the calling functions, so we have the possibility to detect problems, like the sftp-server unexpectedly dying on the remote host (this typically causes applications using the sftp method to start using 100% cpu, until the dangling connection is properly closed client-side, and re-opened). The set of patches proposed in bz #500307, #500533, and here allow me to have a working mail-notification applet, accessing remote mailboxes with sftp/gnomevfs.
gnome-vfs got deprecated in 2008. gnome-vfs is not under active development anymore and had its last code changes in 2011. Its codebase has been archived: https://gitlab.gnome.org/Archive/gnome-vfs/commits/master gio (in glib) and gvfs are its successors. See https://developer.gnome.org/gio/stable/ch33.html and https://people.gnome.org/~gicmo/gio-migration-guide/ for porting info. Closing this report as WONTFIX as part of Bugzilla Housekeeping to reflect reality. Feel free to open a task in GNOME Gitlab if the issue described in this task still applies to a recent + supported version of glib/gio/gvfs. Thanks!