diagnostics icon indicating copy to clipboard operation
diagnostics copied to clipboard

dotnet dump analyze should work with x86 and x64 dumps seamlessly

Open davidfowl opened this issue 6 years ago • 7 comments

  • [ ] - Support debugging 32 bit dumps without manually invoking the 32 bit dotnet host.
  • [ ] - Using 32 bit dump with 32 bit dotnet dump analyze throws an OOM

Read more details below:

I recently tried to look at a dump with dotnet dump analyze on a 32 bit dump and ended up with this error:

Loading core dump: C:\Users\david\Desktop\dumps\dotnet_16816.dmp ...                               
Ready to process analysis commands. Type 'help' to list available commands or 'help [command]' to get detailed help on a command.
Type 'quit' or 'exit' to exit the session.
> dumpasync
SOS does not support the current target architecture 0x0000014c
SOS command FAILED 0x80004005
> exit                

A few things here:

  • The error message is great and it helped me to understand what I was doing wouldn't work and what the problem was.
  • Seeing 0x0000014c isn't helpful and should be removed.
  • SOS command FAILED 0x80004005 will be removed in another change.

Second attempt:

& "C:\Program Files (x86)\dotnet\dotnet.exe" "C:\Users\david\.dotnet\tools\.store\dotnet-dump\3.0.47001\dotnet-dump\3.0.47001\tools\netcoreapp2.1\any\dotnet-dump.dll" analyze "C:\Users\david\Desktop\dumps\dotnet_16816.dmp"

Loading core dump: C:\Users\david\Desktop\dumps\dotnet_16816.dmp ...

Ready to process analysis commands. 
Type 'help' to list available commands or 'help [command]' to get detailed help on a command.
Type 'quit' or 'exit' to exit the session.

> dumpasync -stacks
Unhandled exception: System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
   at Microsoft.Diagnostics.Repl.CommandProcessor.Handler.Invoke(MethodInfo methodInfo, InvocationContext context) in /_/src/Microsoft.Diagnostics.Repl/Command/CommandProcessor.cs:line 272
   at Microsoft.Diagnostics.Repl.CommandProcessor.Handler.System.CommandLine.Invocation.ICommandHandler.InvokeAsync(InvocationContext context) in /_/src/Microsoft.Diagnostics.Repl/Command/CommandProcessor.cs:line 231
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass2_0.<<InvokeAsync>b__0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseErrorReporting>b__16_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseSuggestDirective>b__7_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseParseDirective>b__6_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationExtensions.<>c.<<UseHelp>b__14_0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.CommandLine.Invocation.InvocationExtensions.<>c__DisplayClass5_0.<<UseExceptionHandler>b__0>d.MoveNext()

For some reason the process stared to OOM when I used the 32 bit version of the .NET runtime to launch the tool (I have a dump)

davidfowl avatar Oct 03 '19 02:10 davidfowl