Artifacts Associated With Ticket 1381436
Ticket change [6e1c89f9e5] (rid 128817) by yahalom on 2005-12-15 10:07:20:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
tcl:8.4.2.12 thread: 2.6.2 windows: server 2003 when using tcl many threads tcl crashes. 0000: 41 70 70 6c 69 63 61 74 Applicat 0008: 69 6f 6e 20 46 61 69 6c ion Fail 0010: 75 72 65 20 20 74 63 6c ure tcl 0018: 73 68 38 34 74 2e 65 78 sh84t.ex 0020: 65 20 38 2e 34 2e 32 2e e 8.4.2. 0028: 31 32 20 69 6e 20 74 63 12 in tc 0030: 6c 38 34 74 2e 64 6c 6c l84t.dll 0038: 20 38 2e 34 2e 32 2e 31 8.4.2.1 0040: 32 20 61 74 20 6f 66 66 2 at off 0048: 73 65 74 20 30 30 30 36 set 0006 0050: 62 33 64 63 b3dc this looks like the same phenomena I reported in the past on bug number 859820 submitted on 2003-12-14 04:54. locking the open/close pipe with tsv::lock stops the crash a thing which supports my assumption. doesn't the patch that was created in the previous bug report inserted to the version? I tried to apply the bug suggested on that bug but I still get the error. can a new patch be created?
- foundin initialized to: "obsolete: 8.4.12"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "yahalom"
- subsystem initialized to: "49. Threading"
- title initialized to: "threaded tcl crashes"
- type initialized to: "Bug"
Ticket change [6aa416f306] (rid 128190) by yahalom on 2005-12-15 17:39:43:
- icomment:
Logged In: YES user_id=130120 compiling with symbos this is what I get: unsigned long TclpGetPid( Tcl_Pid pid)/* The HANDLE of the child process. */ { ProcInfo *infoPtr; Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { if (infoPtr->hProcess == (HANDLE) pid) { Tcl_MutexUnlock(&pipeMutex); ==> return infoPtr->dwProcessId; } } Tcl_MutexUnlock(&pipeMutex); return (unsigned long) -1; } the exception is on :return infoPtr->dwProcessId; - login: "yahalom"
- mimetype: "text/plain"
- username: "yahalom"
- icomment:
Ticket change [2fc4c22972] (rid 93130) by dkf on 2005-12-15 20:26:06:
- assignee changed to: "vasiljevic"
- priority changed to: "8"
Ticket change [da1873fdb1] (rid 107717) by vasiljevic on 2005-12-20 19:23:34:
- icomment:
Logged In: YES user_id=95086 Hm.... this is bad. The mutex is released too early, referencing the infoPtr->dwProcessId w/o protection. I do not know if this is the cause of the problem (have to examine that code more carefully) but on the first glance I'd do: if (infoPtr->hProcess == (HANDLE) pid) { unsigned long processId = infoPtr->dwProcessId; Tcl_MutexUnlock(&pipeMutex); return processId; } If you do this in your copy, can you still reproduce the bug? - login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [08c4a21a3c] (rid 89618) by yahalom on 2005-12-20 21:40:50:
- icomment:
Logged In: YES user_id=130120 I still get an exception but this time in a different place. TclpGetPid( Tcl_Pid pid)/* The HANDLE of the child process. */ { ProcInfo *infoPtr; Tcl_MutexLock(&pipeMutex); for (infoPtr = procList; infoPtr != NULL; infoPtr = infoPtr->nextPtr) { ==>if (infoPtr->hProcess == (HANDLE) pid) { unsigned long processId = infoPtr- >dwProcessId; Tcl_MutexUnlock(&pipeMutex); return processId; } } Tcl_MutexUnlock(&pipeMutex); return (unsigned long) -1; } - login: "yahalom"
- mimetype: "text/plain"
- username: "yahalom"
- icomment:
Ticket change [bba66834b7] (rid 129526) by vasiljevic on 2005-12-20 21:45:02:
- icomment:
Logged In: YES user_id=95086 Well, then it is pretty clear. The global "procList" is busted. This is more difficult to trace as I'm not very familiar with the Windows sources. I will give it a try though.
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [bb205f8ce8] (rid 129428) by yahalom on 2006-01-11 14:53:53:
- icomment:
Logged In: YES user_id=130120 I compiled tcl with mingw and the crash does not happen. it seems that compiling threaded tcl with vc 6 does not work well on windows 2003.
- login: "yahalom"
- mimetype: "text/plain"
- username: "yahalom"
- icomment:
Ticket change [208d8703dd] (rid 130446) by vasiljevic on 2006-01-11 21:52:08:
- icomment:
Logged In: YES user_id=95086 Great. What a mess... Did you try compiling with VC6 but turning OFF compiler optimizations?
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [252417ffb6] (rid 131234) by vasiljevic on 2006-01-15 02:28:58:
- icomment:
Logged In: YES user_id=95086 I do not know if this applies here but I have commited a fix to core-8-4-branch which closes a potential hole in TclVFS which MAY (not sure) be relevant to the described problem. Can you please checkout and try?
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [180648fc1a] (rid 122598) by yahalom on 2006-01-15 13:47:17:
- icomment:
Logged In: YES user_id=130120 I have a bit of work pressure so it will take some time. what file should I checkout?
- login: "yahalom"
- mimetype: "text/plain"
- username: "yahalom"
- icomment:
Ticket change [e1aa082ef4] (rid 87493) by vasiljevic on 2006-01-15 16:30:01:
- icomment:
Logged In: YES user_id=95086 Hey, no rush! The file is: generic/tclIOUtil.c for core-8-4-branch
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
- icomment:
Ticket change [b4f79669a8] (rid 125151) by yahalom on 2006-01-24 15:33:31:
- icomment:
Logged In: YES user_id=130120 I rechecked and the crash is happening with mingw. I tried the patch you suggested but it still crashed)-: I took the patch from bug 859820 I reported in the past and applied it to the 8.4.12 source and it seems to solve the problem. I do not know how tcl cvs is managed but this seems strange!!! I attach the patch from bug 859820 and the fixed file I made
- login: "yahalom"
- mimetype: "text/plain"
- username: "yahalom"
- icomment:
Ticket change [e4f6f1b4b5] (rid 88048) by vasiljevic on 2006-01-24 15:48:03:
- assignee changed to: "davygrvy"
- icomment:
Logged In: YES user_id=95086 Well, the cvs is managed pretty simple. Any developer who verifies and fixes the bug is free to apply it to the codebase unless the fix has some unwanted side effects. As a good netiquette, the one is expected to discuss this fix with the corresponding Tcl core-maintainer assiged to this subsystem and/or at the Tcl core maillist. This is now I usually work. In this case, the bug was obviously addressed but not applied to the codebase. I will reassign this open bug to David as I believe he's the one who made the patch you tried. If this fixes your problem, as it apparently does, I see no problem for David to apply the patch to both 8.4 and 8.5 core. David, can you please make sure this gets into the cvs?
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"
Ticket change [7e3ea93904] (rid 97371) by hobbs on 2006-02-16 07:23:35:
- icomment:
Logged In: YES user_id=72656 Can I get a confirmation of what needs to be applied for 8.4.13, if anything?
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "9 Immediate"
- username: "hobbs"
- icomment:
Ticket change [63b8d85fbb] (rid 92632) by dgp on 2006-03-10 10:08:04:
- icomment:
Logged In: YES user_id=80530 someone knowledgable please weigh in about what, if anything, needs doing before 8.4.13.
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d4077dce6f] (rid 123376) by davygrvy on 2006-03-10 14:52:45:
- icomment:
Logged In: YES user_id=7549 I really don't have my "fu" these days when it comes to coding. I'm just a bit out-of-practice. I'd go with my conclutions from 859820 and apply the diff from r1.39->r1.40 of tclWinPipe.c to the 8.4 branch.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [ad6be080f5] (rid 101467) by dgp on 2006-03-10 22:05:12:
- assignee changed to: "andreas_kupries"
Ticket change [aeaf84c925] (rid 101684) by andreas_kupries on 2006-03-15 03:38:01:
- closedate changed to: "2006-03-14T20:38:01"
- closer changed to: "andreas_kupries"
- icomment:
Logged In: YES user_id=75003 I have applied this diff to the 8.4 head now. Extended the comments a bit to explain the problem behind the fix.
- login: "andreas_kupries"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "andreas_kupries"
Ticket change [44a9b8477a] (rid 116747) by dkf on 2009-06-18 15:23:45:
- icomment:
allow_comments - 1
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment: