title: Windbg, how to read the !locks output?
body: <p>I am debugging a program which I suspect there could be deadlock or other mutli-thread related bug, I follow people's suggestions to use WinDBG to open the crash dump file and used !locks to get the following output:</p>
  
  <pre><code>CritSec MSVCR100D!lclcritsects+48 at 73541e40
  WaiterWoken        No
  LockCount          6
  RecursionCount     1
  OwningThread       164c
  EntryCount         0
  ContentionCount    9
  *** Locked
  
  *** ERROR: Symbol file could not be found.  Defaulted to export symbols for qsqlited4.dll - 
  CritSec qsqlited4!qt_plugin_instance+a1b21 at 70fc301c
  WaiterWoken        No
  LockCount          0
  RecursionCount     1
  OwningThread       2344
  EntryCount         0
  ContentionCount    0
  *** Locked
  
  CritSec +73c2380 at 073c2380
  WaiterWoken        No
  LockCount          0
  RecursionCount     4
  OwningThread       2344
  EntryCount         0
  ContentionCount    0
  *** Locked
  
  CritSec +73bf9e8 at 073bf9e8
  WaiterWoken        No
  LockCount          0
  RecursionCount     1
  OwningThread       2344
  EntryCount         0
  ContentionCount    0    
  *** Locked
  
  Scanned 817 critical sections
  </code></pre>
  
  <p>I am confused by the output, could anyone help to explain it?</p>