SlideShare a Scribd company logo
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.
Ad

Recommended

Common asp.net production issues rev
Common asp.net production issues rev
Tess Ferrandez
 
.Net debugging 2017
.Net debugging 2017
Tess Ferrandez
 
Perf by design
Perf by design
Tess Ferrandez
 
C# to python
C# to python
Tess Ferrandez
 
Memory Dump
Memory Dump
niteshitimpulse
 
Crash dump analysis - experience sharing
Crash dump analysis - experience sharing
James Hsieh
 
Windows Crash Dump Analysis
Windows Crash Dump Analysis
Microsoft TechNet - Belgium and Luxembourg
 
Writing malware while the blue team is staring at you
Writing malware while the blue team is staring at you
Rob Fuller
 
44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software
44CON
 
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON
 
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
 
Audit
Audit
Mark Ellzey Thomas
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
Michael Boman
 
[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
 
Debugging ZFS: From Illumos to Linux
Debugging ZFS: From Illumos to Linux
Serapheim-Nikolaos Dimitropoulos
 
How to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
jaredhaight
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller
 
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days
 
Red Gate .NET Reflector 8.2.0.7
Red Gate .NET Reflector 8.2.0.7
WendyLogan6
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
CTruncer
 
6.Temp & Rand
6.Temp & Rand
phanleson
 
Csi dot net (Hardcore .NET production debugging)
Csi dot net (Hardcore .NET production debugging)
Jonne Kats
 
Metasploit magic the dark coners of the framework
Metasploit magic the dark coners of the framework
Rob Fuller
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
Interview Question of Aspdotnet
Interview Question of Aspdotnet
MohitKumar1985
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
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
 
Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.
Alexander Kot
 

More Related Content

What's hot (16)

44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software
44CON
 
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON
 
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
 
Audit
Audit
Mark Ellzey Thomas
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
Michael Boman
 
[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
 
Debugging ZFS: From Illumos to Linux
Debugging ZFS: From Illumos to Linux
Serapheim-Nikolaos Dimitropoulos
 
How to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
jaredhaight
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller
 
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days
 
Red Gate .NET Reflector 8.2.0.7
Red Gate .NET Reflector 8.2.0.7
WendyLogan6
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
CTruncer
 
6.Temp & Rand
6.Temp & Rand
phanleson
 
Csi dot net (Hardcore .NET production debugging)
Csi dot net (Hardcore .NET production debugging)
Jonne Kats
 
Metasploit magic the dark coners of the framework
Metasploit magic the dark coners of the framework
Rob Fuller
 
44CON 2014 - Breaking AV Software
44CON 2014 - Breaking AV Software
44CON
 
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON London 2015 - 15-Minute Linux Incident Response Live Analysis
44CON
 
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
 
Indicators of compromise: From malware analysis to eradication
Indicators of compromise: From malware analysis to eradication
Michael Boman
 
[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
 
How to drive a malware analyst crazy
How to drive a malware analyst crazy
Michael Boman
 
Introducing PS>Attack: An offensive PowerShell toolkit
Introducing PS>Attack: An offensive PowerShell toolkit
jaredhaight
 
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Attacker Ghost Stories (CarolinaCon / Area41 / RVASec)
Rob Fuller
 
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Экспресс-анализ вредоносов / Crowdsourced Malware Triage
Positive Hack Days
 
Red Gate .NET Reflector 8.2.0.7
Red Gate .NET Reflector 8.2.0.7
WendyLogan6
 
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
What Goes In Must Come Out: Egress-Assess and Data Exfiltration
CTruncer
 
6.Temp & Rand
6.Temp & Rand
phanleson
 
Csi dot net (Hardcore .NET production debugging)
Csi dot net (Hardcore .NET production debugging)
Jonne Kats
 
Metasploit magic the dark coners of the framework
Metasploit magic the dark coners of the framework
Rob Fuller
 

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

.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
Interview Question of Aspdotnet
Interview Question of Aspdotnet
MohitKumar1985
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
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
 
Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.
Alexander Kot
 
Android memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdf
VishalKumarJha10
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
Brian Lyttle
 
A client-side vulnerability under the microscope!
A client-side vulnerability under the microscope!
Nelson Brito
 
SVR302_Pearson Windows crash dump analysis
SVR302_Pearson Windows crash dump analysis
deepak475367
 
Evolution of computers aaaaaaaaaaaaaaaaaaaaaaaaaaa
Evolution of computers aaaaaaaaaaaaaaaaaaaaaaaaaaa
dilshanweeraratnelk
 
How to Build a Pure Evil Magento Module
How to Build a Pure Evil Magento Module
AOE
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Camilo Alvarez Rivera
 
Linux Recovery
Linux Recovery
Víctor Capetillo
 
Mind the gap - Troopers 2016
Mind the gap - Troopers 2016
Casey Smith
 
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Source Conference
 
the productive programer: mechanics
the productive programer: mechanics
elliando dias
 
LogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log Standardization
Anton Chuvakin
 
SANS Digital Forensics and Incident Response Poster 2012
SANS Digital Forensics and Incident Response Poster 2012
Rian Yulian
 
EPM Logs 101 - Hyperion Focus 17
EPM Logs 101 - Hyperion Focus 17
Datavail
 
.NET Debugging Tips and Techniques
.NET Debugging Tips and Techniques
Bala Subra
 
.Net Debugging Techniques
.Net Debugging Techniques
Bala Subra
 
Interview Question of Aspdotnet
Interview Question of Aspdotnet
MohitKumar1985
 
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
The Dirty Little Secrets They Didn’t Teach You In Pentesting Class
Rob Fuller
 
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
 
Bsides Tampa Blue Team’s tool dump.
Bsides Tampa Blue Team’s tool dump.
Alexander Kot
 
Android memory analysis Debug slides.pdf
Android memory analysis Debug slides.pdf
VishalKumarJha10
 
Production Debugging at Code Camp Philly
Production Debugging at Code Camp Philly
Brian Lyttle
 
A client-side vulnerability under the microscope!
A client-side vulnerability under the microscope!
Nelson Brito
 
SVR302_Pearson Windows crash dump analysis
SVR302_Pearson Windows crash dump analysis
deepak475367
 
Evolution of computers aaaaaaaaaaaaaaaaaaaaaaaaaaa
Evolution of computers aaaaaaaaaaaaaaaaaaaaaaaaaaa
dilshanweeraratnelk
 
How to Build a Pure Evil Magento Module
How to Build a Pure Evil Magento Module
AOE
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Camilo Alvarez Rivera
 
Mind the gap - Troopers 2016
Mind the gap - Troopers 2016
Casey Smith
 
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Forensic Memory Analysis of Android's Dalvik Virtual Machine
Source Conference
 
the productive programer: mechanics
the productive programer: mechanics
elliando dias
 
LogChaos: Challenges and Opportunities of Security Log Standardization
LogChaos: Challenges and Opportunities of Security Log Standardization
Anton Chuvakin
 
SANS Digital Forensics and Incident Response Poster 2012
SANS Digital Forensics and Incident Response Poster 2012
Rian Yulian
 
EPM Logs 101 - Hyperion Focus 17
EPM Logs 101 - Hyperion Focus 17
Datavail
 
Ad

More from Tess Ferrandez (11)

funwithalgorithms.pptx
funwithalgorithms.pptx
Tess Ferrandez
 
Debugging .NET apps
Debugging .NET apps
Tess Ferrandez
 
CSI .net core - debugging .net applications
CSI .net core - debugging .net applications
Tess Ferrandez
 
Fun421 stephens
Fun421 stephens
Tess Ferrandez
 
Facenet - Paper Review
Facenet - Paper Review
Tess Ferrandez
 
AI and Ethics - We are the guardians of our future
AI and Ethics - We are the guardians of our future
Tess Ferrandez
 
Deep learning and computer vision
Deep learning and computer vision
Tess Ferrandez
 
A practical guide to deep learning
A practical guide to deep learning
Tess Ferrandez
 
Notes from Coursera Deep Learning courses by Andrew Ng
Notes from Coursera Deep Learning courses by Andrew Ng
Tess Ferrandez
 
A developers guide to machine learning
A developers guide to machine learning
Tess Ferrandez
 
My bot has a personality disorder
My bot has a personality disorder
Tess Ferrandez
 
funwithalgorithms.pptx
funwithalgorithms.pptx
Tess Ferrandez
 
CSI .net core - debugging .net applications
CSI .net core - debugging .net applications
Tess Ferrandez
 
Facenet - Paper Review
Facenet - Paper Review
Tess Ferrandez
 
AI and Ethics - We are the guardians of our future
AI and Ethics - We are the guardians of our future
Tess Ferrandez
 
Deep learning and computer vision
Deep learning and computer vision
Tess Ferrandez
 
A practical guide to deep learning
A practical guide to deep learning
Tess Ferrandez
 
Notes from Coursera Deep Learning courses by Andrew Ng
Notes from Coursera Deep Learning courses by Andrew Ng
Tess Ferrandez
 
A developers guide to machine learning
A developers guide to machine learning
Tess Ferrandez
 
My bot has a personality disorder
My bot has a personality disorder
Tess Ferrandez
 
Ad

Recently uploaded (20)

CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Complete WordPress Programming Guidance Book
Complete WordPress Programming Guidance Book
Shabista Imam
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
Why Edge Computing Matters in Mobile Application Tech.pdf
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Complete Guideliness to Build an Effective Maintenance Plan.ppt
Complete Guideliness to Build an Effective Maintenance Plan.ppt
QualityzeInc1
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Jamie Coleman
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Canva Pro Crack Free Download 2025-FREE LATEST
Canva Pro Crack Free Download 2025-FREE LATEST
grete1122g
 
Streamlining CI/CD with FME Flow: A Practical Guide
Streamlining CI/CD with FME Flow: A Practical Guide
Safe Software
 
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
CodeCleaner: Mitigating Data Contamination for LLM Benchmarking
arabelatso
 
Complete WordPress Programming Guidance Book
Complete WordPress Programming Guidance Book
Shabista Imam
 
Sysinfo OST to PST Converter Infographic
Sysinfo OST to PST Converter Infographic
SysInfo Tools
 
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
Modern Platform Engineering with Choreo - The AI-Native Internal Developer Pl...
WSO2
 
University Campus Navigation for All - Peak of Data & AI
University Campus Navigation for All - Peak of Data & AI
Safe Software
 
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
On-Device AI: Is It Time to Go All-In, or Do We Still Need the Cloud?
Hassan Abid
 
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
OpenChain Webinar - AboutCode - Practical Compliance in One Stack – Licensing...
Shane Coughlan
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
AI for PV: Development and Governance for a Regulated Industry
AI for PV: Development and Governance for a Regulated Industry
Biologit
 
Why Edge Computing Matters in Mobile Application Tech.pdf
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Advance Doctor Appointment Booking App With Online Payment
Advance Doctor Appointment Booking App With Online Payment
AxisTechnolabs
 
Complete Guideliness to Build an Effective Maintenance Plan.ppt
Complete Guideliness to Build an Effective Maintenance Plan.ppt
QualityzeInc1
 
HYBRIDIZATION OF ALKANES AND ALKENES ...
HYBRIDIZATION OF ALKANES AND ALKENES ...
karishmaduhijod1
 
Automated Testing and Safety Analysis of Deep Neural Networks
Automated Testing and Safety Analysis of Deep Neural Networks
Lionel Briand
 
Decipher SEO Solutions for your startup needs.
Decipher SEO Solutions for your startup needs.
mathai2
 
Introduction to Agile Frameworks for Product Managers.pdf
Introduction to Agile Frameworks for Product Managers.pdf
Ali Vahed
 
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
From Code to Commerce, a Backend Java Developer's Galactic Journey into Ecomm...
Jamie Coleman
 

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

  • #2: 2/12/2021 10:03 AM
  • #3: 2/12/2021 10:03 AM
  • #4: 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
  • #13: 2/12/2021 10:03 AM
  • #14: 2/12/2021 10:03 AM
  • #15: 2/12/2021 10:03 AM
  • #16: 2/12/2021 10:03 AM
  • #19: 2/12/2021 10:03 AM