1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-11 18:20:26 +09:00

Misc createdump fixes (#73426)

Add --crashreportonly command line option that doesn't generated a dump.

Add matching DOTNET_EnableCrashReportOnly env var.

Add LoadModule error logging for MacOS.

Make DAC validate EEClass and MethodDesc functions more robust on Linux/MacOS so SOS's eestack and dumpstack commands don't segfault.

Update createdump doc.
This commit is contained in:
Mike McLaughlin 2022-08-05 13:01:14 -07:00 committed by GitHub
parent 4b7f748b51
commit 543bcc5ee7
Signed by: github
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 81 additions and 35 deletions

View file

@ -56,13 +56,18 @@ NOTE: Core dump generation in docker containers require the ptrace capability (-
Any configuration or policy is set with environment variables which are passed as options to the _createdump_ utility.
Starting with .NET 7.0 or greater the below environment variables can be prefixed with DOTNET_ or COMPlus_.
Environment variables supported:
- `COMPlus_DbgEnableMiniDump`: if set to "1", enables this core dump generation. The default is NOT to generate a dump.
- `COMPlus_DbgMiniDumpType`: See below. Default is "2" MiniDumpWithPrivateReadWriteMemory.
- `COMPlus_DbgMiniDumpName`: if set, use as the template to create the dump path and file name. See "Dump name formatting" for how the dump name can be formatted. The default is _/tmp/coredump.%p_.
- `COMPlus_CreateDumpDiagnostics`: if set to "1", enables the _createdump_ utilities diagnostic messages (TRACE macro).
- `COMPlus_CreateDumpVerboseDiagnostics`: if set to "1", enables the _createdump_ utilities verbose diagnostic messages (TRACE_VERBOSE macro).
- `COMPlus_CreateDumpLogToFile`: if set, it is the path of the file to write the _createdump_ diagnostic messages.
- `COMPlus_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.
- `COMPlus_EnableCrashReportOnly`: In .NET 7.0 or greater, same as COMPlus_EnableCrashReport except the core dump is not generated.
COMPlus_DbgMiniDumpType values:
@ -93,9 +98,12 @@ createdump [options] pid
-u, --full - create full core dump.
-d, --diag - enable diagnostic messages.
-v, --verbose - enable verbose diagnostic messages.
--crashreport - write crash report file.
-l, --logtofile - file path and name to log diagnostic messages.
--crashreport - write crash report file (dump file path + .crashreport.json).
--crashreportonly - write crash report file only (no dump).
--crashthread <id> - the thread id of the crashing thread.
--signal <code> - the signal code of the crash.
--singlefile - enable single-file app check.
```
**Dump name formatting**