Heap snapshot collection error

Use this forum for questions on how to use .NET Memory Profiler and how to analyse memory usage.
Post Reply
markjhvt
Posts: 2
Joined: Mon Dec 17, 2007 6:49 pm

Heap snapshot collection error

Post by markjhvt » Mon Apr 27, 2009 3:07 pm

I've run into a problem collecting a heap snapshot from a web service hosted under IIS. I'm profiling as an ASP.Net page, even though it's actually a WCF service, which has worked fine before.

I'm getting an error when I try to collect a heap snapshot:

The operation failed with the following error:
Unable to read beyond the end of the stream.

This is with verison 3.1 of the profiler. Running on Windows Server 2008 x64. It has worked before for WCF services without problem, but it's not liking this one for some reason. The only topic I could find relating to this implies a fix was made in a previous version (3.0, I think) of the profiler.

So... any help would be appreciated. Let me know what other information is required.

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

Post by Andreas Suurkuusk » Tue Apr 28, 2009 7:10 pm

We have implemented some minor fixes related to snapshot collection in .NET Memory Profiler 3.1. Maybe these fixes will affect your problem. Can you download the latest build (v3.1.336) and see if there's still a problem? It can be downloaded from http://memprofiler.com/MemProfilerInsta ... -64bit.msi.

If this doesn't help, it would be good if you could provide us with some additional log-files. The log-files are created by providing the "/log:<path>" command line argument to the profiler executable (e.g. using the Run command and entering "C:\Program files\SciTech\NetMemProfiler3\NetMemProfiler.exe" /log:c:\MemProfilerLogs).

This will create three log-files: ProfilerLog.txt, ProfilerClientLog.txt and AssertLog.txt. The log-files will be created in the folder specified by <path>, e.g. C:\MemProfilerLogs.

Please send them to support@scitech.se (preferably zipped). Hopefully they will provide enough information to solve this problem.

Also, what is the full version number of your .NET runtime?
Best regards,

Andreas Suurkuusk
SciTech Software AB

Chaitanya Bisale

Re: Heap snapshot collection error

Post by Chaitanya Bisale » Thu Jan 07, 2010 11:30 am

Hi,

This problem seems to persist in version 3.5 of the Memoery Profiler as well. We have a site license and I have already reported this error to the email address support@scitech.se -- and this was in OCt 09. Until today, to my disappointment, there has been no reply from your side and I have more and more people contacting me in my organization as to the fix for this problem. Please provide a solution at the earliest.

chai
Posts: 16
Joined: Tue Feb 24, 2009 11:37 pm

Re: Heap snapshot collection error

Post by chai » Thu Jan 07, 2010 11:46 am

To add to this previous post, the application being profiles uses .NET 2.0. It is a standalone application.

Details:
Comparing 2 sessions of an application. Comparing failed saying that reading beyond end of stream was being attempted. Then I tried simply comparing the session against the empty session so that i can export the contents on to Excel for comparison, when this other error came up. This end-of-stream error and related errors are costing approx 2 hours of profiling and waiting time for each user that encounters them.

