Debugging performance issues, memory issues and crashes in .net applications rev

Tess Ferrandez
Tess FerrandezPrincipal Software Engineer at Microsoft
Debugging performance issues, memory issues and crashes in .net applications rev
2
Debugging Performance Issues,
Memory Issues and Crashes in
.net Applications
Tess Ferrandez - Norlander
Support Escalation Engineer
Microsoft
Session Code: TLA05-IS
3
Tools and Resources
BuggyBits from http://blogs.msdn.com/Tess
Debugging Tools for Windows
SOS.dll
Process Explorer
Visual Studio Team System Test
TinyGet
Performance Monitor
Our brains
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 <processname.exe>
adplus –hang –pn <processname.exe>
5
SOS.dll
1.1
2.0
For a list of the commands available in sos.dll
run !sos.help
.load clr10sos
.cordll -u –lp <framework dir>
.load <framework dir>sos.dll
or
.loadby sos mscorwks.dll
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
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
Performance issues
Low CPU => waiting for external resources
and/or locks
High CPU => busy server, infinite loops or high
CPU in GC
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
Crashes
Recycling
Unhandled exceptions
Stack overflow
Fatal Execution Engine Exceptions
Heap Corruption
Out of memory
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
High memory usage and OOM
Caching and Session State
“Unexpected roots”
Blocked finalizer
DataSet serialization
Large viewstate
Assembly leaks with XmlSerializer
Pinned objects
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
Garbage collection
Gen 0
Gen 1
Mark
Sweep
Compact
Gen 2
3
1 2 5 6 7 9
8 10
4 11 12 13 14 15 16
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
www.microsoft.com/teched
Tech·Talks Tech·Ed Bloggers
Live Simulcasts Virtual Labs
http://microsoft.com/msdn
Developer’s Kit, Licenses, and MORE!
Resources for Developers
Complete an
evaluation on
CommNet and
enter to win!
1 Year
Subscription!
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.
1 of 18

Recommended

Common asp.net production issues rev by
Common asp.net production issues revCommon asp.net production issues rev
Common asp.net production issues revTess Ferrandez
187 views24 slides
.Net debugging 2017 by
.Net debugging   2017.Net debugging   2017
.Net debugging 2017Tess Ferrandez
3.5K views30 slides
Perf by design by
Perf by designPerf by design
Perf by designTess Ferrandez
156 views185 slides
C# to python by
C# to pythonC# to python
C# to pythonTess Ferrandez
2.4K views91 slides
Memory Dump by
Memory DumpMemory Dump
Memory Dumpniteshitimpulse
1K views13 slides
Crash dump analysis - experience sharing by
Crash dump analysis - experience sharingCrash dump analysis - experience sharing
Crash dump analysis - experience sharingJames Hsieh
22K views61 slides

More Related Content

What's hot

44CON 2014 - Breaking AV Software by
44CON 2014 - Breaking AV Software44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software44CON
2.6K views146 slides
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis by
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis44CON
992 views40 slides
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug... by
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...Shanmuga KS
25.5K views71 slides
Audit by
AuditAudit
AuditMark Ellzey Thomas
1.6K views44 slides
Indicators of compromise: From malware analysis to eradication by
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradicationMichael Boman
1.4K views29 slides
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers - by
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers - [ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers -
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers - Zoltan Balazs
5.1K views63 slides

What's hot(16)

44CON 2014 - Breaking AV Software by 44CON
44CON 2014 - Breaking AV Software44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software
44CON2.6K views
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis by 44CON
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON992 views
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug... by Shanmuga KS
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...
Crash (or) Hang dump analysis using WinDbg in Windows platform by K.S.Shanmug...
Shanmuga KS25.5K views
Indicators of compromise: From malware analysis to eradication by Michael Boman
Indicators of compromise: From malware analysis to eradicationIndicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
Michael Boman1.4K views
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers - by Zoltan Balazs
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers - [ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers -
[ENG] OHM2013 - The Quest for the Client-Side Elixir Against Zombie Browsers -
Zoltan Balazs5.1K views
How to drive a malware analyst crazy by Michael Boman
How to drive a malware analyst crazyHow to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman1.1K views
Introducing PS>Attack: An offensive PowerShell toolkit by jaredhaight
Introducing PS>Attack: An offensive PowerShell toolkitIntroducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
jaredhaight2.6K views
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec) by Rob Fuller
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller5.3K views
Экспресс-анализ вредоносов / Crowdsourced Malware Triage by Positive Hack Days
Экспресс-анализ вредоносов / Crowdsourced Malware TriageЭкспресс-анализ вредоносов / Crowdsourced Malware Triage
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days985 views
Red Gate .NET Reflector 8.2.0.7 by WendyLogan6
Red Gate .NET Reflector 8.2.0.7Red Gate .NET Reflector 8.2.0.7
Red Gate .NET Reflector 8.2.0.7
WendyLogan6391 views
What Goes In Must Come Out: Egress-Assess and Data Exfiltration by CTruncer
What Goes In Must Come Out: Egress-Assess and Data ExfiltrationWhat Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
CTruncer4.5K views
6.Temp & Rand by phanleson
6.Temp & Rand6.Temp & Rand
6.Temp & Rand
phanleson407 views
Csi dot net (Hardcore .NET production debugging) by Jonne Kats
Csi dot net (Hardcore .NET production debugging)Csi dot net (Hardcore .NET production debugging)
Csi dot net (Hardcore .NET production debugging)
Jonne Kats487 views
Metasploit magic the dark coners of the framework by Rob Fuller
Metasploit magic   the dark coners of the frameworkMetasploit magic   the dark coners of the framework
Metasploit magic the dark coners of the framework
Rob Fuller2.3K views

Similar to Debugging performance issues, memory issues and crashes in .net applications rev

.NET Debugging Tips and Techniques by
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and TechniquesBala Subra
2.1K views59 slides
.Net Debugging Techniques by
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging TechniquesBala Subra
4K views59 slides
Interview Question of Aspdotnet by
Interview Question of AspdotnetInterview Question of Aspdotnet
Interview Question of AspdotnetMohitKumar1985
852 views73 slides
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class by
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassRob Fuller
28.8K views94 slides
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp... by
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...DevOpsDays Tel Aviv
580 views18 slides
Bsides Tampa Blue Team’s tool dump. by
Bsides Tampa Blue Team’s tool dump.Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.Alexander Kot
141 views58 slides

Similar to Debugging performance issues, memory issues and crashes in .net applications rev(20)

.NET Debugging Tips and Techniques by Bala Subra
.NET Debugging Tips and Techniques.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra2.1K views
.Net Debugging Techniques by Bala Subra
.Net Debugging Techniques.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra4K views
Interview Question of Aspdotnet by MohitKumar1985
Interview Question of AspdotnetInterview Question of Aspdotnet
Interview Question of Aspdotnet
MohitKumar1985852 views
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class by Rob Fuller
The Dirty Little Secrets They Didn’t Teach You In Pentesting ClassThe Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller28.8K views
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp... by DevOpsDays Tel Aviv
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
How We Analyzed 1000 Dumps in One Day - Dina Goldshtein, Brightsource - DevOp...
Bsides Tampa Blue Team’s tool dump. by Alexander Kot
Bsides Tampa Blue Team’s tool dump.Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.
Alexander Kot141 views
Production Debugging at Code Camp Philly by Brian Lyttle
Production Debugging at Code Camp PhillyProduction Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
Brian Lyttle377 views
A client-side vulnerability under the microscope! by Nelson Brito
A client-side vulnerability under the microscope!A client-side vulnerability under the microscope!
A client-side vulnerability under the microscope!
Nelson Brito1.5K views
How to Build a Pure Evil Magento Module by AOE
How to Build a Pure Evil Magento ModuleHow to Build a Pure Evil Magento Module
How to Build a Pure Evil Magento Module
AOE 5.4K views
Introductiontoasp netwindbgdebugging-100506045407-phpapp01 by Camilo Alvarez Rivera
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Development Of A Simulation Management System by Heather Vargas
Development Of A Simulation Management SystemDevelopment Of A Simulation Management System
Development Of A Simulation Management System
Heather Vargas2 views
Mind the gap - Troopers 2016 by Casey Smith
Mind the gap  - Troopers 2016Mind the gap  - Troopers 2016
Mind the gap - Troopers 2016
Casey Smith2.9K views
Forensic Memory Analysis of Android's Dalvik Virtual Machine by Source Conference
Forensic Memory Analysis of Android's Dalvik Virtual MachineForensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Source Conference4.7K views
the productive programer: mechanics by elliando dias
the productive programer: mechanicsthe productive programer: mechanics
the productive programer: mechanics
elliando dias704 views
LogChaos: Challenges and Opportunities of Security Log Standardization by Anton Chuvakin
LogChaos: Challenges and Opportunities of Security Log StandardizationLogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log Standardization
Anton Chuvakin2.2K views
SANS Digital Forensics and Incident Response Poster 2012 by Rian Yulian
SANS Digital Forensics and Incident Response Poster 2012SANS Digital Forensics and Incident Response Poster 2012
SANS Digital Forensics and Incident Response Poster 2012
Rian Yulian3.1K views
EPM Logs 101 - Hyperion Focus 17 by Datavail
EPM Logs 101 - Hyperion Focus 17EPM Logs 101 - Hyperion Focus 17
EPM Logs 101 - Hyperion Focus 17
Datavail566 views
Analyzing .Net Application Memory Usage And Issues by Greg Sohl
Analyzing .Net Application Memory Usage And IssuesAnalyzing .Net Application Memory Usage And Issues
Analyzing .Net Application Memory Usage And Issues
Greg Sohl1.5K views
Prometheus for the traditional datacenter by Julien Pivotto
Prometheus for the traditional datacenterPrometheus for the traditional datacenter
Prometheus for the traditional datacenter
Julien Pivotto1.6K views

More from Tess Ferrandez

funwithalgorithms.pptx by
funwithalgorithms.pptxfunwithalgorithms.pptx
funwithalgorithms.pptxTess Ferrandez
46 views62 slides
Debugging .NET apps by
Debugging .NET appsDebugging .NET apps
Debugging .NET appsTess Ferrandez
950 views34 slides
CSI .net core - debugging .net applications by
CSI .net core - debugging .net applicationsCSI .net core - debugging .net applications
CSI .net core - debugging .net applicationsTess Ferrandez
872 views37 slides
Fun421 stephens by
Fun421 stephensFun421 stephens
Fun421 stephensTess Ferrandez
156 views36 slides
Facenet - Paper Review by
Facenet - Paper ReviewFacenet - Paper Review
Facenet - Paper ReviewTess Ferrandez
3.3K views43 slides
AI and Ethics - We are the guardians of our future by
AI and Ethics - We are the guardians of our futureAI and Ethics - We are the guardians of our future
AI and Ethics - We are the guardians of our futureTess Ferrandez
1.1K views71 slides

More from Tess Ferrandez(11)

CSI .net core - debugging .net applications by Tess Ferrandez
CSI .net core - debugging .net applicationsCSI .net core - debugging .net applications
CSI .net core - debugging .net applications
Tess Ferrandez872 views
AI and Ethics - We are the guardians of our future by Tess Ferrandez
AI and Ethics - We are the guardians of our futureAI and Ethics - We are the guardians of our future
AI and Ethics - We are the guardians of our future
Tess Ferrandez1.1K views
Deep learning and computer vision by Tess Ferrandez
Deep learning and computer visionDeep learning and computer vision
Deep learning and computer vision
Tess Ferrandez2.2K views
A practical guide to deep learning by Tess Ferrandez
A practical guide to deep learningA practical guide to deep learning
A practical guide to deep learning
Tess Ferrandez5.5K views
Notes from Coursera Deep Learning courses by Andrew Ng by Tess Ferrandez
Notes from Coursera Deep Learning courses by Andrew NgNotes from Coursera Deep Learning courses by Andrew Ng
Notes from Coursera Deep Learning courses by Andrew Ng
Tess Ferrandez346.4K views
A developers guide to machine learning by Tess Ferrandez
A developers guide to machine learningA developers guide to machine learning
A developers guide to machine learning
Tess Ferrandez16K views
My bot has a personality disorder by Tess Ferrandez
My bot has a personality disorderMy bot has a personality disorder
My bot has a personality disorder
Tess Ferrandez4.2K views

Recently uploaded

DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDeltares
8 views17 slides
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...Deltares
17 views12 slides
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionMárton Kodok
5 views55 slides
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 views24 slides
Keep by
KeepKeep
KeepGeniusee
75 views10 slides
WebAssembly by
WebAssemblyWebAssembly
WebAssemblyJens Siebert
37 views18 slides

Recently uploaded(20)

DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by Deltares
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
Deltares8 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action by Márton Kodok
Gen Apps on Google Cloud PaLM2 and Codey APIs in ActionGen Apps on Google Cloud PaLM2 and Codey APIs in Action
Gen Apps on Google Cloud PaLM2 and Codey APIs in Action
Márton Kodok5 views
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Headless JS UG Presentation.pptx by Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor7 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin95 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares10 views
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols by Deltares
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - DolsDSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
DSD-INT 2023 European Digital Twin Ocean and Delft3D FM - Dols
Deltares7 views
AI and Ml presentation .pptx by FayazAli87
AI and Ml presentation .pptxAI and Ml presentation .pptx
AI and Ml presentation .pptx
FayazAli8711 views
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra... by Marc Müller
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra....NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
.NET Developer Conference 2023 - .NET Microservices mit Dapr – zu viel Abstra...
Marc Müller38 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h... by Deltares
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
DSD-INT 2023 Exploring flash flood hazard reduction in arid regions using a h...
Deltares5 views

Debugging performance issues, memory issues and crashes in .net applications rev

  • 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/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 <processname.exe> adplus –hang –pn <processname.exe>
  • 5. 5 SOS.dll 1.1 2.0 For a list of the commands available in sos.dll run !sos.help .load clr10sos .cordll -u –lp <framework dir> .load <framework dir>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 Mark Sweep Compact Gen 2 3 1 2 5 6 7 9 8 10 4 11 12 13 14 15 16
  • 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 Simulcasts Virtual 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.

Editor's Notes

  1. 2/12/2021 10:03 AM
  2. 2/12/2021 10:03 AM
  3. 2/12/2021 10:03 AM
  4. 2/12/2021 10:03 AM
  5. 2/12/2021 10:03 AM
  6. 2/12/2021 10:03 AM
  7. 2/12/2021 10:03 AM
  8. 2/12/2021 10:03 AM
  9. 2/12/2021 10:03 AM
  10. 2/12/2021 10:03 AM
  11. 2/12/2021 10:03 AM
  12. 2/12/2021 10:03 AM