How to do hang dump analysis?
One of my customers facing an interesting issue. He has created a CMS site which slows down after 4 or 5 days. After doing the complete scoping I found that one of the page take 2-3 minutes to load and he has following work-around to temporarily fix the issue.
1) DO an IISREST.
2) Delete the application-pool and recreated it again.
I took the hand dump using the Ad-Plus [Download] script . This support article talk more about this tool https://support.microsoft.com/kb/286350
Start a command window and browse to your debuggers directory.
adplus –hang –pn w3wp.exe
please attach the correct process id.
Open the dump in Windbg.exe
1) Open windbg and open the memory dump (.dmp file) with File/Open Crash dump.
2) Set up the symbol path :-
SRV*c:\symbols*https://msdl.microsoft.com/download/symbols
3) Load sos
.load clr10\sos
4) !analyze –v
5) !sym noisy [verbose loading of the symbols]
6) .symfix c:\symcache [Fix the symbols path]
7) .cordll -ve -u –l
8) !runaway [to analyze]
10) .unload clr10\sos [Unload the SOS.]
11) .chain [to see whether SOS file has been loaded.]
12) ~* kb 2000 [Examine the native callstacks]
13) ~* e !clrstack [Examine the .net callstacks]
14) !syncblk [Determine the ID of the thread owning the lock]
15) ~10s [move to thread 10, replace 10 with actual thread ID]
16) kb 2000 [examine native stack]
17) !clrstack [examine .net stack]
After executing the [ !syncblk ] you will came to know which thread is locked or in waiting state. Jump to the thread [~10S(Enter the thread number instead of 10)] and look at the .net call stack [ !clrstack ]or native call stack[ kb 2000 ]. It will let you know which function is causing the problem.