Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402.
-
Upload
whitney-terry -
Category
Documents
-
view
220 -
download
2
Transcript of Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402.
Debugging Microsoft ASP.NET and other .NET issues using WinDbg and Microsoft Visual Studio .NET 2010
Tess FerrandezASP.NET Escalation EngineerMicrosoftSession Code: WIA402
Problem types
Hangs and performance issuesMemory leaks and high memory usageCrashesExceptions
Tools and Resources
WinDbg.exe and adplus.vbs (Included with Debugging Tools for Windows)SOS.dll (Included with .NET framework)Debug Diagnostics 1.1Tinyget.exe(Included in the IIS Resource kit)Microsoft Visual Studio .NET 2010Blog: If broken it is, fix it you shouldhttp://blogs.msdn.com/Tess
Hangs and performance issues
Idle hangs Waiting for external resourcesWaiting for locks/sync objects
Busy hangsCPU Intensive operationsHigh CPU in GCApplication restarts
Step-By-Step
1. Reproduce problem2. Look at perf data (CPU Usage etc.)3. Get a memory dump (or two)4. Examine threads
a) (Idle) Find blocking calls or calls to external resources
b) (Busy) Look for active threads
Memory leaks and high mem. usage
Managed (.NET)Cache / SessionHeavy Large Object Heap (LOH) usageBlocked finalizerGC heap fragmentation (pinning)
Loader heap issuesDynamic assembliesLots of apps in one app pool
Step-By-Step
1. Look at perf data (.NET / Native or Loader heap issue)
2. Get a memory dump (or two)3. Check if the finalizer is blocked4. Dump the .NET GC Heap and determine where
the memory is going 5. Dump objects, or !gcroot them to see why they
are not being collected
Crashes
OutOfMemoryExceptionStackOverflowExceptionExecutionEngineException.NET and Native Heap corruptionUnhandled exceptionsRecycling
Exceptions
Tracing exceptionsDumping on exceptions
Step-By-Step
1. Check Event logs2. Disable Recycling3. Set up a Debug Diag rule to capture dumps on
exceptions or crash4. Reproduce5. Look at stacks/exceptions in the dump (and/or
in log files)
question & answer
www.microsoft.com/teched
Sessions On-Demand & Community
http://microsoft.com/technet
Resources for IT Professionals
http://microsoft.com/msdn
Resources for Developers
www.microsoft.com/learning
Microsoft Certification & Training Resources
Resources
Track Resources
Blogs:http://blogs.msdn.com/tesshttp://blogs.msdn.com/johanhttp://blogs.msdn.com/carlochttp://blogs.msdn.com/debuggingtoolbox/http://www.wintellect.com/cs/blogs/jrobbins/default.aspxhttp://blogs.msdn.com/profiler/
Tools:Debugging tools for windowsTinyget – IIS Resource KitDebug Diag 1.1Microsoft Visual Studio .NET 2010Red Gate .NET Reflector
Complete an evaluation on CommNet and enter to win an Xbox 360 Elite!
© 2009 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.