Red Gate forums :: View topic - Bug with viewing memory profile created from BuggyBits
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Memory Profiler Previous Versions
ANTS Memory Profiler Previous Versions forum

Bug with viewing memory profile created from BuggyBits

Search in ANTS Memory Profiler Previous Versions forum
Post new topic   Reply to topic
Jump to:  
Author Message
sseely



Joined: 08 Aug 2009
Posts: 5

PostPosted: Sat Aug 15, 2009 8:49 pm    Post subject: Bug with viewing memory profile created from BuggyBits Reply with quote

Repro steps:
1. Install BuggyBits from http://blogs.msdn.com/tess/pages/net-debugging-demos-information-and-setup-instructions.aspx
2. Start Memory Profiler, setup to debug at http://localhost/BuggyBits.
3. Navigate to http://localhost/BuggyBits/News.aspx
4. Take Memory Snapshot
5. using tinyget (IIS 6.0 Resource Library), run tinyget -srv:localhost -uri:/BuggyBits/News.aspx -threads:50 -loop:20
6. Take MemorySnapshot when above completes
7. Select Common Leak Indicators/Kept in memory only by event handlers
8. Should see "Specified argument was out of the range of valid values. Parameter name:identifier"
System.ArgumentOutOfRangeException
at dq.ObjectWithIdentifier(Int32 identifier)
at bv.b()
at bv.a()
at bv.get_ConnectedToRootStrong()
at bq.get_ConnectedToStrongRoots()
at bc.get_ConnectedToStrongRoots()
at cX.Select(IGraphAnalysis analysis, IComparisonAnalysis comparison)
at cx.Select(IGraphAnalysis analysis, IComparisonAnalysis comparison)
at cW.Select(IGraphAnalysis analysis, IComparisonAnalysis comparison)
at cy.Select(IGraphAnalysis analysis, IComparisonAnalysis comparison)
at cW.Select(IGraphAnalysis analysis, IComparisonAnalysis comparison)
at e.a(IFilterPanelState , ChosenInClassGraph , IGraphAnalysis , ISnapshotComparison , Boolean )
at RedGate.Memory.Controller.ControllerState.ControllerState.get_FilteredCurrentObjects()
at RedGate.Memory.Controller.ControllerState.ControllerState.get_CategorisedCurrentObjects()
at N.a()
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at i.a(StateUpdateType )
at i.a(ControllerState )
at w.a(Object , GenericEventArgs`1 )
at W.<>c__DisplayClass3.<.ctor>b__1()
at O.b()

Alternative insteadof step 8:
8. Go to class list
9. Select class name: news_aspx
10. Select Class Reference Explorer for news_aspx. Get the following:
Tried to memory map a region beyond the end of the file
Parameter name: length
Actual value was 1008576
Details:
Tried to memory map a region beyond the end of the file.Parameter name: lengthActual value was 1008576.
System.ArgumentOutOfRangeException
at j.Map(Int64 start, Int32 length)
at bb.ReverseReferenceTable(IEnumerable`1 references)
at aO.FillReferencedByCache(ap cache)
at aN.EnsureReferenceCacheAvailable()
at aN.ObjectReferencedBy(Int32 objId)
at dx.<get_ReferencedBy>d__8.MoveNext()
at cM.<GetObjects>d__0.MoveNext()
at cp.a()
at cp.get_Categories()
at p.a(q , Boolean , NextStepOnPathDelegate , IObjectSet , DefaultGraphNodes , DefaultGraphEdges )
at p.c(q , DefaultGraphNodes , DefaultGraphEdges )
at p.b(q , DefaultGraphNodes , DefaultGraphEdges )
at p.a()
at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
at i.a(StateUpdateType )
at i.a(ControllerState )
at al.a(Object , GenericEventArgs`1 )
at aq.<>c__DisplayClass3.<.ctor>b__1()
at O.b()
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Mon Aug 17, 2009 5:29 pm    Post subject: Reply with quote

Hi, thanks for the error report. I've had success with profiling BuggyBits on most systems so I'm sure we can get to the bottom of this. I'm investigating using the tinyget utility. In the meantime, are you able to test on an x64 machine? If that works then I think we have a issue with overflow somewhere.
Back to top
View user's profile Send private message
sseely



Joined: 08 Aug 2009
Posts: 5

PostPosted: Mon Aug 17, 2009 5:58 pm    Post subject: Reply with quote

This issue appears on a Win 7 x64 box.
4GB RAM
Dell Studio XPS M13.
Back to top
View user's profile Send private message
Chris.Allen



Joined: 12 Mar 2009
Posts: 591

PostPosted: Tue Aug 18, 2009 3:43 pm    Post subject: Reply with quote

Thanks. I couldn't get it not to work but my colleagues could. It has really helped us reproduce an issue we've been searching hard for so thank you. And watch this space, we should have some updates soon...
Back to top
View user's profile Send private message
AndrewH



Joined: 17 Aug 2006
Posts: 137

PostPosted: Wed Aug 19, 2009 11:18 am    Post subject: Reply with quote

I've been looking into this, and it appears to be an issue caused by a bug in the .NET profiling interface. Some of the int32 arrays being allocated by BuggyBits are not being reported by .NET as objects to the profiler, although the objects that reference them are (and are apparently still valid as objects and not candidates for garbage collection). I suspect there's a configuration element to this issue as well, which is why it does not show up on everyone's system.

You can see this yourself by looking at the class list and comparing the count of System.Int32[] objects to News_aspx objects: there should be at least as many arrays as pages, but when this bug occurs there are typically around 100 'missing' arrays.

I'm looking into ways to work around this; unfortunately, it's not easy to recover the missing results, which means that they will likely appear as free space.

What I have found that works is disabling the server garbage collector as described here: http://support.microsoft.com/kb/911716 - I'm not sure if the bug is directly connected to this. There may still be circumstances where this can happen with workstation GC, and this is not an ideal fix as it changes the garbage collector behaviour.

This bug can also manifest as a CouldNotMapFileException, with an IOException code of 0x8 - the same workaround should work.
_________________
Andrew Hunter
Software Developer
Red Gate Software Ltd.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group