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 784770 - Nautilus hang on duplicating file on samba share
Nautilus hang on duplicating file on samba share
Status: RESOLVED OBSOLETE
Product: gvfs
Classification: Core
Component: smb backend
1.32.x
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2017-07-10 22:42 UTC by Chris Murphy
Modified: 2018-01-03 16:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
client smb.conf (735 bytes, text/plain)
2017-07-10 22:49 UTC, Chris Murphy
Details
server smb.conf (12.24 KB, text/plain)
2017-07-10 22:49 UTC, Chris Murphy
Details
server smbstatus (6.54 KB, text/plain)
2017-07-10 22:52 UTC, Chris Murphy
Details

Description Chris Murphy 2017-07-10 22:42:41 UTC
Versions

Fedora 26 Workstation
samba-client-4.6.5-0.fc26.x86_64
gvfs-smb-1.32.1-1.fc26.x8

Fedora 26 Server
samba-4.6.5-0.fc26.x86_64

Summary of problem

In nautilus, I do a copy then paste to duplicate a file. I get a
status dialog that says duplicating but it gets stuck.

https://drive.google.com/open?id=0B_2Asp8DGjJ9dkxsY1E2RG5UUTg

And then then cancel also is stuck.

https://drive.google.com/open?id=0B_2Asp8DGjJ9a1daaVFGUDRlV3M


Detail


Nothing useful is in the journal either server or client side, but
this is smbstatus on the server:

https://paste.fedoraproject.org/paste/tDmSnX9f~NOyolNma0nKig

So I'm not really sure how to go about getting more information why
it's hung before filing a bug. I'm not even certain this is a problem with the gvfs-smb backend as reported; however file duplicate (context click copy + paste in the same directory) works fine when it's a local file.

If I connect using smbclient and use scopy to duplicate the same file, it works.

-rw-r-----. 1 chris chris  1022032 Jul  8 14:49 'wl_apsta (copy).o'
-rw-r-----. 1 chris chris 13231072 Apr 15 19:02  wl_apsta.o
-rw-r-----. 1 chris chris 13231072 Jul  8 15:36  wl_apsta.o.copy2
[chris@f26s scratch]$


copy2 is the scopy one the works, and (copy) is the still hanging nautilus copy.

Each failure copies exactly the same amount, the partial copy is the
same size in every attempt.

-rw-r-----. 1 chris chris  1022032 Jul  8 16:01 'wl_apsta (another copy).o'
-rw-r-----. 1 chris chris  1022032 Jul  8 15:55 'wl_apsta (copy).o'

If I switch to another file, same problem but a different partial file
size which is consistent for that particular file. And it also happens
when it's duplication from one directory to another, rather than in
the same directory.

Originally what I was testing was efficient duplicates:
https://wiki.samba.org/index.php/Server-Side_Copy#Btrfs_Enhanced_Server-Side_Copy_Offload

However, the problem happens whether 'vfs objects = btrfs' is set on
the server or not. If it is set, smbclient scopy does reflink copy the
file instantly.

I've also just tested Fedora Rawhide as the client which has samba-client-4.7.0-0-0.4-rc1 and gnome-shell-3.25.3-1 and the problem still happens.
Comment 1 Chris Murphy 2017-07-10 22:49:03 UTC
Created attachment 355301 [details]
client smb.conf
Comment 2 Chris Murphy 2017-07-10 22:49:19 UTC
Created attachment 355302 [details]
server smb.conf
Comment 3 Chris Murphy 2017-07-10 22:52:44 UTC
Created attachment 355303 [details]
server smbstatus

This is the contents of the paste (3rd link in original description) which will likely expire in a few days.
Comment 4 Steve Christen 2018-01-01 08:08:01 UTC
I can confirm this bug on F27.

CLIENT:
gvfs-smb-1.34.1-1.fc27.x86_64
samba-client-4.7.3-3.fc27.x86_64

SERVER:
Netgear ReadyNAS OS 6.9.1

Also when copy files from SERVER, nautilus hangs (sometimes).
Comment 5 Ondrej Holy 2018-01-02 16:28:36 UTC
Can you please provide gvfs debug output with GVFS_SMB_DEBUG=10? See:
https://wiki.gnome.org/Projects/gvfs/debugging

Can you please provide a full backtrace of gvfsd-smb in time of hang? See:
https://wiki.gnome.org/Community/GettingInTouch/Bugzilla/GettingTraces/Details
Comment 6 Steve Christen 2018-01-02 17:32:53 UTC
I'm sorry. Maybe I'm wrong but gvfsd-smb is not running while connecting to the samba-server. The samba-shares are mounted via fstab.

