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 649041 - Cancelling file transfer from ssh location leads to disconnect.
Cancelling file transfer from ssh location leads to disconnect.
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: sftp backend
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Tomas Bzatek
gvfs-maint
: 651678 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-30 18:02 UTC by Michael Bleier
Modified: 2011-08-29 14:13 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael Bleier 2011-04-30 18:02:21 UTC
If you copy a file from a ssh location, the whole connection is severed if the transfer is cancelled in the File Operations window. This might be also an issue of the underlying gvfs.
Comment 1 Cosimo Cecchi 2011-05-23 15:06:01 UTC
Yeah, this is a GVfs bug; I can reproduce it 100% here with SSH, but doesn't happen e.g. with FTP.
Comment 2 Tomas Bzatek 2011-08-24 13:51:18 UTC
Just came across of this, looks like a broken pipe to the sftp tunnel we made.

Program received signal SIGPIPE, Broken pipe.
0x00000038c6a0e53d in write () at ../sysdeps/unix/syscall-template.S:82
82	T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
(gdb) t a a bt

Thread 1 (Thread 0x7ffff7db07c0 (LWP 11413))

  • #0 write
    at ../sysdeps/unix/syscall-template.S line 82
  • #1 write_async_cb
    at gunixoutputstream.c line 442
  • #2 g_main_dispatch
    at gmain.c line 2439
  • #3 g_main_context_dispatch
    at gmain.c line 3008
  • #4 g_main_context_iterate
    at gmain.c line 3086
  • #5 g_main_loop_run
    at gmain.c line 3294
  • #6 daemon_main
    at daemon-main.c line 295
  • #7 main
    at daemon-main-generic.c line 39

Comment 3 Tomas Bzatek 2011-08-26 16:56:17 UTC
Looks like simply ignoring the SIGPIPE signal did the trick, however it's an intrusive change and I have no idea what else it breaks. More testing on Monday...
Comment 4 Tomas Bzatek 2011-08-29 12:54:38 UTC
commit 9dcde52c3e6b8164180cfe8a60896b6d5e1e8c97
Author: Tomas Bzatek <tbzatek@redhat.com>
Date:   Mon Aug 29 14:50:50 2011 +0200

    Ignore SIGPIPE signals to avoid process termination on cancelled transfer
    
    That way we would be able to properly get EPIPE when trying to write to
    a socket or pipe whose far end has been closed. This happens e.g. on
    file copy cancellation. Glib does similar thing on GSocket initialization.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=649041
Comment 5 Tomas Bzatek 2011-08-29 14:13:45 UTC
*** Bug 651678 has been marked as a duplicate of this bug. ***