Repository navigation
Enable in-proc crash reporting on MacOS + Linux - #17
anurag6569201 wants to merge 1 commit into
Conversation
Source PR: dotnet#131410 Source head: f67f487
✅ Shipwright · ApproveRecommendation: approve PR #17 · Tier
Findings (3)
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 |
| - `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. |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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.
Enable the in-proc crash reporter on Linux and macOS using the existing crash-report settings.
Reporter selection
DOTNET_DbgEnableMiniDump=1continues to select createdump.DOTNET_EnableCrashReport=1adds createdump’s JSON report.DOTNET_EnableCrashReportOnly=1generates only createdump’s JSON report.DOTNET_DbgEnableMiniDumpis disabled, either crash-report setting enables the in-proc reporter.This preserves existing desktop and CI configurations while avoiding an additional reporter-selection environment variable.
Fixes: dotnet#119945
Source merge-base:
46cb84dbfc338b1003616de1262cc9097cad7680Source head:
f67f4876a79830eb4b2da2ad2032a7688b1c9d32