ps -ef | grep gvf
sysop    21790  1870  0 18:24 ?        00:00:00 /usr/libexec/gvfsd-metadata
sysop    21907 17915  0 18:25 pts/0    00:00:00 /usr/libexec/gvfsd --replace
sysop    21908 17915  0 18:25 pts/0    00:00:00 tee gvfsd.log
sysop    21917  1870  0 18:25 pts/0    00:00:00 /usr/libexec/gvfsd-fuse /run/user/7777/gvfs -f -o big_writes
sysop    22025  1870  0 18:25 pts/0    00:00:00 /usr/libexec/gvfsd-trash --debug --spawner :1.2146 /org/gtk/gvfs/exec_spaw/0
sysop    22477 21939  0 18:26 pts/1    00:00:00 grep --color=auto gvf

gvfsd.log:
trash: Added new job source 0x5603941e6890 (GVfsBackendTrash)
trash: Queued new job 0x5603941e7820 (GVfsJobMount)
trash: send_reply(0x5603941e7820), failed=0 ()
trash: backend_dbus_handler org.gtk.vfs.Mount:CreateFileMonitor (pid=20861)
trash: Queued new job 0x5603941e7b80 (GVfsJobCreateMonitor)
trash: send_reply(0x5603941e7b80), failed=0 ()
trash: backend_dbus_handler org.gtk.vfs.Mount:QueryInfo (pid=20861)
trash: Queued new job 0x5603941d22d0 (GVfsJobQueryInfo)
trash: send_reply(0x5603941d22d0), failed=0 (


Can it be it's only a problem of nautilus?
Comment 7 Chris Murphy 2018-01-03 04:15:36 UTC
OK in my case it is managed by gvfsd-smb but with Fedora 27 I haven't been able to get it to totally hang. It does stall out for brief periods, maybe 5-10 seconds, but nothing is recorded by either method listed in comment 5.

gvfs debug output has messages like this repeating during the copy, and when the pause/hang happens, the messaging stops. gdb isn't reporting anything.

smbc_read(0x7f5dbc005b20, 262128)
  --> 262128
smbc_read(0x7f5dbc005b20, 262128)
  --> 262128
smbc_read(0x7f5dbc005b20, 262128)
  --> 262128
smbc_read(0x7f5dbc005b20, 262128)
  --> 262128



Attaching to program: /usr/libexec/gvfsd-smb, process 7436
[New LWP 7437]
[New LWP 7438]
[New LWP 7440]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
0x00007f5df1b1b36b in __GI___poll (fds=0x56174b586330, nfds=1, timeout=-1) at ../sysdeps/unix/sysv/linux/poll.c:29
29	  return SYSCALL_CANCEL (poll, fds, nfds, timeout);
(gdb) cont
Continuing.
[New Thread 0x7f5dc3fff700 (LWP 7465)]
[Thread 0x7f5dc3fff700 (LWP 7465) exited]
[New Thread 0x7f5dc3fff700 (LWP 7479)]
Comment 8 Steve Christen 2018-01-03 05:30:17 UTC
BTW: I have also filed a bug for nautilus on redhat.com: https://bugzilla.redhat.com/show_bug.cgi?id=1530025
Comment 9 Ondrej Holy 2018-01-03 07:18:55 UTC
Steve, it may be Nautilus bug, or GLib/GIO bug. Does "gio copy [src] [dsc]" also hang? Just a note that it may relate to Bug 791457.
Comment 10 Ondrej Holy 2018-01-03 07:27:25 UTC
Chris, 5-10 seconds sounds ok, progress is reported after each successful read (in your case 262128 bytes), which can be easily affected by network issues... Actually, your issue may be duplicate of Bug 785391, which have been already fixed in F27.
Comment 11 Steve Christen 2018-01-03 10:18:40 UTC
(In reply to Ondrej Holy from comment #9)
> Steve, it may be Nautilus bug, or GLib/GIO bug. Does "gio copy [src] [dsc]"
> also hang? Just a note that it may relate to Bug 791457.

Nautilus hangs only by copying directories with files inside, never by single files. And as I can see, gio can't copy directories..
Comment 12 Ondrej Holy 2018-01-03 15:22:11 UTC
Steve, please see Bug 792169 and continue there.
Comment 13 Ondrej Holy 2018-01-03 15:22:47 UTC
Chris, let's close this now since you can't reproduce it, please reopen if this appears again.
Comment 14 Steve Christen 2018-01-03 16:46:06 UTC
(In reply to Ondrej Holy from comment #9)
> Steve, it may be Nautilus bug, or GLib/GIO bug. Does "gio copy [src] [dsc]"
> also hang? Just a note that it may relate to Bug 791457.

Yes it hangs also.