Large Scale Crash Dump Analysis with SuperDump

Large Scale Crash
Dump Analysis
with SuperDump
Christoph Neumüller
Team Lead, .NET Agent @ Dynatrace
@discostu105
Goals of this talk
Show how the combination of interesting libraries and tools
evolved into a really useful tool.
Why SuperDump might be useful for you!
Make you aware which tools exist for crash & memory dumps.
1
2
3
What’s a “crash dump”?
a.k.a “memory dump”
Snapshot of a process
and the memory it
addresses at the time of
an unhandled exception
“Full Dump” & “Minidump”
MINIDUMP_TYPE -> what‘s included?
*.dmp
Linux: coredump
How to create a “crash dump”?
Windows Error Reporting (automatic, if enabled)
ProcDump (SysInternals, can dump on crash!)
dbghelp.dll API (MiniDumpWriteDump, it’s on you!)
Task Manager (manual, be aware of bitness!)
Process Explorer (SysInternals, manual)
dumpproc.exe –ma –e myapp.exe
Linux: /proc/sys/kernel/core_pattern
DebugDiag (automatic, if enabled)
How to analyze a “crash dump”?
WinDbg
DebugDiagGDB
IDA
Visual
Studio
Demo WinDbg & DebugDiag
Analyzing a crash dump requires
A proper setup (tools installed, symbol paths set)
Repetitive tasks (download crashdump, open <tool-of-choice>, run
setup-commands (load SOS))
Get relevant stacktraces and exception messages & copy over to JIRA
If crash-reason is not obvious, deeper analysis is needed!
-needs expertise!
Goal: reduce time for crash dump analysis
Situation @ our company
Our product is a mixture of C++, .NET, Java, NodeJs code. It runs
embedded in customer’s applications.
It runs mostly on Windows and Linux(but also AIX, Solaris, Mac, zLinux, zOS, ...)
Sometimes a monitored application would crash. Was it the agent’s fault?
Crash dumps are delivered by Tests, QA/Acceptance, Customers/Support,
automated crash detection
Our developers use Windows, Linux & Mac
So, how can we
automate things?
https://github.com/Microsoft/clrmd
ClrMD
https://github.com/Microsoft/clrmd
SuperDump.Analysis.exe
Text Output
Architecture
CLRMD
Cool. But does it
help productivity
yet?
SuperDump.Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result.json.dmp
Web-Frontend
Developers
Hangfire
Large Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDump
Large Scale Crash Dump Analysis with SuperDump
It also helps non-Windows developers to
quick-assess crash-dumps more easily!
Nice! Non-experienced people can analyze
dumps without special tools and knowhow.
SuperDump.Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result.json.dmp
Web-Frontend
JIRA
Support
REST API
curl -X POST --header 'Content-Type: application/json' --header
'Accept: application/json' -d '{ 
"url": "https://dumps.local/mydump.dmp", 
}' 'http://superdump.local/api/Dumps'
Response:
{
"location":
"http://superdump.local/Home/BundleCreated?bundleId=czs6140",
"date": "Fri, 05 May 2017 20:13:04 GMT",
}
Developers
Hangfire
Dump-analysis is already finished when a dev
looks at a bug in JIRA. We’re speeding up!
But, sometimes DebugDiag
has better results!
SuperDump.
Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result
.json
Web-Frontend
JIRA
Support
REST API
cdb.exe SuperDump.
DebugDiag.exe
WinDbg DebugDiag
WinDbg
.log
DebugDiag
.mht
Developers
Hangfire
Awesome.
But still not enough. What if I want to
investigate a very special case. I want all the
power of WinDbg. But in the browser...
SuperDump.
Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result
.json
Web-Frontend
JIRA
Support
REST API
cdb.exe
(WinDbg)
SuperDump.
DebugDiag.exe
DebugDiag
WinDbg
.log
DebugDiag
.mht
cdb.exe
(WinDbg)
Websockets
I/O
Redirect
Browser
jquery.
console
Developers
Hangfire
Large Scale Crash Dump Analysis with SuperDump
Wow. Now even deep investigations can be
made in the browser.
This is a game changer for non-Windows
developers.
SuperDump.
Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result
.json
Web-Frontend
JIRA
Support
REST API
cdb.exe
(WinDbg)
SuperDump.
DebugDiag.exe
DebugDiag
WinDbg
.log
DebugDiag
.mht
cdb.exe
(WinDbg)
Websockets
I/O
Redirect
Browser
jquery.
console
Docker For Windows
Hyper-V
result
.json
GDB based .sh
scripts
Developers
Hangfire
Neat. No more Linux VM’s necessary for
Windows developers to debug Linux
coredumps.
SuperDump.
Analysis.exe
Architecture
SuperDump.Service.exe
CLRMD
ASP.NET Core
result
.json
Web-Frontend
JIRA
Support
REST API
cdb.exe
(WinDbg)
SuperDump.
DebugDiag.exe
DebugDiag
WinDbg
.log
DebugDiag
.mht
cdb.exe
(WinDbg)
Websockets
I/O
Redirect
Browser
jquery.
console
Docker For Windows
Hyper-V
result
.json
GDB based .sh
scripts
GDB
I/O
Redirect
Developers
Hangfire
Large Scale Crash Dump Analysis with SuperDump
What SuperDump changed for us
Speed: Much faster triaging
Enabling: People not knowledgeable on crash dump
analysis can do basic analysis
Compatibility: Linux people can debug Windows dumps
and vice-versa
Communication: It’s easier to talk about “a crash”
because it can be referred to by a URI
Open-sourced in February 2017 : https://github.com/Dynatrace/superdump
Actively used and developed at Dynatrace
Future stuff:
* Better Linux analysis, based on .NET Core & libunwind (and open source)
* Duplication detection and clustering
* Search and data-mining capabilities (elasticsearch?)
* Extensible analyzers
Techs used: .NET Core, Websockets,
ClrMD, Hangfire, swagger,
swashbuckle, Humanizer, DebugDiag,
Cdb, Gdb, docker, Hyper-V, libunwind
The end.
Happy Debugging!
Resources
• SuperDump: https://github.com/Dynatrace/superdump
• WinDbg: https://developer.microsoft.com/en-
us/windows/hardware/windows-driver-kit
• DebugDiag: https://www.microsoft.com/en-
us/download/details.aspx?id=49924
• procdump: https://technet.microsoft.com/en-
us/sysinternals/dd996900.aspx
• WinDbg resources:
• Tess Ferrandez: https://blogs.msdn.microsoft.com/tess/tag/debugging/
• Cheat Sheet: http://windbg.info/doc/1-common-cmds.html
1 of 33

