New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: Possible file descriptor leaks #4928
Closed
4 tasks done
Labels
Comments
|
I'm currently running into this - can't run Using Flatpak 1.12.7 |
|
Using Valgrind with |
|
As far as I can see, |
GeorgesStavracas
added a commit
to GeorgesStavracas/ostree
that referenced
this issue
Aug 16, 2022
Commit 540e60c introduced _ostree_repo_auto_transaction_new(), a private constructor to OstreeRepoAutoTransaction, by factoring out some code from _ostree_repo_auto_transaction_start(). This factored code increased the refcount of the 'repo' variable. Subsequent commit 71304e8 made ostree_repo_prepare_transaction() use ths newly introduced constructor. However, in this function, the happy path assumed no ref was taken, and therefore did not unref it. Commit 71304e8 didn't add the corresponding unref either. This leaks a reference to OstreeRepo when calling ostree_repo_prepare_transaction(). Plug this leak by using g_clear_object() to clear the repo field of OstreeRepoAutoTransaction, instead of simply setting it to NULL. Closes flatpak/flatpak#4928
|
ostreedev/ostree#2692 should fix this. |
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Checklist
Flatpak version
1.12.7
What Linux distribution are you using?
Fedora Linux
Linux distribution version
36
What architecture are you using?
x86_64
How to reproduce
Moving this form a downstream bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=2090088
Which is also mirrored under gnome-software itself:
https://gitlab.gnome.org/GNOME/gnome-software/-/issues/1783
Since the update to Fedora 36, which has flatpak-libs-1.12.7-2.fc36, there are leaked file descriptors after refreshing updates in the GNOME Software, pointing into:
which can mean a regression in the flatpak itself. The same steps with flatpak-libs-1.12.6-1.fc35 do not reproduce the problem.
Expected Behavior
Well, no file descriptor leaks.
Actual Behavior
File descriptor leaks, which can leak to "too many opened files" errors, or even aborts of the application.
Additional Information
No response
The text was updated successfully, but these errors were encountered: