sshfs does not wait for an FX_CLOSE request to complete before reporting success from the close #1059
Labels
No Label
0.2.0
0.3.0
0.4.0
0.5.0
0.5.1
0.6.0
0.6.1
0.7.0
0.8.0
0.9.0
1.0.0
1.1.0
1.10.0
1.10.1
1.10.2
1.10a2
1.11.0
1.12.0
1.12.1
1.13.0
1.14.0
1.15.0
1.15.1
1.2.0
1.3.0
1.4.1
1.5.0
1.6.0
1.6.1
1.7.0
1.7.1
1.7β
1.8.0
1.8.1
1.8.2
1.8.3
1.8β
1.9.0
1.9.0-s3branch
1.9.0a1
1.9.0a2
1.9.0b1
1.9.1
1.9.2
1.9.2a1
LeastAuthority.com automation
blocker
cannot reproduce
cloud-branch
code
code-dirnodes
code-encoding
code-frontend
code-frontend-cli
code-frontend-ftp-sftp
code-frontend-magic-folder
code-frontend-web
code-mutable
code-network
code-nodeadmin
code-peerselection
code-storage
contrib
critical
defect
dev-infrastructure
documentation
duplicate
enhancement
fixed
invalid
major
minor
n/a
normal
operational
packaging
somebody else's problem
supercritical
task
trivial
unknown
was already fixed
website
wontfix
worksforme
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Reference: tahoe-lafs/trac-2024-07-25#1059
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
sshfs does not wait for 'close' requests on a file opened for writing to complete, before reporting to the application that a file has been successfully closed.
If the client attempts to reopen the same file via SFTP, we delay the open request until the previous upload has completed (successfully or not), so this does not normally cause visibly incorrect behaviour.
However, if the upload fails, sshfs has no way to report the failure (even though we do correctly return an error from the close request). So written data may be lost if the gateway is shut down, or there is a network error, lack of storage space on the grid, etc.
It is possible to patch sshfs to wait for the close reponse, but this may cause different problems, for example timeouts in applications along the same lines as #1041. Another possibility would be to store the written data at the gateway so that if it is shut down, it can restart the upload the next time it starts up (this is a variant on #935).
Attachment sshfs.c.patch (693 bytes) added
Patch to make sshfs wait for files to be uploaded when they are closed.
Is this an issue we should report to http://fuse.sourceforge.net/sshfs.html ?
Note that a likely symptom of this bug (if the upload fails, perhaps because you do not have enough servers to meet the "shares of happiness" threshold), is that you wind up with zero-length files in your sshfs directory listing, which cannot be downloaded. I don't think these are tahoe-size entries: the SFTP frontend would report a 0-length file briefly (if you list the directory while uploading), but maybe sshfs frontends are caching the result and persisting in showing you a 0-length file even after tahoe has given up.