More Related Content

What's hot(20)

iOS Application SecurityiOS Application Security
iOS Application Security
Egor Tolstoy5.8K views
Test Driven DevelopmentTest Driven Development
Test Driven Development
Kumaresh Chandra Baruri421 views
OpenNebula 4.14 Hands-on TutorialOpenNebula 4.14 Hands-on Tutorial
OpenNebula 4.14 Hands-on Tutorial
OpenNebula Project39.9K views
IBM i - AS/400 - SDAIBM i - AS/400 - SDA
IBM i - AS/400 - SDA
Giovanny Guillen7.7K views
CICS basic mapping support - session 3CICS basic mapping support - session 3
CICS basic mapping support - session 3
Srinimf-Slides 1.6K views
Splunk資安智慧分析平台Splunk資安智慧分析平台
Splunk資安智慧分析平台
Ching-Lin Tao4.5K views
ACI MultiPod 구성ACI MultiPod 구성
ACI MultiPod 구성
Woo Hyung Choi1.9K views
Relógio Eletrônico de Ponto Henry Prisma Super Fácil  R01 - Aplicativo Web Em...Relógio Eletrônico de Ponto Henry Prisma Super Fácil  R01 - Aplicativo Web Em...
Relógio Eletrônico de Ponto Henry Prisma Super Fácil R01 - Aplicativo Web Em...
Totalseg - Soluções em Controle de Ponto e Acesso2.1K views
Introduction to RustIntroduction to Rust
Introduction to Rust
Jean Carlo Machado1K views
Binary exploitation - AIS3Binary exploitation - AIS3
Binary exploitation - AIS3
Angel Boy7.3K views
Hdfs ha using journal nodesHdfs ha using journal nodes
Hdfs ha using journal nodes
Evans Ye9.9K views
Weighbridge Software Weighbridge Software
Weighbridge Software
imagicsolution3.7K views
TMUX Rocks!TMUX Rocks!
TMUX Rocks!
Kent Chen15.7K views
Skillwise JCLSkillwise JCL
Skillwise JCL
Skillwise Group1.8K views
F5 DDoS ProtectionF5 DDoS Protection
F5 DDoS Protection
MarketingArrowECS_CZ8.3K views
Clean code & design patternsClean code & design patterns
Clean code & design patterns
Pascal Larocque4.1K views

Recently uploaded(20)

Unleash The MonkeysUnleash The Monkeys
Unleash The Monkeys
Jacob Duijzer7 views
DevsRankDevsRank
DevsRank
devsrank78610 views
ict act 1.pptxict act 1.pptx
ict act 1.pptx
sanjaniarun0812 views
SAP FOR TYRE INDUSTRY.pdfSAP FOR TYRE INDUSTRY.pdf
SAP FOR TYRE INDUSTRY.pdf
Virendra Rai, PMP14 views
LAVADORA ROLO.docxLAVADORA ROLO.docx
LAVADORA ROLO.docx
SamuelRamirez835247 views

Large Scale Crash Dump Analysis with SuperDump

Editor's Notes

  1. MINIDUMP_TYPE : https://msdn.microsoft.com/en-us/library/windows/desktop/ms680519(v=vs.85).aspx
  2. WER: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx
  3. WER: https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181(v=vs.85).aspx
  4. https://github.com/Microsoft/clrmd