title: pthreads mutex lock assertion error
body: <p>I have two threads (created via <code>pthread_create</code>). They are <code>join</code>-able threads ( not detached ).
  But i dont do <code>pthread_join</code> on them, wrong i know, but question is not that.
  Threads share a data structure on heap with mutex locks inside it. 
  Only the the thread who locks it, unlocks the mutex. </p>
  
  <p>I am getting following error in some random cases.</p>
  
  <pre><code>pthread_mutex_lock.c:62: __pthread_mutex_lock: Assertion `mutex-&gt;__data.__owner == 0'
  </code></pre>
  
  <p>Question is in this case if thread2 properly unlocks the mutex and does <code>pthread_destroy</code> and dies via <code>exit(1)</code>, now if thread1 tries to lock the same mutex after <code>pthread_destroy</code>, would you get "this" error or some other error?</p>