Skip to content

[Tests] Disable inproc crash reporter for intentional crashing tests - #131536

Merged
janvorli merged 2 commits into
dotnet:mainfrom
mdh1418:fix/unhandled-test-disable-crash-report
Jul 29, 2026
Merged

[Tests] Disable inproc crash reporter for intentional crashing tests#131536
janvorli merged 2 commits into
dotnet:mainfrom
mdh1418:fix/unhandled-test-disable-crash-report

Conversation

@mdh1418

@mdh1418 mdh1418 commented Jul 29, 2026

Copy link
Copy Markdown
Member

The test intentionally expects an unhandled exception to occur. The helix test wrapper enables crash reporting in

export DOTNET_DbgEnableMiniDump=1
export DOTNET_EnableCrashReport=1
, but this test specifically disables DOTNET_DbgEnableMiniDump to disable the only crash reporter at the time, createdump.

With the in-proc crashreporter supported on macOS and Linux, there are now two crash reporting mechanisms, with the in-proc crash reporter being enabled should DOTNET_EnableCrashReport/DOTNET_EnableCrashReportOnly be set while DOTNET_DbgEnableMiniDump is unset. As a result, this test unintentionally began crash reporting after inducing unhandled exception scenarios.

Originally

Test process unhandled.dll with argument main exited
"Unhandled exception. System.Exception: Test"
"   at TestUnhandledException.Program.Main(String[] args)"
Test process exited with expected error code and produced expected output

InProc CrashReporter enabled

Test process unhandled.dll with argument main exited
"Unhandled exception. System.Exception: Test"
"   at TestUnhandledException.Program.Main(String[] args)"
"*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** "
".NET Crash Report v1.0.0"
"Build: 42.42.42.42424 @Commit: c1b4860a92c508c5cd043776fe1362455d2f75d8"
"ABI: arm64"
"Cmdline: corerun"
"pid: 4263"
"signal 6 (SIGABRT)"
""
"--- thread 0x164f8f (crashed) ---"
"  managed exception: System.Exception (0x80131500)"
"  #00 [0] TestUnhandledException.Program.Main + 0x1e (token=0x6000009)"
"  #01 [1] System.Environment.CallEntryPoint + 0x1c (token=0x60004a1)"
""
"--- thread 0x164f95 ---"
"  (no managed frames)"
""
"modules:"
"  [0] unhandled {5818b8c6-ff2f-4925-82a6-4ed6871d1d16}"
"  [1] System.Private.CoreLib {9fdb0c05-8392-43fe-8a44-1df8a41aaf06}"
" *** *** *** *** *** *** *** *** *** *** *** *** *** *** "
""
Test process exited with expected error code and produced expected output

This PR cleans the test output by removing DOTNET_EnableCrashReport, thereby disabling the inproc crash reporter.
It applies the same changes for similarly crash-expecting tests

@mdh1418
mdh1418 requested review from Copilot and janvorli July 29, 2026 15:59
@github-actions github-actions Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 29, 2026
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the unhandled-exception test harness to avoid emitting crash-report artifacts/log noise when the child process is expected to terminate abnormally, by explicitly clearing crash-report-related environment variables for the spawned process.

Changes:

  • Update the comment to reflect disabling broader crash diagnostics (not just dump generation).
  • Remove DOTNET_EnableCrashReport from the child process environment in addition to DOTNET_DbgEnableMiniDump.

Comment thread src/tests/baseservices/exceptions/unhandled/unhandledTester.cs
@janvorli

Copy link
Copy Markdown
Member

There is actually another test that needs this change:
src/tests/baseservices/exceptions/stackoverflow/stackoverflowtester.cs
It is likely needed for src/tests/baseservices/exceptions/OutOfMemoryException/OutOfMemoryException.cs too.
And it wouldn't hurt to do it for the src/tests/baseservices/exceptions/simple/ParallelCrashTester.cs and

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 13d168eb-c2c9-410e-b5fb-be2637ac4e9a
Copilot AI review requested due to automatic review settings July 29, 2026 17:17
@mdh1418 mdh1418 changed the title [Tests] Disable inproc crash reporter for unhandled exception test [Tests] Disable inproc crash reporter for intentional crashing tests Jul 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you for fixing it.

@janvorli
janvorli merged commit 3018512 into dotnet:main Jul 29, 2026
86 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants