Record debugging windbg critical section deadlock

1, ready to work

Provided windbg symbol path: C: \ Symbols; SRV * C: \ MyLocalSymbols * http: //msdl.microsoft.com/download/symbols

Open windbg, "File" -> "attach to a process ...", attached to the process to be debugged, execute the command ".dump / ma c: \ test.dmp", generated dump file

2, "File" - "! Analyze -v -hang"> "Open Crash Dump ...", open the dump file, execute commands, have the following information

3, which can determine the process is waiting on a critical section, execute the command again "! Locks", to see all the locks a thread-occupied

It can be seen threads ce84 occupy the critical region 000000013f1b0378, thread c724 occupy the critical region 000000013f1b03a0

4, switching to the thread ce84, "~~ [ce84] s", see the thread function call stack case, "kb", and perform "! Cs" critical area extended display information (critical section)

Ce84 waiting thread can be seen in the critical area 000000013f1b03a0, while critical section is occupied 000000013f1b03a0 thread c724.

5, switching to the thread c724, "~~ [c724] s", see the thread case function call stack, "kb"

C724 can see the thread is waiting for a critical section 000000013f1b0378, while critical area 000000013f1b0378 thread ce84 is occupied.

In both cases, the thread is waiting for a critical section c724 000000013f1b0378, owned by the thread ce84, thread ce84 000000013f1b03a0, owned by a thread c724 waiting for a critical section.

从而产生死锁现象,表现为进程hang住,无法响应外界请求。

Guess you like

Origin www.cnblogs.com/pro-love/p/10936029.html