Memory Dump Analysis Anthology, Volume 2, Revised Edition
Memory Dump Analysis Anthology, Volume 2, Revised Edition
About the Book
This reference volume consists of revised, edited, cross-referenced, and thematically organized articles from Software Diagnostics Institute and Software Diagnostics Library (former Crash Dump Analysis blog) written in January - September 2008. In addition to various corrections, this major revision updates relevant links and removes obsolete references. Some articles are preserved for historical reasons. Most of the content, especially memory analysis pattern language, is still relevant today and for the foreseeable future. The output of WinDbg commands is also remastered to include color highlighting. Crash dump analysis pattern names are also corrected to reflect the continued expansion of the catalog.
Compared to the first revised volume, the second revised volume features:
- 44 more crash dump analysis patterns
- Pattern interaction and case studies
- Fully cross-referenced with Volume 1
- New appendixes
The primary audience for Memory Dump Analysis Anthology reference volumes is: software engineers developing and maintaining products on Windows platforms, technical support, escalation, and site reliability engineers dealing with complex software issues, quality assurance engineers testing software on Windows platforms, security and vulnerability researchers, reverse engineers, malware and memory forensics analysts.
Bundles that include this book
Table of Contents
Preface 15
Acknowledgments 17
About the Author 18
PART 1: Crash Dumps for Beginners 19
The Time of the Crash 19
Stack Trace 20
EasyDbg 22
Citrix Symbol Server 27
PART 2: Professional Crash Dump Analysis 29
WinDbg Scripts 29
Introduction for C/C++ Users 29
Generating File Name for .dump Command 37
All at Once: Postmortem Logs and Dump Files 38
Common Mistakes 39
Not Looking at Full Stack Traces 39
Not Seeing Semantic and Pragmatic Inconsistencies 41
Pattern Interaction 43
Heuristic Stack Trace 43
Multiple Patterns 50
Exception and Deadlock 55
Heap and Spike 59
Hooksware 63
Heap and Early Crash Dump 65
WinDbg Shortcuts 67
WinDbg as a Binary Editor 67
Command Autocompletion 70
!envvar 71
.quit_lock 72
.dumpcab 73
.f+, .f- 74
.exptr 75
WinDbg as a Simple PE Viewer 76
.sound_notify 79
Signaled Objects 80
Memory Search Revisited 87
WDF and PNP BSOD: Case Study 95
Exploring NDIS Extension 105
The Hunt for the Debugger 109
Complete Dump: User Space Critical Sections 115
Microsoft DLL Help Database 116
What Does This Function Do? 118
What Was This Process Doing? 119
STL and WinDbg 122
WinDbg Cheat Sheet 125
How Old Is Your Application or System? 126
Demystifying First-chance Exceptions 129
.NET Managed Code Analysis in Complete Memory Dumps 131
Who Opened That File? 134
In Search of Lost CID 136
Large Heap Allocations 137
First-order and Second-order Memory Leaks 140
Hooked Modules 145
PART 3: Crash Dump Analysis Patterns 147
Wait Chain (Executive Resources) 147
Corrupt Dump 151
Dispatch Level Spin 154
No Process Dumps 157
No System Dumps 158
Insufficient Memory (PTE) 159
Suspended Thread 161
Special Process 164
Frame Pointer Omission 169
False Function Parameters 173
Message Box 177
Self-Dump 181
Blocked Thread (Software) 184
Zombie Processes 196
Wild Pointer 202
Dynamic Memory Corruption (Kernel Pool) 204
Insufficient Memory (Module Fragmentation) 210
Wild Code 219
Hardware Error 221
Handle Limit (GDI, Kernel Space) 226
Missing Component (General) 233
NULL Pointer (Code) 237
Execution Residue (Unmanaged Space) 239
Optimized VM Layout 267
Invalid Handle (General) 269
Overaged System 273
Thread Starvation (Realtime Priority) 274
Stack Overflow (User Mode) 279
Missing Component (Static Linkage, User Mode) 283
Duplicated Module 294
Not My Version (Software) 299
Data Contents Locality 300
Nested Exceptions (Unmanaged Code) 305
Nested Exceptions (Managed Code) 310
Affine Thread 314
Self-Diagnosis (User Mode) 318
Waiting Thread Time (User Dumps) 319
Inline Function Optimization (Unmanaged Code) 322
Critical Section Corruption 324
Lost Opportunity 332
Young System 335
Last Error Collection 337
Hidden Module 339
High Contention (Critical Sections) 341
PART 4: Crash Dump Analysis AntiPatterns 343
Debugging Architects 343
Symbolless Analysis 344
Myopic Troubleshooting and Debugging 345
PART 5: A Bit of Science 347
Memoretics 347
Memory Analysis 348
Memoidealism 349
Memiotics 350
PART 6: Fun with Crash Dumps 351
Music for Debugging 351
The Glory of Debugging 351
Memory Analysis Album 352
Biography of a Bug 354
Visual Computer Memories 355
The First Defect 356
The Songs for Remote Debugging 357
Thinking Out of the Box 358
Crash Dumps and Science Fiction 359
Colorimetric Computer Memory Dating 360
On CSI Abbreviation 362
The First Memory Dump Book 363
On SOS Abbreviation 365
Software Exceptions: a Paranormal View 366
Bug Entanglement (Bugtanglement) 367
The Standard Model of Debugging 368
Physics of Debugging 369
Can Computers Debug? 371
PART 7: Data Recovery 375
With the Help of Memory Dump Analysis 375
PART 8: Software Troubleshooting 377
Troubleshooter’s Block 377
Causal Models 378
Object-Oriented Debugging and Troubleshooting 379
Component-Based Debugging and Troubleshooting 380
Domain-Driven Debugging and Troubleshooting 381
Myths and Facts about Software Support 382
Ceteris Paribus in Comparative Troubleshooting 383
Dancing in Software Support Environment 384
PARTS: Problem Solving Power of Thought 385
The Hidden Tomb in Pyramid of Software Change 386
Tracing 387
CDF Traces: Analyzing Process Launch Sequence 387
ETW Tracing Tools 389
Lean Tracing 390
DebugWare Patterns 391
API Query 391
Tool Façade 392
Configuration Wrapper 393
Dual Interface 394
Tool Chain 395
Tool Box 396
PART 9: Security 397
Data Hiding in Crash Dumps 397
Hardening Dump Security: Beware of PEB Data 400
PART 10: The Origin of Crash Dumps 401
Memory Dumps from Xen-virtualized Windows 401
Bugchecks: SYSTEM_SERVICE_EXCEPTION 402
Bugcheck Callbacks 406
Application Verifier on x64 Platforms 413
Who Saved the Dump File? 414
ADPlus in 21 Seconds and 13 Steps 416
PART 11: Miscellaneous 425
Three Main Ideas of Debugging 425
Pseudo-corrupt Memory Dumps 426
Win32 Exception Frequencies 427
Bugcheck Frequencies 429
Time Travel Debugging 440
I/O and Memory Priority in Vista 441
Appendix A 443
Crash Dump File Examples 443
Appendix B 445
WinDbg.Org: WinDbg Quick Links 445
Appendix C 447
Dump2Wave Source Code 447
Appendix D 451
Dump2Picture Source Code 451
Appendix E 455
Crash Dump Analysis Checklist 455
CMDTREE.TXT 458
Appendix F 459
Index of WinDbg Commands 460
Cover Images 463
Other books by this author
The Leanpub 60-day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
See full terms
Do Well. Do Good.
Authors have earned$11,595,069writing, publishing and selling on Leanpub, earning 80% royalties while saving up to 25 million pounds of CO2 and up to 46,000 trees.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers), EPUB (for phones and tablets) and MOBI (for Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them
Top Books
C++20 - The Complete Guide
Nicolai M. JosuttisAll the new language and library features of C++20 (for those who know previous versions).
The book presents all new language and library features of C++20. Learn how this impacts day-to-day programming, to benefit in practice, to combine new features, and to avoid all new traps.
Buy early, pay less, free updates.
Other books:
Jetpack Compose internals
Jorge CastilloJetpack Compose is the future of Android UI. Master how it works internally and become a more efficient developer with it. You'll also find it valuable if you are not an Android dev. This book provides all the details to understand how the Compose compiler & runtime work, and how to create a client library using them.
SignalR on .NET 6 - the Complete Guide
Fiodar SazanavetsLearn everything there is to learn about SignalR and how to integrate it with the latest .NET 6 and C# 10 features. Learn how to connect any type of client to SignalR, including plain WebSocket client. Learn how to build interactive applications that can communicate with each other in real time without making excessive calls.
OpenIntro Statistics
David Diez, Christopher Barr, Mine Cetinkaya-Rundel, and OpenIntroA complete foundation for Statistics, also serving as a foundation for Data Science.
Leanpub revenue supports OpenIntro (US-based nonprofit) so we can provide free desk copies to teachers interested in using OpenIntro Statistics in the classroom and expand the project to support free textbooks in other subjects.
More resources: openintro.org.
R Programming for Data Science
Roger D. PengThis book brings the fundamentals of R programming to you, using the same material developed as part of the industry-leading Johns Hopkins Data Science Specialization. The skills taught in this book will lay the foundation for you to begin your journey learning data science. Printed copies of this book are available through Lulu.
The easiest way to learn design patterns
Fiodar SazanavetsLearn design patterns in the easiest way possible. You will no longer have to brute-force your way through each one of them while trying to figure out how it works. The book provides a unique methodology that will make your understanding of design patterns stick. It can also be used as a reference book where you can find design patterns in seconds.
Ansible for DevOps
Jeff GeerlingAnsible is a simple, but powerful, server and configuration management tool. Learn to use Ansible effectively, whether you manage one server—or thousands.
CCIE Service Provider Version 4 Written and Lab Exam Comprehensive Guide
Nicholas RussoThe service provider landscape has changed rapidly over the past several years. Networking vendors are continuing to propose new standards, techniques, and procedures for overcoming new challenges while concurrently reducing costs and delivering new services. Cisco has recently updated the CCIE Service Provider track to reflect these changes; this book represents the author's personal journey in achieving that certification.
Cronache di Domain-Driven Design
Francesco Strazzullo, Matteo Baglini, Gianluca Padovani, Emanuele DelBono, Marco Consolaro, Alessandro Colla, Uberto Barbini, Alberto Acerbis, Julie Camosseto, DDD Open, and Alberto BrandoliniCronache di Domain-Driven Design: un libro corale in italiano fatto di storie indipendenti tra loro, che sono il risultato dell’applicazione di Domain-Driven Design su progetti reali.
Functional event-driven architecture: Powered by Scala 3
Gabriel VolpeExplore the event-driven architecture (EDA) in a purely functional way, mainly powered by Fs2 streams in Scala 3!
Leverage your functional programming skills by designing and writing stateless microservices that scale, powered by stateful message brokers.
Top Bundles
- #1
Practical FP in Scala + Functional event-driven architecture
2 Books
Practical FP in Scala (A hands-on approach) & Functional event-driven architecture, aka FEDA, (Powered by Scala 3), together as a bundle! The content of PFP in Scala is a requirement to understand FEDA so why not take advantage of this bundle!? - #2
Software Architecture for Developers: Volumes 1 & 2 - Technical leadership and communication
2 Books
"Software Architecture for Developers" is a practical and pragmatic guide to modern, lightweight software architecture, specifically aimed at developers. You'll learn:The essence of software architecture.Why the software architecture role should include coding, coaching and collaboration.The things that you really need to think about before... - #3
All the Books of The Medical Futurist
6 Books
We put together the most popular books from The Medical Futurist to provide a clear picture about the major trends shaping the future of medicine and healthcare. Digital health technologies, artificial intelligence, the future of 20 medical specialties, big pharma, data privacy, digital health investments and how technology giants such as Amazon... - #4
CCIE Service Provider Ultimate Study Bundle
2 Books
Piotr Jablonski, Lukasz Bromirski, and Nick Russo have joined forces to deliver the only CCIE Service Provider training resource you'll ever need. This bundle contains a detailed and challenging collection of workbook labs, plus an extensively detailed technical reference guide. All of us have earned the CCIE Service Provider certification... - #6
Modern C++ Collection
3 Books
Get All about Modern C++C++ Standard Library, including C++20Concurrency with Modern C++, including C++20C++20Each book has about 200 complete code examples. Updates are included. When I update one of the books, you immediately get the updated bundle. You can expect significant updates to each new C++ standard (C++23, C++26, .. ) and also... - #7
Pattern-Oriented Memory Forensics and Malware Detection
2 Books
This training bundle for security engineers and researchers, malware and memory forensics analysts includes two accelerated training courses for Windows memory dump analysis using WinDbg. It is also useful for technical support and escalation engineers who analyze memory dumps from complex software environments and need to check for possible...