Skip to content

Enable in-proc crash reporting on MacOS + Linux - #17

Open
anurag6569201 wants to merge 1 commit into
qa/agent-dotnet-runtime/pr-17-131410/basefrom
qa/agent-dotnet-runtime/pr-17-131410/head
Open

anurag6569201 wants to merge 1 commit into
qa/agent-dotnet-runtime/pr-17-131410/basefrom
qa/agent-dotnet-runtime/pr-17-131410/head

Conversation

@anurag6569201

Copy link
Copy Markdown

Enable the in-proc crash reporter on Linux and macOS using the existing crash-report settings.

Reporter selection

  • DOTNET_DbgEnableMiniDump=1 continues to select createdump.
    • DOTNET_EnableCrashReport=1 adds createdump’s JSON report.
    • DOTNET_EnableCrashReportOnly=1 generates only createdump’s JSON report.
  • When DOTNET_DbgEnableMiniDump is disabled, either crash-report setting enables the in-proc reporter.
  • Mobile platforms retain their existing in-proc behavior.

This preserves existing desktop and CI configurations while avoiding an additional reporter-selection environment variable.

Fixes: dotnet#119945

Source merge-base: 46cb84dbfc338b1003616de1262cc9097cad7680
Source head: f67f4876a79830eb4b2da2ad2032a7688b1c9d32

@shipwright-agent

Copy link
Copy Markdown

✅ Shipwright · Approve

Recommendation: approve PR #17 · Tier T1
Checks: 0 total · 0 needing attention

Next step: ready to merge.

Findings (3)

  • HIGH The documentation now says DOTNET_EnableCrashReportOnly 'also enables the in-process reporter on supported platforms' when DbgEnableMiniDump is not enabled, but the code comment sa · docs/design/coreclr/botr/xplat-minidump-generation.md:68
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.
  • HIGH The new CrashReportConfigure() early-return path reads DbgEnableMiniDump via CLRConfigNoCache::Get with getenv, but only checks TryAsInteger(10, ...) and non-zero. · src/coreclr/vm/crashreportstackwalker.cpp:714
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.
  • HIGH The change expands FEATURE_INPROC_CRASHREPORT to Linux and macOS, enabling in-process crash reporting on desktop/server platforms. · src/coreclr/clrfeatures.cmake:102
    • Fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

Fireworks usage: 10,189 input · 450 output · 10,639 total tokens · $0.0025 · 8s · 0 fix iteration(s)

Open the Shipwright check for full evidence and the audit bundle. Use /shipwright rerun to verify again.

- `DOTNET_CreateDumpLogToFile`: if set, it is the path of the file to write the _createdump_ diagnostic messages.
- `DOTNET_EnableCrashReport`: In .NET 6.0 or greater, if set to "1", createdump also generates a json formatted crash report which includes information about the threads and stack frames of the crashing application. The crash report name is the dump path/name with _.crashreport.json_ appended.
- `DOTNET_EnableCrashReportOnly`: In .NET 7.0 or greater, same as DOTNET_EnableCrashReport except the core dump is not generated.
- `DOTNET_EnableCrashReport`: In .NET 6.0 or greater, if set to "1" together with `DOTNET_DbgEnableMiniDump`, createdump also generates a json formatted crash report which includes information about the threads and stack frames of the crashing application. The crash report name is the dump path/name with _.crashreport.json_ appended. Starting in .NET 11, when `DOTNET_DbgEnableMiniDump` is not enabled on a platform that supports the in-process crash reporter, this setting enables the in-process reporter instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shipwright · HIGH

The documentation now says DOTNET_EnableCrashReportOnly 'also enables the in-process reporter on supported platforms' when DbgEnableMiniDump is not enabled, but the code comment sa

Impact: The documentation now says DOTNET_EnableCrashReportOnly 'also enables the in-process reporter on supported platforms' when DbgEnableMiniDump is not enabled, but the code comment says 'Preserve createdump's existing ownership of EnableCrashReport* when it is enabled.' The relationship between EnableCrashReportOnly, DbgEnableMiniDump, and the in-process reporter is non-obvious and requires reading multiple files to un…

Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

void
CrashReportConfigure()
{
#if !defined(TARGET_ANDROID) && !defined(TARGET_IOS) && !defined(TARGET_TVOS) && !defined(TARGET_MACCATALYST)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Shipwright · HIGH

The new CrashReportConfigure() early-return path reads DbgEnableMiniDump via CLRConfigNoCache::Get with getenv, but only checks TryAsInteger(10, ...) and non-zero.

Impact: The new CrashReportConfigure() early-return path reads DbgEnableMiniDump via CLRConfigNoCache::Get with getenv, but only checks TryAsInteger(10, ...) and non-zero. If DbgEnableMiniDump is set to a non-numeric or malformed value, TryAsInteger fails and the code falls through to enable the in-process reporter, silently changing crash-report ownership behavior. This is a fragile assumption about environment variable fo…

Suggested fix: Review the cited evidence, fix the risk if confirmed, and rerun Shipwright.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant