Skip to content

Conversation

janvorli
Copy link
Member

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

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
@janvorli janvorli added this to the 10.0.0 milestone Mar 20, 2025
@janvorli janvorli self-assigned this Mar 20, 2025
@Copilot Copilot AI review requested due to automatic review settings March 20, 2025 15:39
Copy link
Contributor

@Copilot Copilot AI left a 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

Copy link
Member

@AaronRobinsonMSFT AaronRobinsonMSFT left a 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.
@janvorli janvorli merged commit 8381f2a into dotnet:main Mar 20, 2025
72 checks passed
@janvorli janvorli deleted the prevent-os-core-dump-for-some-tests branch March 20, 2025 23:26
@github-actions github-actions bot locked and limited conversation to collaborators Apr 20, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux x64 machine running out of space

3 participants