Can't Investigate Leaks when using Import Memory Dump

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
rsfoley
Posts: 3
Joined: Mon Jul 18, 2011 10:09 pm

Can't Investigate Leaks when using Import Memory Dump

Post by rsfoley » Mon Jul 18, 2011 10:18 pm

After importing a memory dump (which takes about 90 minutes to process 2GB file) I click on the "Investigate Memory Leaks" on the task list on the right but it just gives me an error message stating I must have a lest limited instance tracking enabled. I have FULL Instance Tracking enabled in the default settings, but it seems that the import didn't process any of the instance information.

The product system one of our customers has does not have .Net 4 installed so cannot use NmpCore and only can use the create dump option of a running process on the server. We are trying to get .Net 4 installed to see if NmpCore will improve on this but there are issues with change controls in place at our clients that prevents changes to their production environments with out long drawn out processes.

I have never used the import memory dump feature of the memory profiler so maybe I am doing something wrong, or maybe what is possible with a raw mini dump is limited and it is what it is. Please advise, thanks.

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Can't Investigate Leaks when using Import Memory Dump

Post by Andreas Suurkuusk » Tue Jul 19, 2011 8:26 am

Importing memory dumps can be very slow and that's one of the reasons for creating the NmpCore tool. But as you mention, it will not help if you cannot run under .NET Framework 4.0.

To use the "Investigate memory leak" guide, the profiler requires multiple snapshots, and instance movement must be tracked between the snapshots. Even though you can create multiple snapshots by importing multiple memory dumps, there is no instance tracking between the snapshots. A profiler only analyzes the memory at a single point in time when you import a memory dump and has no way of identifying which instances are the same between the memory dumps. The Full instance tracking setting has no effect on memory dump imports.

You can still use NmpCore at the customers system, but you should try to start the application using NmpCore and not attach to the process. Attaching to a .NET 2.0 process will just give you the same information as a memory dump import.
Best regards,

Andreas Suurkuusk
SciTech Software AB

rsfoley
Posts: 3
Joined: Mon Jul 18, 2011 10:09 pm

Re: Can't Investigate Leaks when using Import Memory Dump

Post by rsfoley » Tue Jul 19, 2011 4:18 pm

I would hope that if all the Memory Dumps were taking from the same instance of a running process then there should be a way to match up instances between them. I could be wrong as I am by no means an expert on what is contained and available within a memory Dump.

I will have to try to get a full version of the product installed in the environment to be able to attached and create the snapshots we need. Thanks for you help and explaining this to me.

rsfoley
Posts: 3
Joined: Mon Jul 18, 2011 10:09 pm

Re: Can't Investigate Leaks when using Import Memory Dump

Post by rsfoley » Tue Jul 19, 2011 4:32 pm

Without the tools available in v4.0 which seems to need the profiling API that .Net 4.0 provides to do the hard work for us, how would I use the tool "old school" to dig through memory dumps to find memory leaks? It seems like trying to find a needle in a haystack with out these extra tools to do the analysis.

Andreas Suurkuusk
Posts: 1028
Joined: Wed Mar 02, 2005 7:53 pm

Re: Can't Investigate Leaks when using Import Memory Dump

Post by Andreas Suurkuusk » Tue Jul 19, 2011 9:07 pm

Unfortunately there is no way to match instances between two snapshots when you import multiple memory dumps from the same process. The only identifier that exists is the instance location in memory, and that will change unpredictably between two snapshots.

Analyzing memory leaks using only memory dumps is a bit more difficult, mainly because you will not get information about specific new and removed instances, only delta information, and no allocation call stacks. The steps performed by the Investigate memory leak guide is similar to the How to... Find memory leaks section in the documentation. You can follow those instructions, but you will be missing some information.
Best regards,

Andreas Suurkuusk
SciTech Software AB

Post Reply

Who is online

Users browsing this forum: No registered users and 36 guests