analyzing dump file finalization queue

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.

Moderator: SciTech Software

analyzing dump file finalization queue

Postby nstoyanov » Thu Feb 05, 2015 7:17 am

Hi,

I tried analyzing a dump file with your software (5.0 preview) to detect leaked SqlConnection types. It showed one instance in memory in the Overview page and 45 unreachable instances.

When I looked at the dump file with WinDbg it showed ~7000 instances in memory nearly all of which were in the finalization queue.

Is there anyway to examine the instances in the finalization queue with MemoryProfiler?
nstoyanov
 
Posts: 3
Joined: Thu Feb 05, 2015 6:50 am

Re: analyzing dump file finalization queue

Postby Andreas Suurkuusk » Thu Feb 05, 2015 7:48 am

.NET Memory Profiler is supposed to present instances in the finalization queue when importing memory dumps. Depending on which NET runtime version the process was running under, the profiler might fail to identify a root as the finalization queue. However, it should always be able to find the instances that exist in the managed heaps, and at least present the root as <root> (if it fails to identify the finalization queue).

I don't know why it fails to show ~7000 instances of SqlConnection in your memory dump. If there is any possibility for you to provide us with the memory dump, we can hopefully resolve this issue quickly. If you can provide us with the memory dump, please contact us at support@scitech.se for further instructions.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 964
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Re: analyzing dump file finalization queue

Postby nstoyanov » Thu Feb 05, 2015 7:53 am

I forgot to mention that we are using .NET 4.5. The memory dump is 700MB zipped up, will that cause a problem?
nstoyanov
 
Posts: 3
Joined: Thu Feb 05, 2015 6:50 am

Re: analyzing dump file finalization queue

Postby Andreas Suurkuusk » Fri Feb 06, 2015 5:11 pm

We have received the memory dump and imported it into .NET Memory Profiler. I see two reachable instances of SqlConnection and 7,491 unreachable instances. The SOS command !FinalizeQueue says that there are 7,493 instances of SqlConnection that are finalizable (including all objects ready for finalization). In all 16 heaps there are zero instances ready for finalization, according to SOS. So the numbers presented by .NET Memory Profiler and SOS match. You have 7,493 instances of SqlConnection; two of them reachable and 7,491 instances that are no longer reachable. The unreachable instances must either have been finalized already, or the finalizer has been suppressed.

However, the number you included in your post was one reachable instance and 45 unreachable instances of SqlConnection. Did you send me the same memory dump file as the one you imported?

The numbers presented for the memory dump does look a bit odd. You have 2.2 GB of reachable instances and 1.3 GB of unreachable instances. That's quite a high overhead (even though the overhead can be high when using the server GC), so we will continue to investigate the memory dump to make sure that we don't fail to identify some instances as reachable.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 964
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden

Re: analyzing dump file finalization queue

Postby nstoyanov » Mon Feb 09, 2015 7:01 am

I reloaded the dump and it turns out the machine run out of disk space, probably due to the virtual memory file growing too large. I reloaded the dump file and it shows 2 live instances and 7491 unreachable ones.
nstoyanov
 
Posts: 3
Joined: Thu Feb 05, 2015 6:50 am

Re: analyzing dump file finalization queue

Postby Andreas Suurkuusk » Tue Feb 10, 2015 10:55 am

Thanks for the update. We will try to detect the disk-full scenario and present an error message in a future version of the profiler, instead of silently loading a partial memory dump.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 964
Joined: Wed Mar 02, 2005 7:53 pm
Location: Sweden


Return to Using .NET Memory Profiler

Who is online

Users browsing this forum: No registered users and 2 guests

SciTech Software logo

© Copyright 2001-2016. SciTech Software AB
All rights reserved.


SciTech Software AB
Kartvägen 21
SE-175 46 Järfälla
Sweden


E-mail: mail@scitech.se

Telephone: +46-706868081