#302·sshfs

severe file corruption - 2 different bugs - not sure if in sshfs or fuse3, reporting in both projects

Author: cornerfixCreated May 4, 2024Updated Apr 4, 2025

Arch Linux SSHFS version 3.7.3 FUSE library version 3.16.2 using FUSE kernel interface version 7.38 fusermount3 version: 3.16.2

Steps to reproduce:

  1. mount directory on remote server with sshfs
  2. open ssh terminal to remote server
  3. in the remote terminal - go to the mounted directory, create a text file, put some text in it
  4. over sshfs - do an md5sum of the file
  5. in the remote terminal - edit the file, ADD SOME CHARACTERS so the lenght increases
  6. over sshfs - do second md5sum of the file
  7. over sshfs - do a third md5sum of the file

second and third md5sums of the file are different the file has not been changed between them

there is also another bug - sometimes the second md5sum is THE SAME as first, even though the file is edited between taking md5sums. this happens even though "-o auto_cache,ac_attr_timeout=0" is given, and happens even with 0 timeout for detecting changes. happens less frequently, but if you do ~10 consecutive test (possibly with re-mounting between them) - this bug will also happen

I suspect this can be due to ac_attr_timeout=0 not properly invalidaing cache in libfuse3, so i will file the same report in libfuse project