Here are error details:
The error report contents are as shown:
NullReferenceException(StackHash=0x309e2587) V3.5.100.0
Report time: 2009-10-30 14:29:17.346
Stacktrace:
at SciTech.NetMemProfiler.Analysis.AnalysisResult.GetTypeIssues(ManagedType type)
at SciTech.NetMemProfiler.Controls.MergedInstanceSetList.AssignAnalysisResult(AnalysisResult analysisResult)
at SciTech.NetMemProfiler.Controls.TypesAndResourcesPage.OnAnalysisResultChanged(EventArgs e)
at SciTech.NetMemProfiler.Controls.ProfilerPage.mainView_AnalysisResultChanged(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at SciTech.NetMemProfiler.EventInvoker.RaiseEvent(Delegate method, Object sender, EventArgs eventArgs, Boolean alwaysAsynchronous)
at SciTech.NetMemProfiler.EventInvoker.RaiseEvent(Delegate method, Object sender, EventArgs eventArgs)
at SciTech.NetMemProfiler.Presenters.ProfilerMainPresenter.OnAnalysisResultChanged(EventArgs e)
at SciTech.NetMemProfiler.Presenters.ProfilerMainPresenter.comparison_AnalyseComparisonCompleted(Object sender, AnalyseComparisonCompletedEventArgs e)
at SciTech.NetMemProfiler.ProfilerComparison.b(Object A_0, AsyncCompletedEventArgs A_1)

Message=Object reference not set to an instance of an object.
Data=System.Collections.ListDictionaryInternal

Log file contents:
2009-10-30 14:28:38.5807|1|INFO|SciTech.NetMemProfiler.ProfilerApplicationCore|ProfilerApplicationCore.ctor enter
2009-10-30 14:28:38.6588|1|INFO|SciTech.NetMemProfiler.ProfilerFolders|Getting native base path
2009-10-30 14:28:38.6744|1|INFO|SciTech.NetMemProfiler.ProfilerFolders|Returning native base path: C:\Program Files\SciTech\NetMemProfiler3\32Bit
2009-10-30 14:28:38.6744|1|INFO|SciTech.NetMemProfiler.DebuggingTools|ValidateDbgEngFolder: 'D:\Program Files\Debugging Tools for Windows (x86)' for 32bit
2009-10-30 14:28:38.6900|1|INFO|SciTech.NetMemProfiler.DebuggingTools|DbgEng folder 'D:\Program Files\Debugging Tools for Windows (x86)' validated.
2009-10-30 14:28:38.7369|1|INFO|SciTech.NetMemProfiler.ProfilerApplicationCore|ProfilerApplicationCore.ctor leave
2009-10-30 14:28:42.0025|1|INFO|SciTech.NetMemProfiler.Controls.ProjectsControl|application_LoadedProjectsChanged
2009-10-30 14:28:44.8931|1|INFO|SciTech.NetMemProfiler.ProfilerMainForm|Perfoming command: barSubItem1
2009-10-30 14:28:51.7368|1|INFO|SciTech.NetMemProfiler.ProfilerMainForm|Perfoming command: openProfilerProject
2009-10-30 14:28:51.8931|1|INFO|SciTech.NetMemProfiler.ProfilerApplicationImpl|Browsing project file
2009-10-30 14:29:04.9242|6|INFO|SciTech.NetMemProfiler.ProfilerComparison|RetrieveSnapshotData enter
2009-10-30 14:29:04.9555|6|INFO|SciTech.NetMemProfiler.ProfilerComparison|RetrieveSnapshotDataFromFile enter
2009-10-30 14:29:06.0492|6|INFO|SciTech.NetMemProfiler.ProfilerComparison|New PrimarySession
2009-10-30 14:29:06.0805|6|INFO|SciTech.NetMemProfiler.SessionFileReader|ReadSnapshots enter
2009-10-30 14:29:06.1899|6|INFO|SciTech.NetMemProfiler.SessionFileReader|ReadAllInstances enter
2009-10-30 14:29:06.1899|6|INFO|SciTech.NetMemProfiler.InstanceHeap|ReadInstances enter
2009-10-30 14:29:06.2055|6|INFO|SciTech.NetMemProfiler.InstanceHeap| ReleaseHeap begin, releaseMemory=False
2009-10-30 14:29:06.2055|6|INFO|SciTech.NetMemProfiler.InstanceHeap| ReleaseHeap end
2009-10-30 14:29:11.8617|6|INFO|SciTech.NetMemProfiler.InstanceHeap| Update instance data offsets time elapsed: 00:00:00.0056848
2009-10-30 14:29:12.0023|6|INFO|SciTech.NetMemProfiler.InstanceHeap|ReadInstances leave
2009-10-30 14:29:12.0023|6|INFO|SciTech.NetMemProfiler.InstanceHeap|Time elapsed: 00:00:05.7986017
2009-10-30 14:29:12.0804|6|INFO|SciTech.NetMemProfiler.SessionFileReader|ReadAllInstances leave
2009-10-30 14:29:12.0961|6|INFO|SciTech.NetMemProfiler.SessionFileReader|ReadSnapshots leave
2009-10-30 14:29:12.0961|6|INFO|SciTech.NetMemProfiler.ProfilerComparison|RetrieveSnapshotDataFromFile leave
2009-10-30 14:29:12.0961|6|INFO|SciTech.NetMemProfiler.ProfilerComparison|RetrieveSnapshotData leave
2009-10-30 14:29:12.2523|6|ERROR|SciTech.NetMemProfiler.ProfilerComparison|Type (50360868) of instance is not available in UpdateComparedTypeInstances
2009-10-30 14:29:12.2679|6|ERROR|SciTech.NetMemProfiler.ProfilerComparison|Type (41113) of instance is not available in UpdateComparedTypeInstances
2009-10-30 14:29:15.0648|9|INFO|SciTech.NetMemProfiler.Analysis.UndisposedAnalyser|static UndisposedAnalyser() enter
2009-10-30 14:29:15.0804|9|INFO|SciTech.NetMemProfiler.Analysis.UndisposedAnalyser|Reading disposable types definition files: C:\Program Files\SciTech\NetMemProfiler3\Application data\DisposableTypes.disposedef
2009-10-30 14:29:15.2054|9|INFO|SciTech.NetMemProfiler.Analysis.UndisposedAnalyser|static UndisposedAnalyser() leave

OS version: Microsoft Windows NT 5.1.2600 Service Pack 3
Framework version: 2.0.50727.3082
IP Address: 139.22.43.218

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

Re: Heap snapshot collection error

Post by Andreas Suurkuusk » Thu Jan 07, 2010 1:25 pm

I'm sorry, but I have not been able to find any e-mail to support@scitech.se regarding this problem. Maybe the e-mail got stuck in a spam-filter or didn't reach us for some other reason. We answer all support request within one business day (normally within a few hours). We recommend that you resend your e-mail if you have not received a reply within one business day.

Anyway, this is an error that we would like to solve as soon as possible. The error report indicates that the session file is corrupt for some reason and this is probably not related to the problem originally reported by markjhvt.

Is it possible for you to send us a session file that causes this error? How reproducible is it (e.g. can you perform some actions that will likely cause it to occur)? If you can send us a session file, please contact us at support@scitech.se, and I will provide you with information about how to upload the session file.

Finally, I recommend that you upgrade to the latest version of .NET Memory Profiler. The latest official release is v3.5.115, but we will probably release v3.5.125 later today. You can download the latest official version from http://memprofiler.com/download.aspx. Version 3.5.125 can be downloaded from http://memprofiler.com/MemProfilerInstaller3_5_125.msi (or http://memprofiler.com/MemProfilerInsta ... -64bit.msi for the 64-bit version).
Best regards,

Andreas Suurkuusk
SciTech Software AB

chai
Posts: 16
Joined: Tue Feb 24, 2009 11:37 pm

Re: Heap snapshot collection error

Post by chai » Thu Jan 07, 2010 1:36 pm

Thanks for the reply -- today, a colleague of mine who had the same end-of-stream problem said that, with the upgrade to 115, he could now compare snapshots successfully -- therefore, I will download 125 today and try to see if the problem persists.

In the meanwhile, I am forwarding my original emails to andreas@scitech.se and support@scitech.se for your reference.

Post Reply

Who is online

Users browsing this forum: No registered users and 16 guests