Artifacts Associated With Ticket 1939509fffffffff
Ticket change [3361d40245] (rid 106586) by nobody on 2008-04-10 15:34:55:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Sender: Wolfgang Schmid Siemens AG Munich, Germany E-Mail: [email protected] Phone: +49 89 636 41098 "Tclsh83" and "tclsh85" hang in exec command, if running on multiprocessor platforms. (The test program is running on a Windows-2003-Server with 2 Dual-Core-Xeons without HyperThreading.) That's our test environment: ("load,bat" runs "tclsh85" with the script "testexec.tcl" in an endless; "testexec.tcl" starts 5 times a program (Dos-Batch-Script) using "exec" command; the DOS-Batch-Script simply does "exit 0")) load.bat: (to be called from DOS prompt): ========= :loop D:\Tcl8.5.0\bin\tclsh85.exe clock.tcl>> trace.txt D:\Tcl8.5.0\bin\tclsh85.exe testexec.tcl goto loop testexec.tcl: ============= set fd [open "traceexec.txt" "w"] puts $fd "\ncallexec 1 started" flush $fd set status [catch { exec ./callexec.bat p1 p2 } outcmd] puts $fd "status: $status, result: $outcmd" puts $fd "callexec 1 terminated" flush $fd # 5 times the same stuff as above close $fd exit 0 callexec.bat:Batch-Script that does nothing: ============= @echo off rem echo "callproc started" >> callproc.txt exit 0 Two trace file will be created: - trace.txt contains time stamps when "tclsh85" is started - traceexec.txt contains loggings that "callexec.bat" was running and the appropriate exit codes After a short time (15 - 20 minutes), "tclsh85" hangs. ("No more trace entries are written to "trace.txt") Is there a chance of fining the error in Tcl8.3 ? Feel free to contact me via e-mail if information is missing. Regards, Wolfgang - foundin initialized to: "None"
- is_private initialized to: "0"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "Tcl hangs in "exec" (on multi-processor machines)"
- type initialized to: "Bug"
Ticket change [6d7ae087dc] (rid 128706) by dkf on 2008-04-11 16:11:07:
- assignee changed to: "andreas_kupries"
- foundin changed to: "obsolete: 8.5.2"
- priority changed to: "9 Immediate"
- subsystem changed to: "24. Channel Commands"
Ticket change [576950d41c] (rid 94485) by ferrieux on 2008-04-11 17:34:32:
- icomment:
Logged In: YES user_id=496139 Originator: NO Thanks for bumping it to prio 9 Donal, that's well deserved ;-)
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [e05f82a60e] (rid 115180) by dkf on 2008-04-11 21:13:12:
- icomment:
Logged In: YES user_id=79902 Originator: NO Someone's got to do bug triage, and crashes and hangs merit the highest priority initially.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [6902521e69] (rid 103169) by andreas_kupries on 2008-04-12 00:40:50:
- icomment:
Logged In: YES user_id=75003 Originator: NO Note that I cannot help with this. I have no multi-core box.
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [48c89f0126] (rid 99957) by nobody on 2008-04-14 15:26:23:
- icomment:
Logged In: NO Small updates on the problem description (from Wolfgang Schmid): We tried to run the test scripts on different multi-processor platforms and came to the following results: - Windows Server 2003 (SP1) 32-Bit with 4 CPUs (Xeon): Test scripts are running fine; no problems with "exec" - Windows Server 2003 R2, Standard 64 Bit edition with 4 CPUs (Xeon): Test fails The problem seems to happen, if "tclsh" (32 bit application) is running on a 64 Bit machine. Furhtermore I provide a small update of the test scripts: (as there were small inconsistencies in the scripts. load.bat: (to be called from DOS prompt): ========= :loop D:\Tcl8.5.0\bin\tclsh85.exe testexec.tcl >> trace.txt goto loop testexec.tcl: ============= puts "started at [clock format [clock seconds]]" flush stdout set fd [open "traceexec.txt" "w"] for {set i 0} {$i < 5} {incr i} { puts $fd "\ncallexec $i started" flush $fd set status [catch { exec ./callexec.bat p1 p2 } outcmd] puts $fd "status: $status, result: $outcmd" puts $fd "callexec $i terminated" flush $fd } close $fd exit 0 callexec.bat: ============= no changes - login: "[email protected]"
- mimetype: "text/plain"
- username: "[email protected]"
- icomment:
Ticket change [c67c7c2ccb] (rid 121779) by nobody on 2008-05-21 18:26:49:
- icomment:
Logged In: NO I have a similar problem, just under window XP (32 bit, dual core). Unix is fine. There are three scripts involved: A.tcl B.tcl D.tcl. D.tcl is a daemon and runs forever. A.tcl start B.tcl and waits on its return. B.tcl executes D.tcl in background (exec tclsh d.tcl). Then B.tcl calls exit, but A.tcl hangs in its exec call. If D.tcl is not excuted, A.tcl doesn't hang. It is always reproducable. A.tcl seems to hang on these lines from tclWinPipe.c:2899 if (ReadFile(handle, NULL, 0, &count, NULL) == FALSE || PeekNamedPipe(handle, NULL, 0, NULL, &count, NULL) == FALSE) { (There are three threads: PipeReaderThread, CallibrationThread, and TclTkProvide_Ex). - login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [615f37aba5] (rid 92231) by fridolin on 2008-05-23 16:52:30:
- icomment:
Logged In: YES user_id=13583 Originator: NO Update for the last comment: maybe this problem is not related to the orignal one, because now I can reproduce it on a single core machine and under linux. a.tcl: exec wish b.tcl # exec never returns, but b.tcl calls "exit" tk_messageBox -message return b.tcl: exec wish d.tcl & tk_messageBox -message exit # message exit appears if { [catch exit err] } { # you could also replace this block with a plain "exit" tk_messageBox -message err=$err } d.tcl: tk_messageBox -message d.tcl vwait forever when exec hangs, ps shows a zombi process 'wish <defunct>' Any ideas? Regards, Christoph Bauer - login: "fridolin"
- mimetype: "text/plain"
- username: "fridolin"
- icomment:
Ticket change [1b3716562b] (rid 123106) by ferrieux on 2008-08-21 06:00:49:
- icomment:
Logged In: YES user_id=496139 Originator: NO Just a reminder, this may be another facet of [Bug 1997007], the investigation of which is stalled for lack of an easy reproducing setup. All this smells like some fast sequence of Win32 calls near CreateProcess hit a race in the Vista kernel. Things like that can survive very long in a popular OS if the dominant usage is a different sequence... Anybody here knowing about Windows kernel-debugging ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [6cebb93585] (rid 128606) by ferrieux on 2008-08-21 06:02:03:
- icomment:
Logged In: YES user_id=496139 Originator: NO Just a reminder, this may be another facet of [Bug 1997007], the investigation of which is stalled for lack of an easy reproducing setup. All this smells like some fast sequence of Win32 calls near CreateProcess hit a race in the Vista kernel. Things like that can survive very long in a popular OS if the dominant usage is a different sequence... Anybody here knowing about Windows kernel-debugging ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [c302e6014c] (rid 111585) by ferrieux on 2009-03-26 21:29:08:
- icomment:
In hindsight, it seems hard to reproduce (no other complaints), and possibly restricted to Vista (can you try on W7 beta?). So I'm starting to regret the prio-9 remark. Maybe we could downgrade it to 8 to leave room for real show-stoppers ? IOW: I can't imagine tracking this without support from a Vista kernel debugger and/or wizard !
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [539cfa00d8] (rid 93788) by ferrieux on 2009-05-01 00:01:51:
- icomment:
Lowering to prio 8 for the reasons given before.
- login: "ferrieux"
- mimetype: "text/plain"
- priority changed to: "8"
- username: "ferrieux"
- icomment:
Ticket change [319c2a2643] (rid 93457) by pherricoxide on 2009-09-24 06:31:50:
- icomment:
I've experienced this same problem with both a TCL script calling the Cadence command line utility dsreportgen.exe using exec and also with a TCL script calling another tclsh85 process with exec. It is very intermittent though. Hardware, Windows Vista Business Service Pack 2 Dual Intel Xeon L5408's 8GB RAM If anyone could look into this it would really be appreciated.
- login: "pherricoxide"
- mimetype: "text/plain"
- username: "pherricoxide"
- icomment:
Ticket change [94d79324e8] (rid 106066) by ferrieux on 2009-09-24 13:36:29:
- icomment:
A good way to make progress would be to increase the probability of the bug, and also to try to correlate with timing aspects: - relative frequencies with the child being (a) dsreportgen, (b) tclsh and (c) cmd (bat files) ? - lifecycle in each case: is the child short or long-lived ? Do you spawn many of them quickly at the time of hang, or is it just an isolated [exec] ? If many, do you spawn them from the same parent or in parallel ones ? Other things to consider too: - try fiddling with the various compatibility and admin-rights flags of the parent and child executables - any possibility of trying Windows7 ? - any knowledge of advanced Windows kernel debugging tools (logging on serial port etc) ?
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [1bacb6f85a] (rid 123191) by ferrieux on 2010-06-13 00:34:03:
- icomment:
Interestingly, forcing proc affinity to the child solves the deadlock: http://groups.google.com/group/comp.lang.tcl/tree/browse_frm/thread/0cff7fd479f75ea7/4332bb3a0d7ddefb?rnum=1&_done=%2Fgroup%2Fcomp.lang.tcl%2Fbrowse_frm%2Fthread%2F0cff7fd479f75ea7%2F975e5a2cb6c7b291%3F#doc_ac3dfecffa4a245d
- login: "ferrieux"
- mimetype: "text/plain"
- username: "ferrieux"
- icomment:
Ticket change [ffaa438263] (rid 153490) by sebres on 2017-05-03 10:42:20:
- assignee changed to: "aku"
- closedate changed to: "2457876.94607473"
- closer changed to: "sebres"
- comment changed to:
Sender: Wolfgang Schmid Siemens AG Munich, Germany E-Mail: [email protected] Phone: +49 89 636 41098 "Tclsh83" and "tclsh85" hang in exec command, if running on multiprocessor platforms. (The test program is running on a Windows-2003-Server with 2 Dual-Core-Xeons without HyperThreading.) That's our test environment: ("load,bat" runs "tclsh85" with the script "testexec.tcl" in an endless; "testexec.tcl" starts 5 times a program (Dos-Batch-Script) using "exec" command; the DOS-Batch-Script simply does "exit 0")) load.bat: (to be called from DOS prompt): ========= :loop D:\Tcl8.5.0\bin\tclsh85.exe clock.tcl>> trace.txt D:\Tcl8.5.0\bin\tclsh85.exe testexec.tcl goto loop testexec.tcl: ============= set fd [open "traceexec.txt" "w"] puts $fd "\ncallexec 1 started" flush $fd set status [catch { exec ./callexec.bat p1 p2 } outcmd] puts $fd "status: $status, result: $outcmd" puts $fd "callexec 1 terminated" flush $fd # 5 times the same stuff as above close $fd exit 0 callexec.bat:Batch-Script that does nothing: ============= @echo off rem echo "callproc started" >> callproc.txt exit 0 Two trace file will be created: - trace.txt contains time stamps when "tclsh85" is started - traceexec.txt contains loggings that "callexec.bat" was running and the appropriate exit codes After a short time (15 - 20 minutes), "tclsh85" hangs. ("No more trace entries are written to "trace.txt") Is there a chance of fining the error in Tcl8.3 ? Feel free to contact me via e-mail if information is missing. Regards, Wolfgang - icomment:
fixed in core-8-5-branch-fix-1997007 (and in fix-1997007 for 8.6/trunk)
- login: "sebres"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- severity changed to: "Minor"
- status changed to: "Closed"