-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Increase file descriptor limit in native AOT executables #118995
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR consolidates file descriptor limit handling across .NET runtime components by moving the descriptor limit increase functionality from individual runtime implementations into the shared minipal library. This ensures consistent behavior across CoreCLR, Mono, and Native AOT executables.
Key changes:
- Creates a unified
minipal_increase_descriptor_limit()
function in the minipal library - Removes duplicate descriptor limit code from CoreCLR PAL and Mono runtime
- Adds descriptor limit increase functionality to Native AOT bootstrap
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
src/native/minipal/descriptorlimit.h |
New header defining the minipal descriptor limit API |
src/native/minipal/descriptorlimit.c |
New implementation of descriptor limit increase functionality |
src/native/minipal/minipalconfig.h.in |
Adds HAVE_RESOURCE_H configuration check |
src/native/minipal/configure.cmake |
Adds sys/resource.h availability check |
src/native/minipal/CMakeLists.txt |
Includes new descriptor limit source and disables functionality on problematic platforms |
src/mono/mono/mini/driver.c |
Replaces local descriptor limit function with minipal version |
src/mono/CMakeLists.txt |
Removes redundant DONT_SET_RLIMIT_NOFILE definition |
src/coreclr/pal/src/init/pal.cpp |
Replaces local descriptor limit function with minipal version |
src/coreclr/pal/src/CMakeLists.txt |
Removes redundant DONT_SET_RLIMIT_NOFILE definition |
src/coreclr/nativeaot/Bootstrap/main.cpp |
Adds descriptor limit increase call to Native AOT bootstrap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Fixes #82719
Cc @dotnet/ilc-contrib