From 35dc2a5f4323049f3035f8d14e2620ae44866239 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Fri, 21 Apr 2017 17:01:01 -0700 Subject: [PATCH] Move xplat minidump doc to botr. (#11149) Change default minidump type to MiniDumpWithPrivateReadWriteMemory. Remove language about uploading triage dumps. Turn off diagnostic output. --- Documentation/botr/README.md | 1 + .../core-minidump-generation.md => botr/xplat-minidump-generation.md} | 2 +- src/debug/createdump/createdump.cpp | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) rename Documentation/{design-docs/core-minidump-generation.md => botr/xplat-minidump-generation.md} (97%) diff --git a/Documentation/botr/README.md b/Documentation/botr/README.md index 99e4274..3a91f8d 100644 --- a/Documentation/botr/README.md +++ b/Documentation/botr/README.md @@ -26,6 +26,7 @@ Below is a table of contents. - [What Every Dev needs to Know About Exceptions in the Runtime](exceptions.md) - [ReadyToRun Overview](readytorun-overview.md) - [CLR ABI](clr-abi.md) +- [Cross-platform Minidumps](xplat-minidump-generation.md) It may be possible that this table is not complete. You can get a complete list diff --git a/Documentation/design-docs/core-minidump-generation.md b/Documentation/botr/xplat-minidump-generation.md similarity index 97% rename from Documentation/design-docs/core-minidump-generation.md rename to Documentation/botr/xplat-minidump-generation.md index f099610..495ecff 100644 --- a/Documentation/design-docs/core-minidump-generation.md +++ b/Documentation/botr/xplat-minidump-generation.md @@ -3,7 +3,7 @@ Core dump generation on Linux and other non-Windows platforms has several challenges. Dumps can be very large and the default name/location of a dump is not consistent across all our supported platforms. The size of a full core dumps can be controlled somewhat with the "coredump_filter" file/flags but even with the smallest settings may be still too large and may not contain all the managed state needed for debugging. By default, some platforms use _core_ as the name and place the core dump in the current directory from where the program is launched; others add the _pid_ to the name. Configuring the core name and location requires superuser permission. Requiring superuser to make this consistent is not a satisfactory option. Our goal is to generate core dumps that are on par with WER (Windows Error Reporting) crash dumps on any supported Linux platform. To the very least we want to enable the following: -- automatic generation of minimal size minidumps that can be automatically uploaded to a server for triage. The quality and quantity of the information contained in the dump should be on par with the information contained in a traditional Windows mini-dump. +- automatic generation of minimal size minidumps. The quality and quantity of the information contained in the dump should be on par with the information contained in a traditional Windows mini-dump. - simple configurabilty by the user (not _su_!). Our solution at this time is to intercept any unhandled exception in the PAL layer of the runtime and have coreclr itself trigger and generate a "mini" core dump. diff --git a/src/debug/createdump/createdump.cpp b/src/debug/createdump/createdump.cpp index 87cf4f9..9e6af4b 100644 --- a/src/debug/createdump/createdump.cpp +++ b/src/debug/createdump/createdump.cpp @@ -11,7 +11,7 @@ const char* g_help = "createdump [options] pid\n" "-m, --micro - create triage minidump.\n" "-d, --diag - enable diagnostic messages.\n"; -bool g_diagnostics = true; +bool g_diagnostics = false; // // Create a minidump using the DAC's enum memory regions interface @@ -78,7 +78,7 @@ exit: // int __cdecl main(const int argc, const char* argv[]) { - MINIDUMP_TYPE minidumpType = MiniDumpNormal; + MINIDUMP_TYPE minidumpType = MiniDumpWithPrivateReadWriteMemory; const char* dumpPathTemplate = "/tmp/coredump.%d"; const char* programPath = nullptr; pid_t pid = 0; -- 2.7.4