-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Prevent OS core dump creation for intentionally crashing tests #113732
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
Prevent OS core dump creation for intentionally crashing tests #113732
Conversation
There are three coreclr tests that intentionally run a crashing secondary process. While the CreateDump invocation on crash for these tests was already disabled, the OS core dump creation was still happening. In the CI this was causing test machines getting out of disk space. This change disables OS core dump creation for those tests. Close dotnet#113652
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 disables OS core dump generation for intentionally crashing tests to prevent disk space issues in CI environments. Key changes include:
- Adding a new struct RLimit and a DllImport for setrlimit in Utilities.cs.
- Implementing and invoking the DisableOSCoreDump() method in multiple test files.
- Updating test entry points to call Utilities.DisableOSCoreDump() before executing intentional crashes.
Reviewed Changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
src/tests/Common/CoreCLRTestLibrary/Utilities.cs | Introduces the RLimit struct, RLIMIT_CORE constant, and DisableOSCoreDump() method to disable core dumps |
src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.cs | Calls DisableOSCoreDump() in Main() to prevent OS core dump generation |
src/tests/baseservices/exceptions/unhandled/unhandled.cs | Adds a call to DisableOSCoreDump() in Main() before throwing an exception |
src/tests/baseservices/exceptions/stackoverflow/stackoverflow.cs | Inserts DisableOSCoreDump() call to disable OS core dump for secondary threads tests |
src/tests/baseservices/exceptions/simple/ParallelCrash.cs | Ensures DisableOSCoreDump() is invoked before triggering parallel crashes |
Files not reviewed (3)
- src/tests/baseservices/exceptions/simple/ParallelCrashTester.csproj: Language not supported
- src/tests/baseservices/exceptions/stackoverflow/stackoverflow.csproj: Language not supported
- src/tests/baseservices/exceptions/stackoverflow/stackoverflow3.csproj: Language not supported
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.
LGTM once the CR is green.
* call the setrlimit explicitly on Linux / macOS only * fix missing reference to the CoreCLRTestLibrary.csproj in the ParallelCrash.csproj. I have accidentally put it into ParallelCrashTester.csproj instead.
Co-authored-by: Aaron Robinson <[email protected]>
There are three coreclr tests that intentionally run a crashing secondary process. While the CreateDump invocation on crash for these tests was already disabled, the OS core dump creation was still happening. In the CI this was causing test machines getting out of disk space. This change disables OS core dump creation for those tests.
Close #113652