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 549298 - impossible to copy files with p (pipe) flag
impossible to copy files with p (pipe) flag
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: gio
2.19.x
Other All
: Normal blocker
: ---
Assigned To: gvfs-maint
gvfs-maint
: 572828 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-08-25 13:27 UTC by Sergio Zanchetta
Modified: 2009-04-02 08:39 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Fail to copy special files. (950 bytes, patch)
2009-02-18 18:08 UTC, Andreas Henriksson
none Details | Review
fail/skip copying special files (rev 2) (2.03 KB, patch)
2009-02-19 14:03 UTC, Andreas Henriksson
none Details | Review
fail/skip copying special files (rev 3) (2.05 KB, patch)
2009-02-19 15:20 UTC, Andreas Henriksson
none Details | Review

Description Sergio Zanchetta 2008-08-25 13:27:02 UTC
Please describe the problem:
In Hardy updated when I try to copy type p (pipe) files to another directory, the copy window get stuck not copying anything and I can't close it, even from gvfs copy applet. I can only kill it, and this restart nautilus.

As a real example, there are 2 files in my .gcjwebplugin folder in my home, gcj-instance-6501-1-appletviewer-to-plugin and gcj-instance-6501-1-plugin-to-appletviewer (type p files), trying to copy them (moving them works instead) to another directory expose the bug.


Steps to reproduce:
1. Get a type p (pipe) file (gcj-instance-6501-1-appletviewer-to-plugin and gcj-instance-6501-1-plugin-to-appletviewer found in .gcjwebplugin folder for example)
2. Try to copy it/them to another folder or to an external usb disk for example.


Actual results:
the copy window get stuck not copying anything and you can't close it, even from gvfs copy applet. You can only kill it using the kill applet for example , but this restart nautilus.


Expected results:


Does this happen every time?
Yes.

Other information:
This is a critical problem because it prevents home folder to being copied as a whole (to backup it for example) to an external usb disk.
It starts to copy files, and then, at a certain point, copy window get stuck, and you can't understand why.
Comment 1 Sergio Zanchetta 2008-08-25 13:36:49 UTC
This bug was originally opened on

https://bugs.launchpad.net/gvfs/+bug/259505
Comment 2 Andreas Henriksson 2009-02-18 18:06:58 UTC
This likely happens because gio opens the (pipe) file and when reading from it we never get anything (or reach EOF for that matter). When copying local files, which seems to be the case you are describing, gvfs isn't involved AFAIK so it's a glib/gio bug (but similar bugs could exist in each gvfs backend ofcourse).

Another way to reproduce:
mkfifo testpipe
gvfs-copy testpipe foobar
^c
rm testpipe


On a related note, when copying a device node file the contents is copied which is probably never what anyone wants...

I think we should just fail to copy all special files for now, until someone figures out what copy should mean for each type.

Comment 3 Andreas Henriksson 2009-02-18 18:08:20 UTC
Created attachment 129006 [details] [review]
Fail to copy special files.
Comment 4 Andreas Henriksson 2009-02-18 18:26:21 UTC
Oh, the error message should probably be marked for translation.... 
Comment 5 Andreas Henriksson 2009-02-19 14:03:03 UTC
Created attachment 129062 [details] [review]
fail/skip copying special files (rev 2)

Updated patch according to alex_ comments. Readjust to only query a single time.
Querying the symlink target for all files (even non-symlinks) is no real overhead.
Comment 6 Andreas Henriksson 2009-02-19 15:20:38 UTC
Created attachment 129070 [details] [review]
fail/skip copying special files (rev 3)

Slight adjustment according to alex_ comments.
Comment 7 Alexander Larsson 2009-02-19 15:26:43 UTC
commited.
Comment 8 Sergio Zanchetta 2009-03-02 10:32:05 UTC
Changing the package affected, according to bug report.
Comment 9 Bernhard Koenig 2009-04-02 01:04:33 UTC
*** Bug 572828 has been marked as a duplicate of this bug. ***
Comment 10 Bernhard Koenig 2009-04-02 01:09:39 UTC
Did you also fix the issue in http://bugzilla.gnome.org/show_bug.cgi?id=533917 ?

There was a problem with looking at the "Properties" of a pipe file and I guess it is the same issue as this bug here. Bug #533917 should be fixed in a similar way, I guess.
Comment 11 Cosimo Cecchi 2009-04-02 08:39:13 UTC
*** Bug 533917 has been marked as a duplicate of this bug. ***