You are not logged in.

#1 2015-06-01 15:02:10

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Random file corruption with SSHFS, while CIFS is fine

I'm not sure what is happening, but it seems that sometimes, files read from a  sshfs mount come up corrupted. I have checked my filesystem and my RAM for errors on both ends, everything comes up clean.

I'm currently mounting my shares as

fuse.sshfs      noauto,x-systemd.automount,idmap=user,_netdev,identityfile=/home/azure/.ssh/id_rsa,allow_other,default_permissions,uid=1000,gid=1000,umask=0,reconnect,cache=yes,kernel_cache,ciphers=arcfour,compression=no 0 0

I tried copying several 300MB files, and different file(s) ends up partially corrupted. Checking the same file repeatedly does not make the checksum change as it usually happens with faulty RAM.
Only hint I have is that apparently it is always a block of exactly 2048 bytes that gets corrupted. It's filled with some data, so it's not getting "lost". My hunch is that either the encoding or decoding with arcfour is the culprit. Small files (~40mb) don't seem to be affected, else I'd get decoding errors/glitches on my music. Mounting the same share as cifs makes the problems disappear. Any ideas what might be causing this?


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#2 2015-06-01 15:28:23

frostschutz
Member
Registered: 2013-11-15
Posts: 1,422

Re: Random file corruption with SSHFS, while CIFS is fine

What does the corruption look like exactly?

I don't know if it affects sshfs, but ssh itself can be very picky, for example if the user has a funny .bashrc that causes any unexpected output it can corrupt transfers.

Offline

#3 2015-06-01 16:06:27

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: Random file corruption with SSHFS, while CIFS is fine

The corrupted section is some data, which is why I suspect the en/decoding. Watching such a corrupted video gives the typical "sea of artifacts" at that point.

edit: oh and my .bashrc just has some aliases defined, nothing special

Last edited by Soukyuu (2015-06-01 16:08:12)


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#4 2015-06-06 19:49:53

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: Random file corruption with SSHFS, while CIFS is fine

It just happened again. The file is fine on the other side, but I only see the "cached" state of it on my side. I will try removing "cache=yes" from the mount parameters, but if it's what causing it, then it's some shitty cache if it can't detect the file changed on the other side.

edit: setting "cache=no" seems to have cleared the cache and is showing the updated file content. The question now for me is, is that a bug in ssh, sshfs or dolphin?

Last edited by Soukyuu (2015-06-06 19:53:36)


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

#5 2015-06-06 21:00:52

kokoko3k
Member
Registered: 2008-11-14
Posts: 2,399

Re: Random file corruption with SSHFS, while CIFS is fine

happened to me with lftp via sftp, switched to ftps...


Help me to improve ssh-rdp !
Retroarch User? Try my koko-aio shader !

Offline

#6 2015-06-06 22:12:54

Soukyuu
Member
Registered: 2014-04-08
Posts: 854

Re: Random file corruption with SSHFS, while CIFS is fine

Well in my case it's a connection to my home server downstairs, so I guess not caching the shares is a workaround - it's a gigabit link anyway so it's fast enough. Using ftp would be a crutch, kind of.


[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]

Offline

Board footer

Powered by FluxBB