Skip to content
Tcl Source Code History Of Ticket 990453ffffffffff
Login

History Of Ticket 990453ffffffffff

Artifacts Associated With Ticket 990453ffffffffff

  1. Ticket change [85daa92ad6] (rid 131393) by mistachkin on 2004-07-13 20:45:10:

    1. assignee initialized to: "andreas_kupries"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      The code in TclpFinalizeMutex on Unix currently reads:
      
          if (pmutexPtr != NULL) {
      ckfree((char *)pmutexPtr);
      *mutexPtr = NULL;
          }
      
      It should read:
      
          if (pmutexPtr != NULL) {
      pthread_mutex_destroy(pmutexPtr);
      ckfree((char *)pmutexPtr);
      *mutexPtr = NULL;
          }
      
      This change fixes quite a few memory leaks in HEAD.  I
      believe this fix should be backported to
      core-8-4-branch as well.
      
      
    4. foundin initialized to: "obsolete: 8.4.6"
    5. priority initialized to: "7 High"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "mistachkin"
    9. subsystem initialized to: "49. Threading"
    10. title initialized to: "leaking mutexes on Unix"
    11. type initialized to: "Bug"
  2. Ticket change [22b896cf0e] (rid 130802) by andreas_kupries on 2004-07-16 05:04:55:

    1. icomment:
      Logged In: YES 
      user_id=75003
      
      Accepted. Conditions and Attrs use their destroy function as
      well, and all the docs I find make the desotry complement to
      init, which is used for mutexes. Committed fix to 8.4 and head.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. resolution changed to: "Fixed"
    5. status changed to: "Closed"
    6. username: "andreas_kupries"
  3. Ticket change [a49c52a16c] (rid 110236) by andreas_kupries on 2004-07-16 05:04:56:

    1. closedate changed to: "2004-07-15T22:04:56"
    2. closer changed to: "andreas_kupries"
  4. Ticket change [614c66b5c2] (rid 92218) by dossy on 2004-08-25 18:44:38:

    1. icomment:
      Logged In: YES 
      user_id=21885
      
      The dangerous thing about this is that pthread_mutex_destroy
      () on some platforms will cause a crash if the mutex is 
      locked.  So, destroying mutexes introduces a kind of "race 
      condition" -- the thread that wants to destroy the mutex 
      cannot guarantee that another thread doesn't have the 
      mutex locked without locking the mutex itself, but once it's 
      locked the mutex, it cannot destroy it because now the 
      mutex is locked.
      
      See AOLserver Bug #810799 for a discussion on this.  
      Destroying a locked mutex definitely crashes Linux (not sure if 
      it's LinuxThreads or NPTL or both) but doesn't seem to crash 
      on Solaris, but the manpages for both indicate that a mutex 
      should be unlocked before executing pthread_mutex_destroy
      ().
      
      
    2. login: "dossy"
    3. mimetype: "text/plain"
    4. username: "dossy"