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

remove_all can exhaust file descriptor limit in extreme cases #149

Open
cyphar opened this issue Jan 21, 2025 · 0 comments
Open

remove_all can exhaust file descriptor limit in extreme cases #149

cyphar opened this issue Jan 21, 2025 · 0 comments
Labels
api/root Related to the Root API. ideas welcome An open problem which doesn't have a clear resolution.

Comments

@cyphar
Copy link
Member

cyphar commented Jan 21, 2025

When running the 128 thread tests of Root::remove_all it's possible to exhaust the default 1024 open files ulimit. For tests we can raise the ulimit, but maybe keeping an open handle for every element of the path up to the root for the path we are currently operating on is not ideal. Unfortunately it's not clear if switching to storing the paths (and then re-doing the lookup) is better overall (it would definitely make removals more expensive).

The Go stdlib RemoveAll and Rust remove_dir_all implementations have the same issue, for what it's worth.

@cyphar cyphar added api/root Related to the Root API. ideas welcome An open problem which doesn't have a clear resolution. labels Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api/root Related to the Root API. ideas welcome An open problem which doesn't have a clear resolution.
Projects
None yet
Development

No branches or pull requests

1 participant