PDA

View Full Version : Preventing hanging builds


kinook
12-18-2008, 12:00 PM
Some users have reported problems with Visual Build sometimes hanging during a build, usually with long-running builds in a virtual machine guest when the Visual Build GUI application is launched from a scheduled task. One of the following ended up resolving the problem for different users who reported it:

1) Make sure that you have the latest version (http://www.kinook.com/VBP/download.html) of Visual Build installed.

2) Uncheck Tools | User Options | Display | Automatically refresh panes during build.

3) Make sure that Tools | Application Options | Advanced | Maximum step output macro length is not set to 0 and is less than 10,000,000 (the default is 1,048,576).

4) Build with the console app (http://www.kinook.com/VisBuildPro/Manual/consoleapp.htm) instead of the GUI app.

5) Change Run Program steps from Read program output from Standard output to A file, and redirect the program output to the file

i.e., %DOSCMD% batch.cmd >%TEMP%\output.txt

6) Increase the amount of RAM on the machine and/or VM guest.

7) Stop anti-virus software on the build machine or add an exclusion for Visual Build to its active scanning.

8) Add the /mta command-line flag to all calls to VisBuildPro (http://www.kinook.com/VisBuildPro/Manual/command_linegui.htm)/VisBuildCmd (http://www.kinook.com/VisBuildPro/Manual/consoleapp.htm). In a VisBuildPro Project action, add /mta to the Additional options field on the Parameters tab.

9) In most cases, the latest version will eliminate hanging conditions. If not, to restore the legacy (v9) wait logic, add and build a Run Script step with code of
Application.Options.UseOldWaitMethod = True
and restart Visual Build.


In a few cases, users reported that the build completes but the VisBuildCmd.exe process does not exit, particularly when called from continuous integration tools such as CruiseControl.NET or Jenkins. A possible workaround in this case would be to add a Kill Process (http://www.kinook.com/VisBuildPro/Manual/killprocessaction.htm) action at the end of the project to terminate the build process ([Builder.ProcessID (http://www.kinook.com/VisBuildPro/Manual/processidproperty.htm)]).


In some cases, it wasn't Visual Build itself that hung, but a program called by Visual Build (for instance, msdev.exe, VB6.exe, etc.) that was never completing. This is likely the case if the build can still be aborted in Visual Build (it is just waiting for the process to complete). In these situations, one of the following often rectified the problem:

1) Disable multiple core CPU functionality in the BIOS.

2) Ensure the problem program runs with processor affinity to a single core/CPU. On the Advanced tab (http://www.kinook.com/VisBuildPro/Manual/programadvancedtab.htm) of the step that runs the problem program, specify a single CPU/core (i.e., 1 for the first) in the Affinity field.

3) Configure the step to terminate (https://kinook.com/VisBuildPro/Manual/stepfailure.htm) after some amount of time (More tab (https://kinook.com/VisBuildPro/Manual/stepfailure.htm)).


If none of the above helps, send the info from http://www.kinook.com/Forum/showthread.php?threadid=3044.