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

History Of Ticket 990552ffffffffff

Artifacts Associated With Ticket 990552ffffffffff

  1. Ticket change [4fd750dc39] (rid 125887) by mistachkin on 2004-07-13 23:19:35:

    1. assignee initialized to: "vincentdarley"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      TclFinalizeFilesystem is being called after
      Tcl_FinalizeThread from Tcl_Finalize.  When TCL_THREADS
      is enabled, this causes a large leak because the thread
      specific data allocated by TclFreeObj is never freed by
      TclFinalizeThreadData (it has already been called by
      Tcl_FinalizeThread).
      
      Here is the valgrind output:
      
      65751 bytes in 514 blocks are still reachable in loss
      record 2 of 2
      at 0x3C0250D5: malloc (in
      /usr/local/lib/valgrind/vgpreload_memcheck.so)
      by 0x3C04EE16: TclpAlloc (generic/tclAlloc.c:677)
      by 0x3C0588F9: Tcl_DbCkalloc (generic/tclCkalloc.c:375)
      by 0x3C0E9F7E: Tcl_GetThreadData (generic/tclThread.c:109)
      by 0x3C0D1A81: TclFreeObj (generic/tclObj.c:770)
      by 0x3C0D384D: Tcl_DbDecrRefCount (generic/tclObj.c:2777)
      by 0x3C0BE978: TclFinalizeFilesystem
      (generic/tclIOUtil.c:707)
      by 0x3C08CF35: Tcl_Finalize (generic/tclEvent.c:910)
      by 0x3C08CB98: Tcl_Exit (generic/tclEvent.c:638)
      by 0x3C0C91CA: Tcl_Main (generic/tclMain.c:674)
      by 0x8048637: main (unix/tclAppInit.c:90)
      
      
    4. foundin initialized to: "None"
    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: "37. File System"
    10. title initialized to: "TclFinalizeFilesystem leaks with TCL_THREADS"
    11. type initialized to: "Bug"
  2. Ticket change [98104cbe15] (rid 110546) by vincentdarley on 2004-07-14 21:37:00:

    1. assignee changed to: "vasiljevic"
  3. Ticket change [90dd1b850e] (rid 120528) by vincentdarley on 2004-07-14 21:37:01:

    1. icomment:
      Logged In: YES 
      user_id=32170
      
      Hopefully Zoran will have some insights here...
      
      
      
    2. login: "vincentdarley"
    3. mimetype: "text/plain"
    4. username: "vincentdarley"
  4. Ticket change [0428a72d4e] (rid 119946) by vasiljevic on 2004-07-14 21:56:36:

    1. icomment:
      Logged In: YES 
      user_id=95086
      
      There has been quite a few issues with threads  
      on application exit, that is when the master (main) 
      therad exits. 
       
      The interesting question is: does this happen also  
      when a regular worker therad exits while the main 
      thread is still alive? You can check this by compiling 
      the test shell and use testthread command to create 
      and destroy a worker thread. You can then observe  
      the memory usage. Tell me what you get. 
       
      I would normally scream already on such large holes 
      and our app would normally not survive more than 
      15 minutes operation if this is really true. 
      
      
    2. login: "vasiljevic"
    3. mimetype: "text/plain"
    4. username: "vasiljevic"
  5. Ticket change [9c58fcb374] (rid 96136) by vasiljevic on 2004-07-16 03:05:57:

    1. closedate changed to: "2004-07-15T20:05:57"
    2. closer changed to: "vasiljevic"
    3. foundin changed to: "obsolete: 8.5a2"
    4. icomment:
      Logged In: YES 
      user_id=95086
      
      Oh well, valgrind is right. There is indeed a leak there.
      I have fixed this in the head branch by adding one 
      TclFinalizeThreadData call just before the call to
      TclFinalizeSynchronization() which effectively tears down
      all allocated TSD slots (but not their data), therefore 
      producing leaks.
      
      
      
    5. login: "vasiljevic"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
    9. username: "vasiljevic"