Skip to content
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

container: bubblewrap: do not defer closing files #596

Merged
merged 1 commit into from
Aug 9, 2023

Conversation

kaniini
Copy link
Contributor

@kaniini kaniini commented Aug 9, 2023

In go, defer statements are scoped to the function level, not the block level, so this results in file descriptor exhaustion for guests which have more than RLIMIT_NOFILE files installed in them.

Instead, immediately close files after writing their contents.

In go, defer statements are scoped to the function level, not the block
level, so this results in file descriptor exhaustion for guests which have
more than RLIMIT_NOFILE files installed in them.

Instead, immediately close files after writing their contents.

Signed-off-by: Ariadne Conill <ariadne@dereferenced.org>
@kaniini kaniini requested a review from a team as a code owner August 9, 2023 21:26
@kaniini kaniini requested review from jdolitsky and removed request for a team August 9, 2023 21:26
@kaniini kaniini enabled auto-merge August 9, 2023 21:35
@kaniini kaniini merged commit 57f4822 into main Aug 9, 2023
@kaniini kaniini deleted the fix/fd-leak-unpack branch August 9, 2023 21:36
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