Skip to content

Fix File Descriptor Leak - #550

Merged
kobergj merged 1 commit into
owncloud:mainfrom
kobergj:FixFileDescriptorLeak
Mar 5, 2026
Merged

kobergj merged 1 commit into
owncloud:mainfrom
kobergj:FixFileDescriptorLeak

Conversation

@kobergj

@kobergj kobergj commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

@kobergj
kobergj merged commit 69cd8d4 into owncloud:main Mar 5, 2026
@kobergj
kobergj deleted the FixFileDescriptorLeak branch March 5, 2026 16:41
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants