Skip to content

gcdump fails to collect dump under high load. #2404

@iliamosko

Description

@iliamosko

Description

When running dotnet-gcdump collect on a application that is using a large amount of memory the following exception occurs:

Exception:

63.5s: [Error] Exception during gcdump: System.ApplicationException: ETL file shows the start of a heap dump but not its completion.
at DotNetHeapDumpGraphReader.ConvertHeapDataToGraph() in //src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs:line 512
at Microsoft.Diagnostics.Tools.GCDump.EventPipeDotNetHeapDumper.DumpFromEventPipe(CancellationToken ct, Int32 processID, MemoryGraph memoryGraph, TextWriter log, Int32 timeout, DotNetHeapInfo dotNetInfo) in /
/src/Tools/dotnet-gcdump/DotNetHeapDump/EventPipeDotNetHeapDumper.cs:line 205
[ 63.5s: Done Dumping .NET heap success=False]
Failed to collect gcdump. Try running with '-v' for more information.

I've looked into the source code and it seems like the exception gets thrown here:

if (!m_ignoreEvents)
{
throw new ApplicationException("ETL file shows the start of a heap dump but not its completion.");
}

I have created a repo to try and reproduce this issue:
Repo

This application creates objects and loads the memory. Collecting a gcdump when the application is around 200-800mb in memory usage, gcdump completes successfully. However, when the application reaches to about 1300mb the above exception occurs.

There are 2 other exceptions that I have come across while trying to reproduce the issue but I am not sure how relevant they are to the initial problem:

Exception 1:

image

and

Exception 2:

image

Any information as to why these exceptions are occurring would be a huge help.

Configuration

Tool: dotnet-gcdump
OS: LINUX and Win10
Environment: Issue happens either when containerized or as a standalone application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions