Skip to content

'dotnet-dump analyze' crashes when loading core dump #3003

Closed

Description

@moomiji

Description

bash-5.1# dotnet-dump collect -p 1 --type Mini -o ./1
Writing dump to /1
Complete

bash-5.1# ls -alSh
total 1.5G
-rw-------   1 root root 1.5G Apr 12  core_20220412_012637
-rw-------   1 root root  15M Apr 12  1

bash-5.1# dotnet-dump analyze 1
Loading core dump: 1 ...
Unhandled exception: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentException: An item with the same key has already been added. Key: 3421085696 (Parameter 'key')
   at System.Collections.Generic.SortedList`2.Add(TKey key, TValue value)
   at Microsoft.Diagnostics.Runtime.Utilities.ElfCoreFile.LoadFileTable()
   at Microsoft.Diagnostics.Runtime.CoredumpReader.EnumerateModules()
   at Microsoft.Diagnostics.Runtime.Utilities.LinuxDefaultSymbolLocator..ctor(IDataReader reader)
   at Microsoft.Diagnostics.Runtime.DataTarget..ctor(CustomDataTarget customTarget)
   at Microsoft.Diagnostics.Runtime.DataTarget.LoadDump(String displayName, Stream stream, CacheOptions cacheOptions, Boolean leaveOpen)
   at Microsoft.Diagnostics.Runtime.DataTarget.LoadDump(String filePath, CacheOptions cacheOptions)
   at Microsoft.Diagnostics.Tools.Dump.Analyzer.Analyze(FileInfo dump_path, String[] command) in /_/src/Tools/dotnet-dump/Analyzer.cs:line 65
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Span`1& arguments, Signature sig, Boolean constructor, Boolean wrapExceptions)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Delegate.DynamicInvokeImpl(Object[] args)
   at System.Delegate.DynamicInvoke(Object[] args)
   at System.CommandLine.Invocation.ModelBindingCommandHandler.InvokeAsync(InvocationContext context)
   at System.CommandLine.Invocation.InvocationPipeline.<>c__DisplayClass4_0.<<BuildInvocationChain>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseErrorReporting>b__21_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass16_0.<<UseHelp>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass25_0.<<UseVersionOption>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass23_0.<<UseTypoCorrections>b__0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseSuggestDirective>b__22_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseParseDirective>b__20_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<UseDebugDirective>b__11_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c.<<RegisterWithDotnetSuggest>b__10_0>d.MoveNext()
--- End of stack trace from previous location ---
   at System.CommandLine.Builder.CommandLineBuilderExtensions.<>c__DisplayClass14_0.<<UseExceptionHandler>b__0>d.MoveNext()

Configuration

Running in Container (mcr.microsoft.com/dotnet/sdk:6.0.201-alpine3.14-arm64v8).

bash-5.1# dotnet --info
.NET SDK (reflecting any global.json):
 Version:   6.0.201
 Commit:    ef40e6aa06

Runtime Environment:
 OS Name:     alpine
 OS Version:  3.14
 OS Platform: Linux
 RID:         alpine.3.14-arm
 Base Path:   /usr/share/dotnet/sdk/6.0.201/

Activity

  1. added
    bug
    on Apr 11, 2022
  2. mikelle-rogers commented on Apr 13, 2022

    @mikelle-rogers
    Member

    @moomiji Thank you for reporting this issue. We are working through issues and will look into this one as soon as possible.

  3. self-assigned this
    on Apr 13, 2022
  4. added this to the .NET 7.0 milestone on Apr 13, 2022
  5. mikem8361 commented on May 3, 2022

    @mikem8361
    Contributor

    Is there any way you could attach the core dump? Zip it up to make it smaller?

  6. moomiji commented on May 9, 2022

    @moomiji
    Author

    Hi @mikem8361 ,

    I zipped a core dump file which attached by dotnet-dump collect --type Mini.
    core_20220509_154002.zip

  7. mikem8361 commented on May 16, 2022

    @mikem8361
    Contributor

    This should be fixed now. It may be a month or so before our next tools release that includes this fix.

  8. ghost locked as resolved and limited conversation to collaborators on Jun 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugdotnet-dump

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions