.NET Debugging for the Production Environment Part 1: Diagnosing application issues Brad Linscott Premier Field Engineering.

Slides:



Advertisements
Similar presentations
Advanced Troubleshooting with Debug Diagnostics on IIS 6
Advertisements

User Guide TE Connectivity Data Collection Tool (DCT) January 2012.
1 IDX. 2 What you will learn: What IDX is Why its important How to use it Tips and tricks Introduction Q & A.
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
State of New Jersey Department of Health and Senior Services Patient Safety Reporting System Module 2 – New Event Entry.
List and Search Grants Chapter 2. List and Search Grants 2-2 Objectives Understand the option My Grants List Grant Screen Viewing a Grant Understand the.
0 - 0.
ADDING INTEGERS 1. POS. + POS. = POS. 2. NEG. + NEG. = NEG. 3. POS. + NEG. OR NEG. + POS. SUBTRACT TAKE SIGN OF BIGGER ABSOLUTE VALUE.
MULT. INTEGERS 1. IF THE SIGNS ARE THE SAME THE ANSWER IS POSITIVE 2. IF THE SIGNS ARE DIFFERENT THE ANSWER IS NEGATIVE.
Addition Facts
Patterns and sequences We often need to spot a pattern in order to predict what will happen next. In maths, the correct name for a pattern of numbers is.
Home site map Recommended Internet Explorer 7 Browser Settings (1 of 10) you will not see the test timer If your browsers settings are not set up correctly,
Using Family Connection Online Resource for Planning & Advising.
1 Chapter 16 Tuning RMAN. 2 Background One of the hardest chapters to develop material for Tuning RMAN can sometimes be difficult Authors tried to capture.
9 Copyright © 2006, Oracle. All rights reserved. Automatic Performance Management.
Advanced Tuning: Unconventional Solutions to Everyday Problems Robert L Davis.
GETTING STARTED WITH WINDOWS COMMUNICATION FOUNDATION 4.5 Ed Jones & Grey Guindon.
©2011 Quest Software, Inc. All rights reserved. Steve Walch, Senior Product Manager Blog: November, 2011 Partner Training Webcast.
1 Web-Enabled Decision Support Systems Access Introduction: Touring Access Prof. Name Position (123) University Name.
Contents This guide is designed to help you perform key functions in CAR by providing high level descriptions of how they were done in SAM followed.
ECATS RCCA CAMP PROCESS ENHANCEMENTS
Advanced Scan Tool Diagnostics Steve Zack Jim Wilson
Jonathan Berry President & CEO Leveraging a Help Desk as part of a Hyperion Center of Excellence Copyright © 2014, Accelatis.
O X Click on Number next to person for a question.
Delegated Admin Tool Edit User Profile Training Module.
CAR Training Module PRODUCT REGISTRATION and MANAGEMENT Module 2 - Register a New Document - Without Alternate Formats (Run as a PowerPoint show)
1 Directed Depth First Search Adjacency Lists A: F G B: A H C: A D D: C F E: C D G F: E: G: : H: B: I: H: F A B C G D E H I.
Page 1 October 31, 2000 An Introduction to Large-Scale Software Development Steve Varnau Core HP-UX Operation October 31, 2000.
.NET 3.5 SP1 New features Enhancements Visual Studio 2008 SP1 New features Enhancements Additional features/enhancements.
 Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance  Copyright.
Error-handling using exceptions
User Query Control An Enhancement For AS/400 Query On The IBM iSeries from  Copyright I/O International, 2005 Skip Intro.
Twenty C# Questions Explained Gerry O’Brien Content Development Manager Paul Pardi Senior Content Pub Manager.
Addition 1’s to 20.
Test B, 100 Subtraction Facts
Week 1.
Vanderbilt Business Objects Users Group 1 Linking Data from Multiple Sources.
Useful Tips  How to quickly verify if you are logged on or not  Get the full navigation menu window for e- application  What is a time-out and how to.
O X Click on Number next to person for a question.
South Dakota Library Network MetaLib Management Basics Updating Resources South Dakota Library Network 1200 University, Unit 9672 Spearfish, SD
ACD Training.
Use the tools support uses.
Presentation 10 SOAP on the Microsoft Platform (.NET)
South Dakota Library Network MetaLib User Interface South Dakota Library Network 1200 University, Unit 9672 Spearfish, SD © South Dakota.
Advanced Troubleshooting with Debug Diagnostics on IIS 6 Draft 2.5 5/13/06 NameTitleGroup Microsoft Corporation.
Recognize This?. SPA’ Opinion Objectives After attending this presentation, you will be able to: Know when to use Server Performance Advisor Assist customers.
MCITP Guide to Microsoft Windows Server 2008 Server Administration (Exam #70-646) Chapter 14 Server and Network Monitoring.
DEV450 Visual Studio: Best Practices For Debugging Managed Applications Habib Heydarian Scott Nonnenberg Program Managers Microsoft Corporation.
Hands-On Microsoft Windows Server 2008 Chapter 11 Server and Network Monitoring.
Windows Server 2008 Chapter 11 Last Update
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
Tess Ferrandez ASP.NET Escalation Engineer Microsoft Session Code: WIA402.
Min Kwan Park Test Tech Lead Visual C# QA team. Fail fast To-Dos for fail fast Analyze issues Information for further action Q&A Agenda.
2 Debugging Performance Issues, Memory Issues and Crashes in.net Applications Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session.
HOW-TO | CIF CONSULT | Redouane BELBAHRI Informatica Create a crash dump using “Debug Diag”
Understanding Perfmon The Performance Testing Tool >>>>>>>>>>>>>>>>>>>>>>
Reset and Recycle IIS Reset Application Pool Management Error Codes New HTTP Sub-status codes Custom/Detailed Errors Tracing in IIS7 and.
This is the main tracing and diagnostics presentation. Very important that this be practical and useful information. IT Pro audience is very.
Msdevcon.ru#msdevcon. ИЗ ПЕРВЫХ РУК: ДИАГНОСТИКА ПРИЛОЖЕНИЙ С ПОМОЩЮ ИНСТРУМЕНТОВ VISUAL STUDIO 2012 MAXIM GOLDIN Senior Developer, Microsoft.
Page 1 Monitoring, Optimization, and Troubleshooting Lecture 10 Hassan Shuja 11/30/2004.
2 Common ASP.NET production issues and how to troubleshoot them with WinDbg Tess Ferrandez - Norlander Support Escalation Engineer Microsoft Session Code:
Troubleshooting Workflow 8 Raymond Cruz, Software Support Engineer.
Maintaining and Updating Windows Server 2008 Lesson 8.
Performance Optimization in Dynamics AX Chris Haley, Microsoft.
Troubleshooting Tools
CLR MD A New Swiss Army Knife tool for Advanced Debugging
Debugging Discussion [troubleshooting][managed][Native]
.NET Debugging for the Production Environment
.NET Debugging for the Production Environment
Testing, debugging, and using support libraries
Presentation transcript:

.NET Debugging for the Production Environment Part 1: Diagnosing application issues Brad Linscott Premier Field Engineering

Agenda Problem Resolution Framework Hangs Exceptions Performance Problems 2

3 The first step to successfully troubleshoot any issue is to define the problem. Once defined, we should have a good idea of what tools to use. This session focuses on the ‘Defining & Gathering’ stages. Problem Resolution Framework

4 Most application-related issues can be grouped into one of three buckets: Non-responsiveness (i.e., “hang”) Exception/crash Performance problem (e.g., memory pressure, slow execution, etc.) Crashes, hangs, and leaks… oh my! HangsExceptions Performance problems

5 An application which doesn’t respond when it’s expected to respond is said to “hang”. For example: ASP.NET app that doesn’t respond to client requests. Windows app doesn’t respond regardless of which buttons/dropdowns/etc. are clicked. Hanging (Non-responsive) applications Hangs Exceptions Performance problems

6 DebugDiag, ADPlus, other tools that dump For DebugDiag, see us/library/ff aspx#Usage and search for “creating manual user dumps” us/library/ff aspx#Usage Key is to obtain dump *during* hang behavior –Can use perfmon/event log to validate dump was taken during the problem time Two dumps ~ 30 seconds apart may be needed –Rarely needed for low cpu, but can be invaluable for high cpu hangs Troubleshooting tools for hanging apps

7 Perfmon – supporting data Cpu usage, status of requests (ASP.NET) Key is to ensure perfmon log encompasses time frame before & during problem symptoms Event logs, IIS logs, debugger (e.g., DebugDiag) log Troubleshooting tools for hanging apps, cont’d

8 Exceptions can take two forms: Fatal: Commonly called a ‘crash’. Symptom is a process that unexpectedly shuts down/ disappears. Technical term is ‘2 nd Chance Exception’ Non-fatal: Technical term is ‘1 st Chance Exception’. Process doesn’t crash, but stays alive Exceptions and crashing applications Hangs Exceptions Performance problems

9 DebugDiag, ADPlus, other tools that dump For DebugDiag, see us/library/ff aspx#Usage to learn about Crash Ruleshttp://msdn.microsoft.com/en- us/library/ff aspx#Usage For ADPlus usage, see or Windows Debuggers help file (debugger.chm) Key is to obtain dump *when* exception is thrown – 0.1 seconds later is often too late –Default dump type from DD and AD+ provide stacks, heap info, and disassembly to help find root cause. Troubleshooting tools for exceptions

10 Sometimes getting a dump file isn’t possible/acceptable If getting a dump is too intrusive, getting just call stacks may be sufficient –Managed Stack Explorer is an example (.NET stacks only, not recommended for production) For ASP.NET, Health Monitoring may be an option. Troubleshooting tools for exceptions, cont’d

11 Sometimes a dump file isn’t the best data. We may need to learn about process execution prior to the exception –Live debug –Intrusive, not ideal for production –Must have a somewhat-reliable repro Event logs Application logs Troubleshooting tools for exceptions, cont’d

12 Application Performance issues include many issues High memory/Memory pressure Slow performance Higher-than-expected cpu usage (not 100%) More Application performance issues HangsExceptions Performance problems

13 High memory Very common.NET-related issue When combined with other problem symptoms (e.g., unexpected behavior, app instability, higher-than- expected cpu, etc.), resolve memory pressure first Use debugger (e.g., DD) for full user mode dump –Key is to dump *during* problem symptom Use perfmon to validate, along with a dump –Perfmon not mandatory, but can streamline the troubleshooting process Troubleshooting application performance

14 High memory For native memory leaks, LeakTrack in DebugDiag is a popular troubleshooting tool. us/library/ff aspx#Usage us/library/ff aspx#Usage For managed (e.g.,.NET) memory pressure, one or more dumps is usually sufficient –If perfmon shows memory growing over time, then multiple dumps over time can aide troubleshooting –Using LeakTrack for managed memory issues isn’t helpful Troubleshooting application perf, cont’d

15 Slow performance Profiler –VS Profiler (only for VS-compiled apps) Tracing Multiple dumps over time IIS Logs (IIS apps only) Perfmon –ASP.Net monitoring: us/library/ms aspxhttp://msdn.microsoft.com/en- us/library/ms aspx Troubleshooting application perf, cont’d

16 Higher than expected cpu usage Different from a high/100% cpu hang Profiler –VS Profiler (VS-compiled only) DebugDiag Troubleshooting application perf, cont’d

17 App is slow (provide time measurements to differentiate “slow” from “normal”) Application spins Anything vague, such as “application pool had to be reset”, “app isn’t working”, etc. Examples of poor problem definitions

18 Summary: Data to capture Problem definitionRequired data“Nice-to-have” data¹ HangDump2 dumps ~ 30 sec apart, Perfmon, event log, debugger log Crash/ExceptionDumpPerfmon log, debugger log, event log High Native MemoryDump with LeakTrack Perfmon log; 2 dumps far enough apart to compare memory delta High.NET MemoryDumpPerfmon log; 2 dumps far enough apart to compare memory delta Slow Execution²Profiler trace, IIS Logs, Perfmon log ¹For initial data gathering. Pending initial data analysis, may change from “nice-to-have” to “required” for subsequent rounds of data gathering. ²For slow execution, required data will vary depending on application type (e.g., ASP.NET, WCF, etc.) and other factors.

19 Step1 to troubleshooting the problem is to define the problem Data needs to be gathered to define (then sometimes to verify diagnosis) The right tools & correct tool configuration is imperative to accurately define the problem & make progress towards root cause determination Once the problem is accurately defined, the next step is to analyze data to find root cause. Summary – Diagnosing Application Issues