Repository navigation
Fix File Descriptor Leak - #550
Merged
Merged
Conversation
Signed-off-by: Julian Koberg <[email protected]>
2403905
approved these changes
Mar 5, 2026
pbleser-oc
pushed a commit
to pbleser-oc/reva
that referenced
this pull request
Oct 9, 2026
Ported from owncloud#550 (8935224). The upstream commit also patched pkg/storage/fs/posix/blobstore, which we rewrote in f6ca1ec and f60de0e to use rename plus periodic fdatasync, so that hunk does not apply here.
pbleser-oc
pushed a commit
to pbleser-oc/reva
that referenced
this pull request
Oct 9, 2026
The decomposed driver has its own copy of the filesystem blobstore, which had the same missing Close() and Sync() as the ocis one fixed in owncloud#550: every upload that could not be renamed into place leaked the descriptor of the blob file, and the blob was not flushed to disk before the node was updated.
pbleser-oc
pushed a commit
to pbleser-oc/reva
that referenced
this pull request
Oct 9, 2026
The deferred Close() added with owncloud#550 assigns the close error to err, but Upload's result was unnamed, so that assignment was discarded and a failing close returned success. On NFS, where close() is the point at which the client flushes dirty pages, that means a truncated or missing blob gets committed without anyone noticing. Naming the result makes the guard do what it reads like: report a close failure only when nothing else failed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential root cause fix for https://kiteworks.atlassian.net/browse/OCISDEV-371