-
Notifications
You must be signed in to change notification settings - Fork 383
Description
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:
diagnostics/src/Tools/dotnet-gcdump/DotNetHeapDump/DotNetHeapDumpGraphReader.cs
Lines 510 to 513 in a584d05
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:
and
Exception 2:
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.