Exercises for practising .NET memory dump analysis.
Copyright (c) 2020 Davis Mosenkovs
Compile the examples using Visual Studio, run them, take memory dumps and try to diagnose the problems. It should be possible to base most troubleshooting decisions on the information in memory dumps. Try to look only into methods referred in memory dumps (and related methods).
In many cases it would be much easier to diagnose these problems by analysing source code, however that would defeat the purpose of these exercises (and in real-life situations there might be similar problems hidden in projects having many thousands of code lines).
Most examples are working really slow, some are also consuming CPU a lot.
Each example has a file called solution.txt
with troubleshooting steps and solution. In these files there are 20 empty lines between steps (allowing to hide next steps outside properly sized editor window).
This is the most simple example.
This is the "scapegoat method" example. Taking at least two memory dumps a few seconds apart is recommended.
ℹ️ Usage of WinDbg might be needed.
This example might (unintentionally) work properly on some systems/under some circumstances.
Please wait until message 15 seconds elapsed since all threads have been started.
is displayed before taking the memory dump. If computer gets slowed down too much decrease priority of Example4.exe
using Task Manager.
This is a memory leak example.
After fixing the memory leak it can be used to examine garbage collection in action.
ℹ️ Usage of PerfView might be needed.