简体   繁体   English

当用户注销节点时,Jenkins构建失败

[英]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.

相关问题 Jenkins构建因Windows上的GitLockFailedException而失败 - Jenkins build fails with GitLockFailedException on Windows 编译DLL Injector时构建失败 - Build fails when compiling DLL Injector 在 DLL 构建期间包含特定文件时,LoadLibrary 失败 - LoadLibrary fails when including a specific file during DLL build 在XCode上使用I / O Kit中的方法时,构建失败 - Build fails when using methods from I/O Kit on XCode 制作新项目时虚幻引擎 5 LevelBlueprint 无法构建 - Unreal Engine 5 LevelBlueprint fails to build when new project is made lib OSMesa离线上下文创建在C ++中失败,但仅在静态链接时才会失败 - lib OSMesa off-screen context creation fails in C++, but only when statically linked C ++代码可以使用正常的V8引擎编译良好,无法使用Node提供的V8进行编译 - C++ code compiles fine with normal V8 engine, fails to build with V8 provided by Node 以系统用户身份运行时,通过MSBuild进行构建失败 - Building via MSBuild fails when run as System User CMake:尝试在 Jenkins 构建机器上运行时出现“链接库”错误 (0xc0000135) - CMake: "Linked Library" error (0xc0000135) when attempting to run on Jenkins Build Machine OpenCV UWP构建失败 - OpenCV UWP build fails
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM