|
I had an interesting case today where an asp.net app was stuck in a true deadlock. In other words two threads were both waiting for resources that the other thread owned. The scenario in these cases usually goes something like this: FunctionA (locks on ResourceA) and calls FunctionB where it needs ResourceB FunctionB (locks on ResourceB) and calls FunctionA where it needs ResourceA And is typically pretty easy to spot, understand and fix… However, in this particular case things were a bit different. We had gotten memory dumps of the process and after loading them up in windbg, loding sos.dll, and running ~* e !clrstack to see what the threads were working on, we found that a lot of the threads were sitting in System.Threading.Monitor.Enter...
|