mem profiler hangs analyzing compared snapshots

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

Moderator: SciTech Software

mem profiler hangs analyzing compared snapshots

Postby JohnL4 » Thu Jan 15, 2015 7:19 pm

Howdy,

I'm trying to run the mem profiler on our app (a pretty big multi-app-domain, mixed winforms/wpf C++/VB.net/C# monster), and the profiler is hanging after my first snapshot. The status bar at the bottom of the window says "Analysing compared snapshots... (Trivial duplicate instances at depth 1: 1,196,628 duplicates found, 429,821 possible duplicates left.)"

The memprofiler process is occupying 25% of my CPU (4 CPU machine, so I'm guessing some thread has gone into a loop). I have noticed that if I let it sit for about 25 minutes, it does finish, but then I get a hang when I take the 2nd snapshot and after about 25 minutes and sometimes the profiler crashes. (A 25-minute wait between snapshots obviously makes this tool unworkable for me.)

Any ideas?

Profiler 4.6.86.0
OS is Win 7 Enterprise SP 1.

Thanks!
JohnL4
 
Posts: 4
Joined: Thu Jan 15, 2015 7:10 pm

Re: mem profiler hangs analyzing compared snapshots

Postby Andreas Suurkuusk » Fri Jan 16, 2015 4:43 pm

The duplicate instances analysis is performed in the background and should not prevent you from working with the snapshot, or collecting additional snapshots. Is the profiler window completely stuck during the analysis?

Duplicate instances detection can take quite long time, but trivial duplicates should normally be investigated much faster. In your case, the duplicates analysis is probably finished (for trivial duplicates at depth 1), and the found duplicates are being added to the analysis information. This should normally not take too long time, but if there are many sets of duplicates (e.g. if each set only consists of two instances), there can be a performance issue. This is something we will try to improve in a future release.

Are you running the profiler as a 32-bit or 64-bit process? If you are running as a 32-bit process, i.e. on a 32-bit OS or within Visual Studio, then the crash can be caused by an out-of-memory error, due to too many duplicate instances set (and a large snapshot).

To avoid this problem you can try to disable the automatic duplicate analysis by selecting "Profiler->Auto-detect duplicates->None", before collecting the snapshot. I hope this helps.
Best regards,

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

Re: mem profiler hangs analyzing compared snapshots

Postby JohnL4 » Fri Jan 16, 2015 5:49 pm

Thanks, helpful answer.

Profiler UI remains responsive during analysis of first snapshot. However, it becomes completely frozen immediately upon attempting to collect the 2nd snapshot.

Profiler is being run standalone on a 64-bit OS. I'm going to assume that means it's the 64-bit version. (Also, in task manager, NetMemProfiler.exe does NOT have a "*32" next to it (as other entries do), so I'll assume that means it's 64-bit.)

Auto duplicate detection off works around the problem.

I assume there's no log file I can send y'all, or you'd have already mentioned it.

John.
JohnL4
 
Posts: 4
Joined: Thu Jan 15, 2015 7:10 pm

Re: mem profiler hangs analyzing compared snapshots

Postby Andreas Suurkuusk » Mon Jan 19, 2015 7:51 am

Thanks for the update. Yes, as soon as you run the standalone profiler on a 64-bit OS, it will run as 64-bit process.

I looked at the code where the duplicate instances issues are being added, and it appears that this task it not automatically cancelled when a new snapshot is requested. That's why the second snapshot freezes the UI, since it waits for the analysis to finish or be cancelled. This issue will be fixed in the next release.

A log-file named ProfilerLog.txt is stored in the folder "C:\Users\<user name>\AppData\Local\SciTech\MemProfiler4\Logs". If the profiler crashes or shows an error message, this log-file can include useful information. If you get a crash, it would be good if you sent the log-file to us.
Best regards,

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


Return to Using .NET Memory Profiler

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] 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