Live instances at 0

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

Moderator: SciTech Software

Live instances at 0

Postby YeeManB » Wed Oct 14, 2009 8:35 pm

Hi,

I'm running .NET Memory Profiler 3.5 on windows 2008 Server with .NET 3.5. I am profiling a custom application.

When I watch the real time window for a specific type, live instances is always = 0. The total instances go up and down with GC but never to 0.

From experience and on screen representation by my application, live instances shouldn't ever be 0.

Is this a known issue? I notice that other types have what appears to be correct non-zero live instances counts.

Thanks!
YeeManB
YeeManB
 
Posts: 3
Joined: Wed Oct 14, 2009 8:26 pm

Postby Andreas Suurkuusk » Thu Oct 15, 2009 7:28 am

No, this is not a known issue. Can you provide some more information about the type that has zero live instances?

  • How are the instances created, and how are they kept alive?
  • Is it possible for you to provide an application that reproduces this issue?
  • Have you collected a heap snapshot? Is the number of live instances in the snapshot greater than zero?

Thanks for any information you can provide.
Best regards,

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

Postby YeeManB » Thu Oct 15, 2009 1:09 pm

1) The instances are new'ed; they are regular .NET objects. They are stored in System.Collections.Generic.Dictionary<ulong, myObjectType>

2) I just tried making a standalone repro and it would not repro. But I can still consistently repro this in my app from the Memory Profiler. I caught a screen shot of Memory Profiler RealTime graph which shows the problem which I can send you if you email me at yeemanb@rhotrading.com.

3) Yes, I've done a regular heap snapshot and a gen 0 heap snapshot. They both showed live instances are 0 for my type.

I would really appreciate if you can look into this as I would like a workaround if possible.


Thanks!
YeeManB
 
Posts: 3
Joined: Wed Oct 14, 2009 8:26 pm

Postby Andreas Suurkuusk » Mon Oct 19, 2009 7:15 pm

Thanks for the information you sent us. The problem is caused by a bug in the .NET runtime, which occurs when server GC is enabled. The bug has been confirmed by Microsoft, and it has been corrected in .NET Framework 4.0. I don't know if they will correct it for the current .NET version, so we have written a workaround to mitigate the problem.

We have built a new release of .NET Memory Profiler, which contains the workaround. We need to do a little more testing before releasing it officially, but in the meantime you can download it from http://memprofiler.com/MemProfilerInstaller3_5_100.msi (or http://memprofiler.com/MemProfilerInsta ... -64bit.msi for the 64-bit version).

If there's still a problem in the new version, please tell us.
Best regards,

Andreas Suurkuusk
SciTech Software AB
Andreas Suurkuusk
 
Posts: 980
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 3 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

cron