-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve the robustness of closing open file descriptors in jailer
Introduces multiple methods for closing all open FDs in jailer. The method is choosen based on the environment. On host kernel >= 5.9 uses the close_range syscall On host kernel < 5.9 when OPEN_MAX <= 2**16 iterates over all FDs On host kernel < 5.9 when OPEN_MAX > 2**16 discovers open FDs by reading from /proc/self/fds using the nix crate Fixes a bug where firecracker would end up spending minutes starting which arises when running on systems with OPEN_MAX set to a very high number. Signed-off-by: Grzegorz Uriasz <gorbak25@gmail.com>
- Loading branch information
Showing
3 changed files
with
157 additions
and
17 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains 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
This file contains 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