runtime: Fix corrupted mini-dumps on Windows that VS can not load
I am hosting a dotnet module inside my native C++ application and use google breakpad to generate minidumps. I noticed that only MiniDumpWithFullMemory
seems to be useful for getting proper managed stacks. Some of these dumps can get quite big however. I was wondering if you guys have some clue on reducing the size a bit. Exporting “every readable page in the process” seems quite extreme.
http://www.debuginfo.com/tools/clrdump.html claims to reduce the size of .NET dumps while maintaining relevant stack/thread information. It’s not open-source AFAICT and seems to be targeting .NET Framework (not .NET Core!). Apparently he’s using (according to https://stackoverflow.com/a/8258911/2354690):
MiniDumpNormal
MiniDumpWithProcessThreadData
MiniDumpWithThreadInfo
MiniDumpWithUnloadedModules
They don’t seem to work for me. Any ideas?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 16 (9 by maintainers)
Commits related to this issue
- Fix minidumps not loading in VS issue Fix a function that was ifdef'ed needed for the metadata locator callbacks to work. Fix some not properly DAC'ized code in the type desc and server GC code. Cau... — committed to mikem8361/coreclr by mikem8361 5 years ago
- Fix minidumps not loading in VS issue (#27553) Fix a function that was ifdef'ed needed for the metadata locator callbacks to work. Fix some not properly DAC'ized code in the type desc and server G... — committed to dotnet/coreclr by mikem8361 5 years ago
I think I’ve narrowed it down to the DAC’s (mscordaccore) memory enumeration API faulting. It may take me a while to figure out the root cause. The bad news if it is in the DAC the fix will have to go out in the next service release.
Ping @mikem8361 : )
In the meantime here are some things that may help: env vars to take (small) dumps on crash: https://github.com/dotnet/coreclr/blob/master/Documentation/botr/xplat-minidump-generation.md#configurationpolicy a tool that can take small dumps: https://github.com/dotnet/diagnostics/blob/master/documentation/dotnet-dump-instructions.md The source in the dotnet-dump tool which calls MiniDumpWriteDump: https://github.com/dotnet/diagnostics/blob/master/src/Tools/dotnet-dump/Dumper.Windows.cs#L27