Artifacts Associated With Ticket 406058ffffffffffffffffffffffffffffffffff
Ticket change [f58c09d0f6] (rid 130132) by villalba on 2001-03-05 17:21:49:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
working with Thread-2.1 under Windows-NT I found the following bug. While executing for {set i 0} {$i < 1000} {incr i} { set T [thread::create] catch "thread::send $T thread::exit" } you can see in Task manager (of windows) that the number of handles* grows up. * under processes in task manager choose columns in View menu and mark number of handles. Greetings, Villalba - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "villalba"
- subsystem initialized to: "None"
- title initialized to: "Bug in thread library"
- type initialized to: "Bug"
Ticket change [db16eed9cf] (rid 107901) by dkf on 2001-03-06 17:24:36:
- subsystem changed to: "49. Threading"
Ticket change [6915fc5b70] (rid 103184) by davygrvy on 2001-04-26 04:36:58:
- icomment:
Logged In: YES user_id=7549 change the catagory to the thread package, please. see https://sourceforge.net/tracker/index.php? func=detail&aid=418689&group_id=10894&atid=110894 for a possible solution.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [209e868f31] (rid 130456) by dgp on 2001-04-26 05:03:08:
- icomment:
Logged In: YES user_id=80530 Changed category as requested.
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "80. Thread Package"
- username: "dgp"
- icomment:
Ticket change [f3c8e3a2a5] (rid 129779) by dgp on 2001-04-26 05:24:01:
- assignee changed to: "davygrvy"
Ticket change [f6b74d7e89] (rid 130341) by davygrvy on 2001-04-28 10:01:38:
- closedate changed to: "2001-04-28T03:01:38"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 See https://sourceforge.net/tracker/index.php? func=detail&aid=419683&group_id=10894&atid=110894 for the proposed fix.
- login: "davygrvy"
- mimetype: "text/plain"
- resolution changed to: "Duplicate"
- status changed to: "Closed"
- username: "davygrvy"
Ticket change [6abbe2a6d1] (rid 128204) by villalba on 2001-05-10 20:50:11:
- closedate changed to: "2001-05-10T13:50:11"
- closer changed to: "villalba"
- icomment:
Logged In: YES user_id=166340 It isn´t a problem of the thread library, but Tcl core. Pay attention to the following easy example. #include <tcl.h> int ThreadMainProc( int& I ) { I = 0; return 0; } int main( void ) { int I = 1; Tcl_ThreadId* ThreadId = NULL; // At this point the number of handles is 14 and of threads 1. if( Tcl_CreateThread( ThreadId, (unsigned int (__stdcall *)(void *)) ThreadMainProc, &I, TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS ) != TCL_OK) { return 1;// Error handle } // This loop is finished by the thread. // At this point the number of handles is 15 and of threads 2. while( I ) printf( "%d", I ); // At this point the number of handles is 15 and of threads 1, i.e. the thread is dead. return 0; } - login: "villalba"
- mimetype: "text/plain"
- username: "villalba"
Ticket change [8bc3c887f1] (rid 127634) by davygrvy on 2001-05-11 02:11:31:
- icomment:
Logged In: YES user_id=7549 See http://sourceforge.net/tracker/? func=detail&atid=110894&aid=419683&group_id=10894 for the patch that fixes your problem as was stated before.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [061efb93e2] (rid 89165) by nobody on 2001-05-11 05:18:42:
- icomment:
File Added - 6187: test1.c
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Add attachment "test1.c" [ba6121aeff] (rid 129316) by nobody on 2001-05-11 05:18:42.
Ticket change [a92bdf6d97] (rid 99112) by davygrvy on 2001-05-11 05:22:05:
- closedate changed to: "2001-05-10T22:22:05"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 Under deeper inspection of your code, I'd like to edit it for better cross-platform support of the threading macros in tcl.h. Honestly, casting of function types is evil. Especially the calling convention part. I don't think I'm being nit-picky because the compiler will emit different different machine code for __cdecl and __stdcall. Try it and look at the difference of the stack handling of the listing .asm file. There's no handle leak present with the patch from 419683 applied.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
Ticket change [c9fa811f46] (rid 122382) by villalba on 2001-05-11 21:22:04:
- closedate changed to: "2001-05-11T14:22:04"
- closer changed to: "villalba"
- icomment:
Logged In: YES user_id=166340 I´ve tried the patch http://sourceforge.net/tracker/? func=detail&atid=110894&aid=419683&group_id=10894 but it isn´t successful.
- login: "villalba"
- mimetype: "text/plain"
- username: "villalba"
Ticket change [c7e1bfc03f] (rid 122017) by davygrvy on 2001-05-12 05:40:54:
- closedate changed to: "2001-05-11T22:40:54"
- closer changed to: "davygrvy"
- icomment:
Logged In: YES user_id=7549 All I can say is that it worked for me and dropping the handle reference in Tcl_CreateThread did cause the app's handle count to decrement when the thread closed. If you have any other ideas for a fix, let me know.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
Ticket change [5a3ed94bb9] (rid 118108) by davygrvy on 2001-05-12 06:24:44:
- status changed to: "Open"
Ticket change [6b17397e2b] (rid 128254) by davygrvy on 2001-05-12 06:28:51:
- icomment:
Logged In: YES user_id=7549 I should have said, "never caused the app's handle count to increment at all."
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [e4a51244f3] (rid 87987) by davygrvy on 2001-05-27 10:22:40:
- closedate changed to: "2001-05-27T03:22:40"
- closer changed to: "davygrvy"
- status changed to: "Closed"