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

History Of Ticket 736426ffffffffff

Artifacts Associated With Ticket 736426ffffffffff

  1. Ticket change [96993f2046] (rid 106349) by mistachkin on 2003-05-12 11:28:51:

    1. assignee initialized to: "hobbs"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      generic/tclThreadAlloc.c 
      
      1. We have the static file variables: 
      
      static Tcl_Mutex *listLockPtr; 
      static Tcl_Mutex *objLockPtr; 
      
      2. They are allocated via TclpNewAllocMutex, which 
      BOTH allocates memory via malloc AND calls 
      InitializeCriticalSection on the contained critical 
      section. 
      
      3. Neither the block of memory nor the critical 
      section are ever freed. 
      
      4. This applies to the above static variables and 
      to any other mutexes allocated via 
      TclpNewAllocMutex.
      
      5. There needs to be a new function in 
      tclThreadAlloc.c, 
      called "TclFinalizeThreadAllocSubsystem", that 
      frees these mutexes (probably by calling an 
      appropriate platform specific func, yet to be 
      created, perhaps called "TclpNewFreeMutex") and 
      then calls the "TclpFinalizeThreadAllocSubsystem" 
      function for the platform specific cleanup (i've 
      created the Win32 version of this function in my 
      new patch #731356). 
      
      6. Yet another leak involves freeing the actual TLS 
      index used by the threaded memory allocator. 
      
      
    4. foundin initialized to: "None"
    5. priority initialized to: "9 Immediate"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "mistachkin"
    9. subsystem initialized to: "41. Memory Allocation"
    10. title initialized to: "memory leaks in tclThreadAlloc.c"
    11. type initialized to: "Bug"
  2. Ticket change [777383b69b] (rid 89778) by mistachkin on 2003-07-15 17:18:39:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      I can now easily reproduce a crash in the latest Tcl/Tk 
      regarding this issue (limited number of TLS indexes per 
      process).
      
      The cause is that Tcl/Tk doesn't think that anybody else in 
      the process is going to be using TLS indexes, which is 
      definitely NOT the case.
      
      Tcl (especially with Tk) very very rapidly runs out of TLS 
      indexes for even trivial Tk scripts.
      
      I can write a simple C app that uses Tcl/Tk and allocates 
      about half of the available TLS indexes on NT4 to 
      demonstrate.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  3. Ticket change [49f051be1d] (rid 126457) by hobbs on 2003-10-13 06:41:30:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      NT4 is no longer a supported OS.  Please create one that can 
      be reproduced on 98, 2000 or XP.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. priority changed to: "8"
    5. username: "hobbs"
  4. Ticket change [dfb19950c3] (rid 115053) by mistachkin on 2003-11-11 15:08:15:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      The issue is NOT with NT4. This bug (and a couple other 
      related ones) demonstrate design flaws in the threaded 
      memory allocator.
      
      I am more than willing to help fix these problems, however, I 
      am lacking information about the original intent of some 
      aspects of the design, as I have mentioned previously.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  5. Ticket change [7007be54b4] (rid 100407) by dgp on 2003-11-13 08:54:59:

    1. foundin changed to: "obsolete: 8.4.5"
  6. Ticket change [1583cd0cbd] (rid 124576) by mistachkin on 2004-06-24 15:20:48:

    1. assignee changed to: "dkf"
    2. icomment:
      Logged In: YES 
      user_id=113501
      
      
      This bug appears to still be in HEAD.  Assigning to dkf 
      because he touched it last.
      
      
      
      
    3. login: "mistachkin"
    4. mimetype: "text/plain"
    5. username: "mistachkin"
  7. Ticket change [ca4fc940b1] (rid 95319) by dkf on 2004-06-24 16:01:49:

    1. assignee changed to: "hobbs"
    2. icomment:
      Logged In: YES 
      user_id=79902
      
      I was just style-fixing.  I know nothing about how to fix
      these problems.
      
      
    3. login: "dkf"
    4. mimetype: "text/plain"
    5. username: "dkf"
  8. Ticket change [816b0f6611] (rid 117028) by mistachkin on 2004-07-14 10:28:52:

    1. foundin changed to: "obsolete: 8.4.6"
    2. icomment:
      Logged In: YES 
      user_id=113501
      
      from CVS HEAD (the leak is in TclpGetAllocCache):
      
       200 bytes in 1 blocks are definitely lost in loss record 12
      of 41
          at 0x3C0250D5: malloc (in
      /usr/local/lib/valgrind/vgpreload_memche$
          by 0x3C0FC720: (within /usr/local/lib/valgrind/libc_r.so.4)
          by 0x3C0FEFE9: (within /usr/local/lib/valgrind/libc_r.so.4)
          by 0x3C0FF179: pthread_key_create (in
      /usr/local/lib/valgrind/libc$
          by 0x3C0BFF9B: (within ./libtcl8.5.so)
          by 0x3C0FF800: pthread_once (in
      /usr/local/lib/valgrind/libc_r.so.$
          by 0x3C0BFFDD: TclpGetAllocCache (in ./libtcl8.5.so)
          by 0x3C0AC485: TclpAlloc (in ./libtcl8.5.so)
          by 0x3C04F550: Tcl_Alloc (in ./libtcl8.5.so)
          by 0x3C0BFAB1: Tcl_MutexLock (in ./libtcl8.5.so)
          by 0x3C09A712: TclInitObjSubsystem (in ./libtcl8.5.so)     
          by 0x3C070CB9: TclInitSubsystems (in ./libtcl8.5.so)
          by 0x3C06DE97: Tcl_FindExecutable (in ./libtcl8.5.so)
          by 0x3C093E78: Tcl_Main (in ./libtcl8.5.so)
          by 0x8048632: main (in ./tclsh)
      
      also from CVS HEAD (mutexes allocated by TclpNewAllocMutex
      are never freed, there are a lot of these):
      
       132 bytes in 11 blocks are still reachable in loss record
      11 of 41
          at 0x3C0250D5: malloc (in
      /usr/local/lib/valgrind/vgpreload_memche$
          by 0x3C0FC720: (within /usr/local/lib/valgrind/libc_r.so.4)
          by 0x3C0FDCAE: pthread_mutex_init (in
      /usr/local/lib/valgrind/libc$
          by 0x3C0BFF68: TclpNewAllocMutex (in ./libtcl8.5.so)
          by 0x3C0AC2F8: (within ./libtcl8.5.so)
          by 0x3C0AC490: TclpAlloc (in ./libtcl8.5.so)
          by 0x3C04F550: Tcl_Alloc (in ./libtcl8.5.so)
          by 0x3C0BFAB1: Tcl_MutexLock (in ./libtcl8.5.so)
          by 0x3C09A712: TclInitObjSubsystem (in ./libtcl8.5.so)
          by 0x3C070CB9: TclInitSubsystems (in ./libtcl8.5.so)
          by 0x3C06DE97: Tcl_FindExecutable (in ./libtcl8.5.so)
          by 0x3C093E78: Tcl_Main (in ./libtcl8.5.so)
          by 0x8048632: main (in ./tclsh)
      
      
      
    3. login: "mistachkin"
    4. mimetype: "text/plain"
    5. priority changed to: "9 Immediate"
    6. username: "mistachkin"
  9. Ticket change [3e0c6ce6ec] (rid 121194) by mistachkin on 2004-07-16 01:02:01:

    1. icomment:
      
      
      File Added - 94054: bug736426.diff
      
      Logged In: YES 
      user_id=113501
      
      
      This patch should fix all the remaining leaks in the
      threaded memory allocator.  Please review.
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  10. Ticket change [97da5599b8] (rid 110506) by kennykb on 2004-07-16 03:43:01:

    1. icomment:
      Logged In: YES 
      user_id=99768
      
      Revised patch attached; corrects several compilation problems
      on Win2k/VC++6.
      
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  11. Ticket change [c19cf0dd3e] (rid 111346) by kennykb on 2004-07-16 03:43:02:

    1. icomment:
      
      
      File Added - 94071: 736426.patch
      
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  12. Ticket change [e6ca18af0e] (rid 104352) by mistachkin on 2004-07-16 10:12:33:

    1. icomment:
      
      
      File Deleted - 94054: 
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  13. Ticket change [8fa7e858c8] (rid 120313) by mistachkin on 2004-07-16 10:16:19:

    1. icomment:
      Logged In: YES 
      user_id=113501
      
      Ok, this time with feeling.  Here is an updated patch (based
      on kbk's) that includes cleanup of the Unix pthread key as well.
      
      This should fix all known memory/resource leaks in the
      threaded memory allocator and make it possible for it to be
      re-initialized properly if Tcl is unloaded and reloaded into
      a process (such as a browser).
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  14. Add attachment "bug736426.diff" [93e5075697] (rid 105880) by mistachkin on 2004-07-16 10:16:21.

  15. Ticket change [42741e0ea0] (rid 116383) by mistachkin on 2004-07-16 10:16:21:

    1. icomment:
      
      
      File Added - 94096: bug736426.diff
      
      
      
    2. login: "mistachkin"
    3. mimetype: "text/plain"
    4. username: "mistachkin"
  16. Ticket change [3a092cdbf1] (rid 112494) by kennykb on 2004-07-21 06:52:41:

    1. icomment:
      
      
      File Deleted - 94071: 
      
      
      
      File Added - 94624: 736426-8.4.patch
      
      Logged In: YES 
      user_id=99768
      
      Backported for 8.4 - patch attached
      
      
    2. login: "kennykb"
    3. mimetype: "text/plain"
    4. username: "kennykb"
  17. Ticket change [fd692f36e9] (rid 108410) by hobbs on 2004-07-21 07:38:37:

    1. icomment:
      Logged In: YES 
      user_id=72656
      
      The use of PTHREAD_ONCE_INIT in FreeKey is invalid on HP and
      Solaris, where it is a struct.  This conflict needs to be
      resolved because it's central to reinitialization.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  18. Add attachment "736426-8.4.patch" [819ab464e8] (rid 117067) by hobbs on 2004-07-21 08:32:04.

  19. Ticket change [6da102807f] (rid 128738) by hobbs on 2004-07-21 08:32:04:

    1. icomment:
      
      
      File Added - 94635: 736426-8.4.patch
      
      Logged In: YES 
      user_id=72656
      
      Attached is the patch applied for 8.4.
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  20. Ticket change [aa362a58d3] (rid 99287) by hobbs on 2004-07-21 08:32:05:

    1. icomment:
      
      
      File Deleted - 94624: 
      
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  21. Ticket change [9a068999ce] (rid 110888) by hobbs on 2004-07-21 08:47:11:

    1. closedate changed to: "2004-07-21T01:47:11"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      Attached is the patch applied for 8.5-head.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "hobbs"
  22. Ticket change [a81841205c] (rid 98915) by hobbs on 2004-07-21 08:47:12:

    1. icomment:
      
      
      File Added - 94637: 736426-8.5.patch
      
      
      
    2. login: "hobbs"
    3. mimetype: "text/plain"
    4. username: "hobbs"
  23. Add attachment "736426-8.5.patch" [d5906087d9] (rid 123645) by hobbs on 2004-07-21 08:47:12.