#1925 new defect

filesize is zero after upload via sshfs/sftp

Reported by: cehteh Owned by: cehteh
Priority: normal Milestone: undecided
Component: code-frontend-ftp-sftp Version: 1.9.2
Keywords: sftp error Cc:
Launchpad Bug:

Description (last modified by warner)

When mounting tahoe via sshfs files copied into the directory will first uppload (tried with cp and rsync) be added and visible in the parent directory and then be empty with size 0.

This only happens on one node (client+storage) here, coincidentally an older debian/squeeze box.

After some investigation this happens when using the sftp client:

Retrieving works:

sftp> get Rose.for.a.day.2007.Xvid-VODO.avi 
Fetching /Rose.for.a.day.2007.Xvid-VODO.avi to Rose.for.a.day.2007.Xvid-VODO.avi
/Rose.for.a.day.2007.Xvid-VODO.avi                                                                                                     100%  343MB   2.9MB/s   01:57    
sftp> ^D
$ ls Rose.for.a.day.2007.Xvid-VODO.avi -lh
-rw-r--r-- 1 ct ct 343M Feb 27 04:54 Rose.for.a.day.2007.Xvid-VODO.avi

Storing something exits:

sftp> put Elephants_Dream_HD.avi 
Uploading Elephants_Dream_HD.avi to /Elephants_Dream_HD.avi
Elephants_Dream_HD.avi                                                                                                                 100%   33MB   4.7MB/s   00:07    
Couldn't close file: Failure
sftp> ^D

Trying with sftp -vvvv reveals the following log

sftp> put bench.c 
debug3: Looking up bench.c
Uploading bench.c to /bench.c
debug3: Sent message SSH2_FXP_OPEN I:2 P:/bench.c
bench.c                                                                                                                                  0%    0     0.0KB/s   --:-- ETAdebug3: Sent message SSH2_FXP_WRITE I:3 O:0 S:5711
debug3: SSH2_FXP_STATUS 0
debug3: In write loop, ack for 3 5711 bytes at 0
bench.c                                                                                                                                100% 5711     5.6KB/s   00:00    
debug3: Sent message SSH2_FXP_CLOSE I:3
debug3: SSH2_FXP_STATUS 4
Couldn't close file: Failure
sftp> 

Version information:

# cat /etc/debian_version ; ssh -V
6.0.6
OpenSSH_5.5p1 Debian-6+squeeze2, OpenSSL 0.9.8o 01 Jun 2010

Tahoe is run from source (trial-test passed) as unprivileged user

$ ./allmydata-tahoe-1.9.2/bin/tahoe --version-and-path
allmydata-tahoe: 1.9.2 (/home/tahoe/allmydata-tahoe-1.9.2/src),
foolscap: 0.6.4 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/foolscap-0.6.4-py2.6.egg),
pycryptopp: 0.6.0.1206569328141510525648634803928199668821045408958 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/pycryptopp-0.6.0.1206569328141510525648634803928199668821045408958-py2.6-linux-x86_64.egg),
zfec: 1.4.7 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/zfec-1.4.7-py2.6-linux-x86_64.egg),
Twisted: 10.1.0 (/usr/lib/python2.6/dist-packages),
Nevow: 0.10.0 (/usr/lib/python2.6/dist-packages),
zope.interface: unknown (/usr/lib/python2.6/dist-packages/zope),
python: 2.6.6 (/usr/bin/python),
platform: Linux-debian_6.0.6-x86_64-64bit_ELF (None),
pyOpenSSL: 0.10 (/usr/lib/pymodules/python2.6),
simplejson: 2.1.0rc3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/simplejson-2.1.0-py2.6-linux-x86_64.egg),
pycrypto: 2.1.0 (/usr/lib/python2.6/dist-packages),
pyasn1: unknown (/usr/lib/pymodules/python2.6),
mock: 1.0.1 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages),
sqlite3: 2.4.1 [sqlite 3.7.3] (/usr/lib/python2.6),
setuptools: 0.6c16dev3 (/home/tahoe/allmydata-tahoe-1.9.2/support/lib/python2.6/site-packages/setuptools-0.6c16dev3.egg)

Change History (4)

comment:1 Changed at 2013-02-27T05:46:22Z by cehteh

turns out this was my fault, shares.happy was higher than available nodes.

comment:2 Changed at 2013-02-28T04:12:13Z by davidsarah

Ah, that explains it. Unfortunately the SFTP protocol doesn't have any way to provide a detailed error message to the client. Did the Recent and Active Operations page in the gateway WUI show the error?

comment:3 Changed at 2013-02-28T04:13:08Z by davidsarah

  • Component changed from unknown to code-frontend
  • Keywords error added
  • Owner changed from davidsarah to cehteh

comment:4 Changed at 2014-12-02T19:49:45Z by warner

  • Component changed from code-frontend to code-frontend-ftp-sftp
  • Description modified (diff)
Note: See TracTickets for help on using tickets.