Presentation is loading. Please wait.

Presentation is loading. Please wait.

2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session.

Similar presentations


Presentation on theme: "2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session."— Presentation transcript:

1

2 2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session Code: TLA05-IS

3 3 Tools and Resources BuggyBits from http://blogs.msdn.com/Tesshttp://blogs.msdn.com/Tess Debugging Tools for Windows SOS.dll Process Explorer Visual Studio Team System Test TinyGet Performance Monitor Our brains

4 4 Memory Dumps Mini Dumps Module Information Threads Information Stacks Full Dumps Full memory and handle data Unloaded module information Thread Time info adplus –crash –pn adplus –hang –pn

5 5 SOS.dll 1.1 2.0 For a list of the commands available in sos.dll run !sos.help.load clr10\sos.cordll -u –lp.load \sos.dll or.loadby sos mscorwks.dll

6 6 Symbols Symbols are used to translate an address into a more understandable function or variable name WinDbg uses deferred symbol loading Three types of symbols Private Public Export

7 7 Symbols (cont.) Symbols can be stored directly in directories or on symbol servers Symbols are not neccesary to translate.NET function names.sympath srv*downstreamstore*http://msdl.microsoft.com/download /symbols Or.symfix downstreamstore

8 8 Performance issues Low CPU => waiting for external resources and/or locks High CPU => busy server, infinite loops or high CPU in GC

9 9 Performance issues High or Low CPU? Get memory dump(s) Look at threads VSTS Test and Profiling is good if you can repro in a test environment

10 10 Crashes Recycling Unhandled exceptions Stack overflow Fatal Execution Engine Exceptions Heap Corruption Out of memory

11 11 Crashes and Exceptions Check out the eventviewer Disable recycling options Get memory dump(s) Look at faulting stacks or logs if neccesary Use TrackClr.cfg to track exceptions during testing

12 12 High memory usage and OOM Caching and Session State “Unexpected roots” Blocked finalizer DataSet serialization Large viewstate Assembly leaks with XmlSerializer Pinned objects

13 13 High memory usage and OOM What are you leaking? (native,.net, assemblies) Take multiple dumps when memory is raising and compare Check the finalizer Check the Large object heap Try to group “leaking” objects Figure out why they are sticking around (rooted)

14 14 Garbage collection Gen 0 Gen 1 MarkSweepCompact Gen 2 31256798104 111213141516

15 15 Remember... There are tools out there to track down these types of issues http://blogs.msdn.com/Tess Track exceptions during testing with TrackCLR.cfg Debugging Tools for Windows

16 www.microsoft.com/teched Tech·Talks Tech·Ed Bloggers Live SimulcastsVirtual Labs http://microsoft.com/msdn Developer’s Kit, Licenses, and MORE! Resources for Developers

17 Complete an evaluation on CommNet and enter to win! 1 Year Subscription!

18 18 © 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.


Download ppt "2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session."

Similar presentations


Ads by Google