Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Diagnosing Deadlocks in Win32 Program

What are the steps and techniques to debug an apparent hang due to a deadlock in a Win32 production process. I heard that WinDbg can be used for this purpose but could you please provide clear hints on how this can be accomplished?

like image 606
Jorge Ferreira Avatar asked Sep 18 '08 01:09

Jorge Ferreira


People also ask

How does Visual Studio detect deadlock?

To apply the deadlock detection to your application with PostSharp Tools for Visual Studio: Right click on your solution in Solution Explorer, select Add followed by PostSharp Policy... In the Add PostSharp policy wizard, expand Threading and select Deadlock detection.

What does possible deadlock condition mean?

A deadlock is a condition where 2 (or more) processes attempt to access a resource that the other holds a lock on. Since each process has a request for the other's resource, neither process can be completed.


1 Answers

This post should get you started on the various options..Check the posts tagged with Debugging..

Another useful article on debugging deadlocks..

like image 200
Gulzar Nazim Avatar answered Sep 28 '22 23:09

Gulzar Nazim