Artifacts Associated With Ticket 1083082
Ticket change [e22b59db39] (rid 87578) by pointsman on 2004-12-10 18:15:48:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
tcl head 10 dec 2004, compiled with --enable-symbols, -DPURIFY. Script is only: proc exit args {} valgrind reports: ==18300== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 2) ==18300== malloc/free: in use at exit: 12742 bytes in 264 blocks. ==18300== malloc/free: 6005 allocs, 5741 frees, 394569 bytes allocated. ==18300== For counts of detected errors, rerun with: -v ==18300== searching for pointers to 264 not-freed blocks. ==18300== checked 4668828 bytes. ==18300== ==18300== 120 bytes in 5 blocks are definitely lost in loss record 2 of 3 ==18300== at 0x40027B98: malloc (vg_replace_malloc.c:153) ==18300== by 0x40251A1D: TclpAlloc (../generic/tclAlloc.c:685) ==18300== by 0x402592E5: Tcl_Alloc (../generic/tclCkalloc.c:1018) ==18300== by 0x402DBD38: Tcl_NewStringObj (../generic/tclStringObj.c:211) ==18300== by 0x402E6C9E: TclGetProcessGlobalValue (../generic/tclUtil.c:2798) ==18300== by 0x4028801B: TclGetLibraryPath (../generic/tclEncoding.c:325) ==18300== by 0x4028B242: InitializeEncodingSearchPath (../generic/tclEncoding .c:3074) ==18300== by 0x402E6C72: TclGetProcessGlobalValue (../generic/tclUtil.c:2790) ==18300== by 0x40287F91: TclGetEncodingSearchPath (../generic/tclEncoding.c:2 81) ==18300== by 0x4028808C: MakeFileMap (../generic/tclEncoding.c:385) ==18300== by 0x4028B3B8: InitializeEncodingFileMap (../generic/tclEncoding.c: 3129) ==18300== by 0x402E6C72: TclGetProcessGlobalValue (../generic/tclUtil.c:2790) ==18300== by 0x40288E8F: LoadEncodingFile (../generic/tclEncoding.c:1344) ==18300== by 0x4028857B: Tcl_GetEncoding (../generic/tclEncoding.c:669) ==18300== by 0x402F4811: TclpGetEncodingNameFromEnvironment (tclUnixInit.c:61 5) ==18300== by 0x402F4752: TclpSetInitialEncodings (tclUnixInit.c:581) ==18300== by 0x40288E31: Tcl_FindExecutable (../generic/tclEncoding.c:1305) ==18300== by 0x402BBC12: Tcl_Main (../generic/tclMain.c:339) ==18300== by 0x8048705: main (tclAppInit.c:87) ==18300== by 0x4035D8AD: __libc_start_main (in /lib/libc.so.6) ==18300== ==18300== LEAK SUMMARY: ==18300== definitely lost: 120 bytes in 5 blocks. ==18300== possibly lost: 0 bytes in 0 blocks. ==18300== still reachable: 12622 bytes in 259 blocks. ==18300== suppressed: 0 bytes in 0 blocks. ==18300== Reachable blocks (those to which a pointer was found) are not shown. ==18300== To see them, rerun with: --show-reachable=yes ==18300== - foundin initialized to: "obsolete: 8.5a2"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "pointsman"
- subsystem initialized to: "None"
- title initialized to: "Memory leak at startup"
- type initialized to: "Bug"
Ticket change [ac45253f3b] (rid 101262) by dgp on 2004-12-11 02:17:38:
- icomment:
Logged In: YES user_id=80530 Thanks for the report. Looks like FreeThreadHash is missing a ClearHash call...
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [07c43f6596] (rid 89462) by dgp on 2004-12-11 02:22:37:
- icomment:
File Added - 112015: 1083082.patch Logged In: YES user_id=80530 please test this patch.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [4fcb8fd59e] (rid 125883) by pointsman on 2004-12-11 02:35:53:
- icomment:
Logged In: YES user_id=13222 Tested with the patch. Looks like sill not clean. Now valgrind reports: ==22390== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 2) ==22390== malloc/free: in use at exit: 272 bytes in 10 blocks. ==22390== malloc/free: 5979 allocs, 5969 frees, 393962 bytes allocated. ==22390== For counts of detected errors, rerun with: -v ==22390== searching for pointers to 10 not-freed blocks. ==22390== checked 4661072 bytes. ==22390== ==22390== 48 bytes in 2 blocks are definitely lost in loss record 1 of 3 ==22390== at 0x40027B98: malloc (vg_replace_malloc.c:153) ==22390== by 0x40251A1D: TclpAlloc (../generic/tclAlloc.c:685) ==22390== by 0x402592E5: Tcl_Alloc (../generic/tclCkalloc.c:1018) ==22390== by 0x402DBD38: Tcl_NewStringObj (../generic/tclStringObj.c:211) ==22390== by 0x40288E6E: LoadEncodingFile (../generic/tclEncoding.c:1338) ==22390== by 0x4028857B: Tcl_GetEncoding (../generic/tclEncoding.c:669) ==22390== by 0x4028884B: Tcl_SetSystemEncoding (../generic/tclEncoding.c:870) ==22390== by 0x402F476D: TclpSetInitialEncodings (tclUnixInit.c:581) ==22390== by 0x40288E31: Tcl_FindExecutable (../generic/tclEncoding.c:1305) ==22390== by 0x402BBC12: Tcl_Main (../generic/tclMain.c:339) ==22390== by 0x8048705: main (tclAppInit.c:87) ==22390== by 0x4035D8AD: __libc_start_main (in /lib/libc.so.6) ==22390== by 0x8048630: (within /usr/local/tcl-head/bin/tclsh8.5) ==22390== ==22390== LEAK SUMMARY: ==22390== definitely lost: 48 bytes in 2 blocks. ==22390== possibly lost: 0 bytes in 0 blocks. ==22390== still reachable: 224 bytes in 8 blocks. ==22390== suppressed: 0 bytes in 0 blocks.
- login: "pointsman"
- mimetype: "text/plain"
- username: "pointsman"
- icomment:
Ticket change [5310b58924] (rid 126418) by dgp on 2004-12-11 02:57:27:
- icomment:
File Deleted - 112015: File Added - 112020: 1083082.patch Logged In: YES user_id=80530 updated patch should correct that too.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [4e1aff8d13] (rid 127169) by dgp on 2004-12-11 05:18:41:
- assignee changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 please test and report when you get a chance.
- login: "dgp"
- mimetype: "text/plain"
- priority changed to: "8"
- subsystem changed to: "38. Init - Library - Autoload"
- username: "dgp"
Ticket change [5a3ff21b55] (rid 118110) by pointsman on 2004-12-11 09:36:15:
- icomment:
Logged In: YES user_id=13222 Fixed now. Valgrind doesn't report any 'definitely lost' memory any more. With the 'exit trick' from http://mini.net/tcl/3248, even the 'still reachable' are almost back to the low numbers of the late 8.4.x releases. I'm aware, that they are another topic and no real harm, but only noise. They are currently: ==27065== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 27 from 2) ==27065== malloc/free: in use at exit: 132 bytes in 4 blocks. ==27065== malloc/free: 5979 allocs, 5975 frees, 393983 bytes allocated. ==27065== For counts of detected errors, rerun with: -v ==27065== searching for pointers to 4 not-freed blocks. ==27065== checked 4660992 bytes. ==27065== ==27065== 40 bytes in 1 blocks are still reachable in loss record 1 of 2 ==27065== at 0x4002811A: realloc (vg_replace_malloc.c:310) ==27065== by 0x40251A6C: TclpRealloc (../generic/tclAlloc.c:733) ==27065== by 0x402593F0: Tcl_Realloc (../generic/tclCkalloc.c:1101) ==27065== by 0x402DC514: Tcl_SetObjLength (../generic/tclStringObj.c:777) ==27065== by 0x4029C869: TclpNativeJoinPath (../generic/tclFileName.c:764) ==27065== by 0x402CE485: Tcl_FSJoinPath (../generic/tclPathObj.c:993) ==27065== by 0x4029C764: Tcl_FSJoinToPath (../generic/tclFileName.c:689) ==27065== by 0x4028B3CC: InitializeEncodingSearchPath (../generic/tclEncoding.c:3083) ==27065== by 0x402E6E04: TclGetProcessGlobalValue (../generic/tclUtil.c:2791) ==27065== by 0x402880B1: TclGetEncodingSearchPath (../generic/tclEncoding.c:281) ==27065== by 0x402881AC: MakeFileMap (../generic/tclEncoding.c:385) ==27065== by 0x4028B4F0: InitializeEncodingFileMap (../generic/tclEncoding.c:3130) ==27065== by 0x402E6E04: TclGetProcessGlobalValue (../generic/tclUtil.c:2791) ==27065== by 0x40288FAF: LoadEncodingFile (../generic/tclEncoding.c:1344) ==27065== by 0x4028869B: Tcl_GetEncoding (../generic/tclEncoding.c:669) ==27065== by 0x402F49A5: TclpGetEncodingNameFromEnvironment (tclUnixInit.c:615) ==27065== by 0x402F48E6: TclpSetInitialEncodings (tclUnixInit.c:581) ==27065== by 0x40288F51: Tcl_FindExecutable (../generic/tclEncoding.c:1305) ==27065== by 0x402BBD4A: Tcl_Main (../generic/tclMain.c:339) ==27065== by 0x8048705: main (tclAppInit.c:87) ==27065== ==27065== ==27065== 92 bytes in 3 blocks are still reachable in loss record 2 of 2 ==27065== at 0x40027B98: malloc (vg_replace_malloc.c:153) ==27065== by 0x40251A1D: TclpAlloc (../generic/tclAlloc.c:685) ==27065== by 0x402592E5: Tcl_Alloc (../generic/tclCkalloc.c:1018) ==27065== by 0x402DBEBC: Tcl_NewStringObj (../generic/tclStringObj.c:211) ==27065== by 0x402CE218: Tcl_FSJoinPath (../generic/tclPathObj.c:910) ==27065== by 0x4029C764: Tcl_FSJoinToPath (../generic/tclFileName.c:689) ==27065== by 0x4028B3CC: InitializeEncodingSearchPath (../generic/tclEncoding.c:3083) ==27065== by 0x402E6E04: TclGetProcessGlobalValue (../generic/tclUtil.c:2791) ==27065== by 0x402880B1: TclGetEncodingSearchPath (../generic/tclEncoding.c:281) ==27065== by 0x402881AC: MakeFileMap (../generic/tclEncoding.c:385) ==27065== by 0x4028B4F0: InitializeEncodingFileMap (../generic/tclEncoding.c:3130) ==27065== by 0x402E6E04: TclGetProcessGlobalValue (../generic/tclUtil.c:2791) ==27065== by 0x40288FAF: LoadEncodingFile (../generic/tclEncoding.c:1344) ==27065== by 0x4028869B: Tcl_GetEncoding (../generic/tclEncoding.c:669) ==27065== by 0x402F49A5: TclpGetEncodingNameFromEnvironment (tclUnixInit.c:615) ==27065== by 0x402F48E6: TclpSetInitialEncodings (tclUnixInit.c:581) ==27065== by 0x40288F51: Tcl_FindExecutable (../generic/tclEncoding.c:1305) ==27065== by 0x402BBD4A: Tcl_Main (../generic/tclMain.c:339) ==27065== by 0x8048705: main (tclAppInit.c:87) ==27065== by 0x4035D8AD: __libc_start_main (in /lib/libc.so.6) ==27065== ==27065== LEAK SUMMARY: ==27065== definitely lost: 0 bytes in 0 blocks. ==27065== possibly lost: 0 bytes in 0 blocks. ==27065== still reachable: 132 bytes in 4 blocks. ==27065== suppressed: 0 bytes in 0 blocks. ==27065==
- login: "pointsman"
- mimetype: "text/plain"
- username: "pointsman"
- icomment:
Ticket change [04d4ccda1f] (rid 88944) by dgp on 2004-12-14 02:15:21:
- icomment:
File Deleted - 112020: File Added - 112328: 1083082.patch Logged In: YES user_id=80530 another patch update. please test again.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Add attachment "1083082.patch" [86f8053e6e] (rid 131611) by dgp on 2004-12-14 02:15:21.
Ticket change [26a5e3540e] (rid 88386) by pointsman on 2004-12-14 04:23:55:
- icomment:
Logged In: YES user_id=13222 Hey! Now, at least for the given very simple test script with only the exit trick from above, tcl cleans up *all* memory after itself. That's what valgrind say: ==24057== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 26 from 2) ==24057== malloc/free: in use at exit: 0 bytes in 0 blocks. ==24057== malloc/free: 5954 allocs, 5954 frees, 393712 bytes allocated. ==24057== For counts of detected errors, rerun with: -v ==24057== No malloc'd blocks -- no leaks are possible. Great!
- login: "pointsman"
- mimetype: "text/plain"
- username: "pointsman"
- icomment:
Ticket change [9255ecb18a] (rid 120749) by dgp on 2004-12-14 05:11:59:
- status changed to: "Closed"
Ticket change [e8e31b4981] (rid 104722) by dgp on 2004-12-14 05:12:00:
- closedate changed to: "2004-12-13T22:12:00"
- closer changed to: "dgp"
- icomment:
Logged In: YES user_id=80530 fixed in HEAD for 8.5a3
- login: "dgp"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- username: "dgp"