Can't remove huge files from samba share on first attempt - Input/output error

Bug #1408107 reported by Adam Niedling
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gvfs (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

I'm using Ubuntu 14.04. I'm trying to delete huge (10-20 gigs) files from a samba share but it always fails for the first try:

username@hostname:/run/user/1000/gvfs/smb-share:server=192.168.1.1,share=download$ rm -r Testdir/
rm: cannot remove ‘Testdir/13gigs-Testfile.mkv’: Input/output error
username@hostname:/run/user/1000/gvfs/smb-share:server=192.168.1.1,share=download$ rm -r Testdir/
username@hostname:/run/user/1000/gvfs/smb-share:server=192.168.1.1,share=download$ rm -r Testdir/
rm: cannot remove ‘Testdir/’: No such file or directory
username@hostname:/run/user/1000/gvfs/smb-share:server=192.168.1.1,share=download$

The same thing is happening if I use Nautilus. This is bugging me a lot because I'm always having a hard time deleting stuff.
My quess is that the deletion process times out too early so it doesn't have enough time to delete such big files.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: gvfs 1.20.1-1ubuntu1
ProcVersionSignature: Ubuntu 3.13.0-43.72-generic 3.13.11.11
Uname: Linux 3.13.0-43-generic x86_64
NonfreeKernelModules: wl
ApportVersion: 2.14.1-0ubuntu3.6
Architecture: amd64
CurrentDesktop: Unity
Date: Tue Jan 6 22:22:30 2015
InstallationDate: Installed on 2013-10-30 (433 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: gvfs
UpgradeStatus: Upgraded to trusty on 2014-05-04 (247 days ago)

Revision history for this message
Adam Niedling (krychek) wrote :
Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

Please run the following in a terminal:
pkill gvfs; GVFS_DEBUG=all GVFS_SMB_DEBUG=10 `find /usr/lib* -name 'gvfsd'` &> ~/log.txt

Then mount the smb share, reproduce the problem, and then upload log.txt in your home directory so we can see a log of what is happening.

Revision history for this message
Adam Niedling (krychek) wrote :

There you go.

Revision history for this message
Adam Niedling (krychek) wrote :

I just realized that the error messages are in Hungarian in that log file. Let me know if you want me to change the system language back to English and redo the test. However I see a timeout error message:

send_reply(0x8b3940), failed=1 (Időtúllépés a kapcsolatban) meaning: timeout in the connection.

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

I don't think this is a gvfs issue, the timeout is coming from libsmbclient which gvfs uses to communicate with the server. Deleting a file should be quick though so timing out is strange.

How long does it take to timeout? Maybe there's something strange happening like the server crashing which causes the connection to timeout?

This is the interesting bit from the logs, where two stat() calls in a row give different results:

smbc_stat(smb://192.168.1.1/download/test123/test123.1080p.mkv)
SMBC_getatr: sending qpathinfo
num_setup=1, max_setup=0, param_total=60, this_param=60, max_param=2, data_total=0, this_data=0, max_data=65535, param_offset=68, param_pad=0, param_disp=0, data_offset=128, data_pad=0, data_disp=0
send_reply(0x8a18d0), failed=0 ()

smbc_stat(smb://192.168.1.1/download/test123/test123.1080p.mkv)
SMBC_getatr: sending qpathinfo
num_setup=1, max_setup=0, param_total=60, this_param=60, max_param=2, data_total=0, this_data=0, max_data=65535, param_offset=68, param_pad=0, param_disp=0, data_offset=128, data_pad=0, data_disp=0
map_errno_from_nt_status: 32 bit codes: code=c00000b5
smbc errno NT_STATUS_IO_TIMEOUT -> 110
send_reply(0x8b3940), failed=1 (Időtúllépés a kapcsolatban)

smbc_stat(smb://192.168.1.1/download/test123)
SMBC_getatr: sending qpathinfo
num_setup=1, max_setup=0, param_total=24, this_param=24, max_param=2, data_total=0, this_data=0, max_data=65535, param_offset=68, param_pad=0, param_disp=0, data_offset=92, data_pad=0, data_disp=0
map_errno_from_nt_status: 32 bit codes: code=c00000b5
smbc errno NT_STATUS_IO_TIMEOUT -> 110
send_reply(0x7f5c38002c00), failed=1 (Időtúllépés a kapcsolatban)

Are you using a Windows server or some kind of Samba server?

Revision history for this message
Adam Niedling (krychek) wrote :

The timeout happens in about 10 seconds. It does not happen if I upload/download something to/from the server.

It's a Samba server running on a Asus RT-N66U router. (Firmware: 3.0.0.4.376_3754 (latest), the Samba server is stock)

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

Unfortunately, gvfs can't control the timeouts that libsmbclient uses. I recommend filing a bug at https://bugzilla.samba.org/ or asking a question on the mailing list: https://lists.samba.org/mailman/listinfo/samba

Alternatively, you could try poke about on the router and see what is happening, e.g. if the server crashes or something.

Revision history for this message
Adam Niedling (krychek) wrote :

This issue of timing out does not happen when I use Windows and delete the files from there the router being an attached network drive. So I believe the problem is not on the server side, there must be something wrong in Ubuntu.

Revision history for this message
Ross Lagerwall (rosslagerwall) wrote :

I've seen at least once before an embedded Samba server which crashed due to the client's access pattern, even though the client was sending valid commands.

Adam Niedling (krychek)
tags: added: wily
Revision history for this message
Adam Niedling (krychek) wrote :

I don't have this issue anymore. Something has changed, either on the client or on the server side.

Changed in gvfs (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.