1 / 6

.NET Debugging for the Production Environment

.NET Debugging for the Production Environment. Part 5: Debugging High CPU Hangs. Brad Linscott. Premier Field Engineering. Agenda. High CPU hangs Data to collect in production environment Common debugger commands for high cpu hangs Demo. High CPU Hangs.

burt
Download Presentation

.NET Debugging for the Production Environment

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. .NET Debugging for the Production Environment Part 5: Debugging High CPU Hangs Brad Linscott Premier Field Engineering

  2. Agenda • High CPU hangs • Data to collect in production environment • Common debugger commands for high cpu hangs • Demo

  3. High CPU Hangs • When a single process consumes 90% or more cpu • Symptoms may include • Application that is non-responsive/very slow to respond • If it’s a desktop application consuming all the cpu on the box, then multiple apps on the desktop may be visually slow to respond • Quick check – Task Manager, Processes tab

  4. Data to Collect for High CPU Hangs • If you can do a live debug, then break into the process during the high cpu and debug it. Otherwise… • “Ideal” data • Two or more dumps 30 seconds apart during the high cpu hang • Perfmon that includes Process & Thread objects • Beware of log file size over long time period • Minimum required data • One dump during the high cpu hang

  5. Common Debugger Commands for High CPU Hangs • !runaway – beware of jumping to conclusions • To find the offending function(s), use stack & thread commands • Any variant of ‘k’ (kb, kn, kp, k, etc.) for native stacks • !psscorX.clrstack for managed stack (X=2, 4) • Other thread/stack commands • Sometimes we need help finding the executing line of code in the offending function • u;!u

  6. Demo: Debugging high cpu hang

More Related