Artifacts Associated With Ticket 990552ffffffffffffffffffffffffffffffffff
Ticket change [4fd750dc39] (rid 125887) by mistachkin on 2004-07-13 23:19:35:
- assignee initialized to: "vincentdarley"
- cmimetype initialized to: "text/plain"
- 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)
- foundin initialized to: "None"
- priority initialized to: "7 High"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "mistachkin"
- subsystem initialized to: "37. File System"
- title initialized to: "TclFinalizeFilesystem leaks with TCL_THREADS"
- type initialized to: "Bug"
Ticket change [98104cbe15] (rid 110546) by vincentdarley on 2004-07-14 21:37:00:
- assignee changed to: "vasiljevic"
Ticket change [90dd1b850e] (rid 120528) by vincentdarley on 2004-07-14 21:37:01:
- icomment:
Logged In: YES user_id=32170 Hopefully Zoran will have some insights here...
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
- icomment:
Ticket change [0428a72d4e] (rid 119946) by vasiljevic on 2004-07-14 21:56:36:
- 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.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [9c58fcb374] (rid 96136) by vasiljevic on 2004-07-16 03:05:57:
- closedate changed to: "2004-07-15T20:05:57"
- closer changed to: "vasiljevic"
- foundin changed to: "obsolete: 8.5a2"
- 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.
- login: "vasiljevic"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "vasiljevic"