cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Memory dump of a dotnet app hosted in Kubernetes

aszymanski
Newcomer

We triggerd memory dump file of dotnet application hosted in kubernetes. The container is linux based.
As a result we have dotnet.core file which can't be opened via Visual Studio or PerfView.

Visual Studio throws
"The file is not a valid Managed Linux Core Dump (Specified cast is not valid)"

PerfView throws
"HeapDump Error: Unable to open process dump. HeapDump only supports converting Windows process dumps."

The question is how this file is generated and how to open/analyze it?

3 REPLIES 3

radek_jasinski
DynaMight Guru
DynaMight Guru

Hi @aszymanski 

Dynatrace doesn't explicitly say what mechanism it uses to collect the memory dump. However, I suspect it is PerfCollect or they obtain it using .NET CLI tools. The dump should be able to be opened with PerfView or Visual Studio (which the documentation also indicates).

I suggest setting up a ticket with support, as there may be a problem with the correct DT configuration on your environment.

Regards,

Radek

Have a nice day!

Gurpreet_Juttla
Dynatrace Enthusiast
Dynatrace Enthusiast

Hi

When triggering a memory dump via the Dynatrace UI then the OneAgent's internal mechanism to create memory dumps is used (`oneagentdumpproc`). This works fine for .NET dumps on Windows, but unfortunately not for Linux memory dumps. There are improvements in this area planned, however I cannot give an ETA.

If you want to analyze .NET memory dumps with VS you have to capture those memory dumps with either createdump [1] (it is shipped with every .NET runtime installation) or dotnet-dump [2].

 

[1] https://github.com/dotnet/runtime/blob/main/docs/design/coreclr/botr/xplat-minidump-generation.md

[2] https://learn.microsoft.com/en-us/dotnet/core/diagnostics/dotnet-dump

 

Best regards,
Gurpreet

Wow. Thanks for this!

I was going through the docs and we basically followed everything there, however we couldn't get the correct dump file.

I wonder why this is not mentioned in the docs as a MAJOR limitation. 🤔 
https://docs.dynatrace.com/docs/shortlink/memory-dumps#limitations

 

Featured Posts