MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #30430 All Revisions ] Back to Issue ]
Summary 0030430: Draw - command testgrid in parallel mode hangs if DRAW is launched without GUI
Revision 2019-01-08 21:31 by abv
Description It is impossible to run testgrid command in parallel mode using DRAW option -f (or -c): it just hangs.

The problem has been identified after fix of 0030377, however it does exist in all versions of OCCT that I have tried (6.8.0 till current), and for all tested versions of Tcl (including ActiveTcl 8.6, standard Tcl 8.6.4, 8.6.8, 8.7.0a - all built from sources).

The symptoms are as follows.

1. The test script succeeds in creating thread pool and setting up jobs, and hangs on waiting for jobs to complete. If job script is replaced by some Tcl command instead of exec (e.g. puts), it works fine. The jobs hangs only when it contains "exec" command, and does hang regardless of what executable is used (I have tried "git status" - just the same as executed successfully in the beginning of the testgrid command, and it hangs in the same way as DRAWEXE).

2. Under debugger, the execution successfully goes to creation of the process (in tclWinPipe.c, function TclpCreateProcess()): CreateProcess returns non-zero and yields some non-zero PID. The program then waits infinitely in

3. If non-existing command is fed to exec instead of DRAWEXE, the jobs complete correctly (all tests fail) but execution hangs in tpool::release again waiting for some events (threadPoolCmd.c, function TpoolRelease())

4. Testgrid works OK if Tk_Init() is called (it is called when DRAW is executed interactively but not with -c or -f options -- in that case it sets variable Draw_VirtualWindows to true an skips initialization of Tk). If DRAW is built without Tk at all, testgrid hangs in the same way.

In Tk_Init(), the crucial point looks to be the call to TkListCreateFrame(): if it is bypassed (in debugger), the hang up is reproduced.

5. Testgrid works OK if DRAW runs in batch mode, i.e. without creation of separate thread for evaluation of Tcl commands. That mode can be enabled by option -b, but requires patch for 0030377 to work.
Revision 2019-01-04 00:38 by abv
Description It is impossible to run testgrid command in parallel mode using DRAW option -f (or -c): it just hangs.

The problem has been identified after fix of 0030377, however it does exist in all versions of OCCT that I have tried (6.8.0 till current), and for all tested versions of Tcl (including ActiveTcl 8.6, standard Tcl 8.6.4, 8.6.8, 8.7.0a - all built from sources).

The symptoms are as follows.

1. The test script succeeds in creating thread pool and setting up jobs, and hangs on waiting for jobs to complete. If job script is replaced by some Tcl command instead of exec (e.g. puts), it works fine. The jobs hangs only when it contains "exec" command, and does hang regardless of what executable is used (I have tried "git status" - just the same as executed successfully in the beginning of the testgrid command, and it hangs in the same way as DRAWEXE).

2. Under debugger, the execution successfully goes to creation of the process (in tclWinPipe.c, function TclpCreateProcess()): CreateProcess returns non-zero and yields some non-zero PID. The program then waits infinitely in

3. If non-existing command is fed to exec instead of DRAWEXE, the jobs complete correctly (all tests fail) but execution hangs in tpool::release again waiting for some events (threadPoolCmd.c, function TpoolRelease())

4. Testgrid works OK if Tk_Init() is called (it is called when DRAW is executed interactively but not with -c or -f options -- in that case it sets variable Draw_VirtualWindows to true an skips initialization of Tk). If DRAW is built without Tk at all, testgrid hangs in the same way.

In Tk_Init(), the crucial point is call to TkListCreateFrame(): if it is bypassed (in debugger), the hang up is reproduced.
Revision 2019-01-03 12:35 by abv
Description It is impossible to run testgrid command in parallel mode using DRAW option -f (or -c): it just hangs.

The problem has been identified after fix of 0030377, however it does exist in all versions of OCCT that I have tried (6.8.0 till current), and for all tested versions of Tcl (including ActiveTcl 8.6, standard Tcl 8.6.4, 8.6.8, 8.7.0a - all built from sources).

The symptoms are as follows.

1. The test script succeeds in creating thread pool and setting up jobs, and hangs on waiting for jobs to complete. If job script is replaced by some Tcl command instead of exec (e.g. puts), it works fine. The jobs hangs only when it contains "exec" command, and does hang regardless of what executable is used (I have tried "git status" - just the same as executed successfully in the beginning of the testgrid command, and it hangs in the same way as DRAWEXE).

2. Under debugger, the execution successfully goes to creation of the process (in tclWinPipe.c, function TclpCreateProcess()): CreateProcess returns non-zero and yields some non-zero PID. The program then waits infinitely in

3. If non-existing command is fed to exec instead of DRAWEXE, the jobs complete correctly (all tests fail) but execution hangs in tpool::release again waiting for some events (threadPoolCmd.c, function TpoolRelease())

4. Testgrid works OK if Tk_Init() is called (it is called when DRAW is executed interactively but not with -c or -f options -- in that case it sets variable Draw_VirtualWindows to true an skips initialization of Tk). If DRAW is built without Tk at all, testgrid hangs in the same way.


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker