I have a memory leak problem on a AWS dockerized microservice deployed with ECS. I wanted to analyze the dump with DotMemory so I used exec to connect to the container, gcore to save the dump and then transfer that dump to an S3 bucket so I could download it. Problem is, when I open the dump everything is "Unresolved" and I can't understand what's going on.
I've tried to run the same microservice locally and take a memory dump with Windows Task Manager and everything worked fine. Sadly, since is a complex system I can't replicate locally exactly what's happening when it's deployed so I need to create a readable dump from my deployed microservice. How do I fix the issue?
This issue might appear if the dump is missing the segments with metadata.
See core man section "Controlling which mappings are written to the core dump" for more information.
In order to get a proper dump of the dotNet process coredump_filter should be set to at least 0x3f.
You can check what the current filter set for your process by executing:
To set the proper coredump_filter type:
<pid> should be replaced with your process ID, for example:
UPDATE: May 10, 2023
I've managed to collect a full dump with all the necessary information by using
createdump
utility:The
-u
option tellscreatedump
to generate a full memory dump, including all memory-mapped files. Note that this will result in a very large dump file for applications that use a lot of memory or have many memory-mapped files.Example: