This is the recipe for setting up a MariaDB Buildbot slave on Windows:
pywin32-220.win-amd64-py2.7.exe, it seems to work. Twisted 16.2.0 for Python 2.7 64 bits buildbot 0.8.12. When this has been done, you run these commands:
cd <somewhere> mkdir buildbot cd buildbot bzr init-repo . C:\buildbot\buildbot-slave-0.8.3\build\scripts-2.7\buildslave.bat create-slave --usepty=0 <slavedir> hasky.askmonty.org:9989 <slavename> <passwd>
Adjust paths in the last command according to the location of your unpacked buildbot.
You get <slavename> and <passwd> from one of the MariaDB Corporation or MariaDB Foundation people handling the buildbot system. <slavedir> can be whatever you want - <slavename> is a good choice.
Please edit the files <slavedir>\info\admin and <slavedir>\info\host with your information. The host information should include your Windows version, 32 or 64 bit, and your Visual Studio version.
You can test the buildbot slave with this command:
C:\buildbot\buildbot-slave-0.8.3\build\scripts-2.7\buildslave.bat start <somewhere>\buildbot\<slavedir>
When buildbot starts, you should confgure it as a service instead of manually. See the instructions here. It's under the section "Windows Buildbot service setup". This document also has the generic Windows Buildbot installation documentation.
When buildbot is running in user session, and application that is started by buildbot crashes, you'll get a crash popup. There are popups that are generated by post-mortem debugging and there are popups that are generated by Windows Error reporting. It is hard (or impossible for those who did not try this before) to get rid of all popups. Thus, do run buildbot as service. There are no popups in services.
MTR attempts to call cdb via the Perl backticks operator, when mysqld.exe crashes. On the first run, cdb is downloading public Windows symbols from msdl.microsoft.com/download/symbols. The symbols are cached in C:\cdb_symbols, and following runs will be faster, however crashdump analysis on very first crash will typically take some time.
If you find this bothering, start the test with --mysqld=--gdb which will cause no crashdump files to be created and thus will prevent cdb from being called.
The process cannot access the file because it is being used by another process
This is due to the fact that buildbot does not clean up any processes left over from a previous run, and those processes may hold locks on files that are needed for a new build to start. Current workaround is to use windows job objects that allow to terminate entire process trees. We use special "process launcher" utility called "dojob . This will also require changing buildbot configuration for the builder.
Download dojob.cpp, and compile it with
cl dojob.cpp
Then, put dojob.exe into a directory in the PATH environment variable. Then, change buildbot configuration to use "dojob" for every command, as a replacement for "cmd /c", e.g
factory.addStep(Compile(
name = "cmake",
command=["dojob", WithProperties("cd c:\\buildbot\\%(buildername)s\\build && cmake .")]
));
ShellCommand.failed: command failed: SIGKILL failed to kill process
(Seen very seldom?). This usually happens after retrying multiple failing tests multiple times. It appears that MTR's --retries= option is not safe to use on Windows. The solution is to run the test with no --retries.
Connection to the other side was lost in a non-clean fashion.
This is a sympthom of intermittent network issues, which cause Buildbot to abort the current build altogether. The following workarounds are possible:
buildbot.tac file, specify a higher keepalive value, such as 60000.e1000 network adapter with vmxnet3 KeepAliveTime registry setting to a lower value, such as 60000 (equal to 60 seconds). For more information, see TechNet twisted.log says that data is frequently being loaded from on-disk pickles, increase the buildCacheSize in the master configuration file to be more than the number of builds per builder that the log file reports are being loaded. In case the default Windows buildbot setup is not sufficiently reliable due to "connection lost in a non-clean fashion" errors, the following setup can be used instead. It runs the buildbot deamon on a linux host while doing the builds on Windows, thus working around Twisted issues on Windows.
Note that the procedure below _significantly_ degrades the overall security of your Windows host. It is strongly recommended that a properly-firewalled, standalone virtual machine is used.
f_win2008r2_i386_release.addStep(ShellCommand(
command=["ssh", "-i", "/home/buildbot/keys/id_rsa", "buildbot@win2008r2-build", "cmd", "/C", "whoami"]
));
The following buildbot considerations apply under this setup:
© 2023 MariaDB
Licensed under the Creative Commons Attribution 3.0 Unported License and the GNU Free Documentation License.
https://mariadb.com/kb/en/buildbot-setup-buildbot-setup-for-windows/