title: How do I find the handle owner from a hang dump using windbg?
body: <p>How do I find out which thread is the owner of my Event handle in windbg:</p>
  
  <p>I'm running</p>
  
  <pre><code>!handle 00003aec f
  </code></pre>
  
  <p>and get</p>
  
  <pre><code>Handle 00003aec
    Type          Event
    Attributes    0
    GrantedAccess 0x1f0003:
       Delete,ReadControl,WriteDac,WriteOwner,Synch
       QueryState,ModifyState
    HandleCount   2
    PointerCount  4
    Name          &lt;none&gt;
    No object specific information available
  </code></pre>
  
  <p>back, and as there is no Name I haven't figured out how to get the owner out to prove which thread my thread is waiting on</p>
  
  <p>[Edit] I must work against a dump as the original process needs to be restarted on the users machine, so can't debug a live session</p>
  
  <p>The best discussion on the subject I've found so far is on <a href="http://www.codeproject.com/KB/debug/cdbntsd7.aspx" rel="noreferrer">this blog</a>, but unfortunately we end up using different lock methods (I end up using WaitForMultipleObjectsEx and the description is for WaitForSingleObject), and he seems to have access to a live process</p>
  
  <p>the stacktrace of my thread (the one that is blocked on something and where I'm looking for the current owner) is:</p>
  
  <pre><code>0:045&gt; k9
  ChildEBP RetAddr 
  1130e050 7c90e9ab ntdll!KiFastSystemCallRet
  1130e054 7c8094e2 ntdll!ZwWaitForMultipleObjects+0xc
  1130e0f0 79ed98fd kernel32!WaitForMultipleObjectsEx+0x12c
  1130e158 79ed9889 mscorwks!WaitForMultipleObjectsEx_SO_TOLERANT+0x6f
  1130e178 79ed9808 mscorwks!Thread::DoAppropriateAptStateWait+0x3c
  1130e1fc 79ed96c4 mscorwks!Thread::DoAppropriateWaitWorker+0x13c
  1130e24c 79ed9a62 mscorwks!Thread::DoAppropriateWait+0x40
  1130e2a8 79e78944 mscorwks!CLREvent::WaitEx+0xf7
  1130e2bc 7a162d84 mscorwks!CLREvent::Wait+0x17
  1130e33c 7a02fd94 mscorwks!CRWLock::RWWaitForSingleObject+0x6d
  1130e364 79ebd3af mscorwks!CRWLock::StaticAcquireWriterLock+0x12e
  1130e410 00f24557 mscorwks!CRWLock::StaticAcquireWriterLockPublic+0xc9
  </code></pre>