[英]Jenkins build fails when user logs off node
Sometimes, builds done by Jenkins (1.461) will stop at a random spot somewhere in the middle. 有时,詹金斯(1.461)所做的构建会在中间某个位置的任意位置停止。 These builds are manually scripted calls to Visual Studio 2008 SP1's devenv.com for primarily C++ code.
这些生成是对主要用于C ++代码的Visual Studio 2008 SP1的devenv.com的手动脚本调用。 Visual Studio emits no error messages;
Visual Studio不会发出任何错误消息。 the last message in devenv's log is some random file being built.
devenv日志中的最后一条消息是正在构建的一些随机文件。 The Jenkins build fails because of a post-build Windows batch command that relies on some of the build outputs.
由于后生成Windows批处理命令依赖于某些生成输出,因此Jenkins生成失败。 This happens fairly rarely (roughly 1 in 15 builds).
这种情况很少发生(大约每15个构建中就有1个)。 Jenkins's error log shows nothing out of the ordinary around the time the build fails.
詹金斯(Jenkins)的错误日志在构建失败的任何时候都没有显示异常。 Surprisingly, it says the build succeeded, even though it shows it as failed everywhere else.
令人惊讶的是,它表示构建成功,即使它在其他任何地方都显示为失败。
The problem is isolated to Jenkins. 这个问题只存在于詹金斯身上。 The same build script run at a developer's desk has never failed in this way.
在开发人员处运行的相同构建脚本从未以这种方式失败。
The Jenkins nodes are 32-bit Windows XP machines. Jenkins节点是32位Windows XP计算机。 They all have ample available disk space.
它们都有足够的可用磁盘空间。 Jenkins is configured to only run one job at a time per node.
Jenkins配置为每个节点一次只能运行一项作业。 The event logs show no obviously bad things (eg, Visual Studio crashes) happening at the times when the builds stop.
事件日志显示在构建停止时没有明显的坏事发生(例如,Visual Studio崩溃)。
Does anyone have any ideas of things to look into to troubleshoot this? 是否有人对解决此问题有任何想法?
I don't recall ever having this problem with jenkins myself, but I have regular linker crashes in MSVC 2008. This happens almost everyday for me. 我不记得自己曾经遇到过jenkins这个问题,但是我在MSVC 2008中经常发生链接器崩溃。这种情况几乎每天都会发生在我身上。 If it is the linker crashing then that could be an explanation.(perhaps a linker crash is not logged?)
如果是链接器崩溃,则可能是一个解释。(也许未记录链接器崩溃?)
Edit: We use MSVC2008 SP1 on 32-bit Win7. 编辑:我们在32位Win7上使用MSVC2008 SP1。 We use MSBuild 3.5 when building the c++ solutions.
在构建c ++解决方案时,我们使用MSBuild 3.5。
We ended up correlating the random build failures with logoff events on the Jenkins nodes. 我们最终将随机构建失败与Jenkins节点上的注销事件相关联。 This lead to this JVM bug/feature (Oracle Java bug ID 6871190), where a logoff event in Windows causes the signal handlers to terminate the JVM.
这导致此JVM错误/功能 (Oracle Java错误ID 6871190),其中Windows中的注销事件导致信号处理程序终止JVM。 You can disable this behavior (perhaps with other downsides) by passing the -Xrs option to the JVM, but that option will not automatically propagate to child Java processes.
您可以通过将-Xrs选项传递给JVM来禁用此行为(也许还有其他缺点),但是该选项不会自动传播到子Java进程。
We are passing -Xrs to kick off Jenkins itself, and the Jenkins service itself lives through a logoff. 我们正在通过-Xrs来启动Jenkins本身,并且Jenkins服务本身通过注销来生存。 The current hypothesis is that some part of Jenkins's build process is kicked off through another Java child process who is not invoked with -Xrs.
当前的假设是,Jenkins的构建过程的某些部分是通过另一个Java子进程开始的,该子进程未使用-Xrs调用。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.