检查 SVN 修改时 Cruisecontrol 挂起
由于将 Cruisecontrol 构建服务器迁移到新机器,它有时会在构建周期的“修改集”阶段挂起(它配置为每 15 分钟检查一次修改)。 Cruisecontrol 本身保持响应,只是构建没有进展。
发生这种情况时,CPU 上没有显着的负载,并且我已经看到它保持这种状态一个小时或更长时间,尽管它似乎最终会摆脱这种状态。发生这种情况的项目似乎没有任何模式。硬件是全新的,我运行了内存测试,没有任何问题。
这是系统配置:
- Ubuntu 9.04服务器,amd64,完全升级的
- svn版本1.5.4(r33841) - 最新版本apt-get将安装
- Sun JRE 64位构建1.6.0_16-b01 - 再次,最新版本
- CruiseControl 2.7 .3(不是最新的)
这就是我的修改集的样子
<modificationset quietperiod="10">
<veto><!-- there are several of these -->
<triggers>
<svn LocalWorkingCopy="${checkout_dir}/base" />
</triggers>
<buildstatus logdir="${log_dir}/base" />
</veto>
<timebuild time="2330" />
<svn LocalWorkingCopy="${checkout_dir}/${project.name}" />
</modificationset>
那么这里可以做什么?
编辑:这是cruisecontrol日志文件的摘录,显示projectA在16:07挂起(现在在17:48仍然挂起)
2009-10-27 16:07:55,096 [Thread-38860] INFO Project - Project projectA: bootstrapping
2009-10-27 16:07:55,096 [Thread-38860] INFO ProjectController - projectA Controller: build progress event: bootstrapping
2009-10-27 16:07:55,262 [Thread-38862] INFO ScriptRunner - Buildfile: work/build-cruisecontrol.xml
2009-10-27 16:07:59,230 [Thread-38860] INFO AntBootstrapper - Bootstrap successful.
2009-10-27 16:07:59,230 [Thread-38860] INFO Project - Project projectA: checking for modifications
2009-10-27 16:07:59,230 [Thread-38860] INFO ProjectController - projectA Controller: build progress event: checking for modifications
2009-10-27 16:11:14,954 [Project projectB thread] INFO Project - Project projectB: in build queue
Since migrating a Cruisecontrol build server to a new machine, it sometimes hangs during the "modificationset" stage of the build cycle (it is configured to check for modifications every 15 minutes). Cruisecontrol itself stays responsive, only the build does not progress.
There is no significant load on the CPU when this happens, and I've seen it stay in this state for an hour or more, though it seems to break out of this state eventually. There doesn't seem to be a pattern to which projects it happens to. The hardware is brand new, and I have run a memtest with no problems.
This is the system configuration:
- Ubuntu 9.04 server, amd64, fully upgraded
- svn version 1.5.4 (r33841) - the most recent version apt-get will install
- Sun JRE 64 bit build 1.6.0_16-b01 - again, most recent version
- CruiseControl 2.7.3 (not the most recent)
This is how my modificationsets look like
<modificationset quietperiod="10">
<veto><!-- there are several of these -->
<triggers>
<svn LocalWorkingCopy="${checkout_dir}/base" />
</triggers>
<buildstatus logdir="${log_dir}/base" />
</veto>
<timebuild time="2330" />
<svn LocalWorkingCopy="${checkout_dir}/${project.name}" />
</modificationset>
So what could be done here?
Edit: Here's a excerpt from the cruisecontrol log file, showing projectA hanging at 16:07 (it is still hanging now at 17:48)
2009-10-27 16:07:55,096 [Thread-38860] INFO Project - Project projectA: bootstrapping
2009-10-27 16:07:55,096 [Thread-38860] INFO ProjectController - projectA Controller: build progress event: bootstrapping
2009-10-27 16:07:55,262 [Thread-38862] INFO ScriptRunner - Buildfile: work/build-cruisecontrol.xml
2009-10-27 16:07:59,230 [Thread-38860] INFO AntBootstrapper - Bootstrap successful.
2009-10-27 16:07:59,230 [Thread-38860] INFO Project - Project projectA: checking for modifications
2009-10-27 16:07:59,230 [Thread-38860] INFO ProjectController - projectA Controller: build progress event: checking for modifications
2009-10-27 16:11:14,954 [Project projectB thread] INFO Project - Project projectB: in build queue
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
另一个想法。您始终可以在调试模式下启动 CruiseControl JVM。每当它挂起时,请使用某些 IDE(例如 Eclipse)连接到它。然后,您可以查看 CC 应用程序的所有线程,并暂停其中一些线程,看看它们在忙什么。
Another idea. You could always start the CruiseControl JVM in debug mode. And whenever it hangs, connect to it using some IDE, e.g. Eclipse. And then you could all the threads of the CC application, and pause some of them and see what are they busy with.
您是否尝试过从命令行手动发出相同的 SVN 命令?那还挂吗?
Have you tried issuing the same SVN commands manually from the command line? Does it hang then?
只是一些提示:
它是否在一天中的特定时间挂起?还是真的是随机的?是否有新的备份关闭了备份服务?
您是否将新 Cruise 服务器的 config.xml 与旧服务器的 config.xml 进行了比较(假设两者的 Cruise 版本相同,它们是否具有完全相同的任务,或者是否存在可能会减慢修改集任务速度的内容) ?
旧机器和新机器是否与您的 subversion 存储库位于同一网络上(或者至少它们在访问所有项目存储库时具有相似的响应时间?)鉴于 Cruise 服务器本身保持响应,是否有可能它在接近挂起时访问的特定项目存储库太大、太慢或存储库中发生了太多事情?
这些只是故障排除指南 - 因此它们绝不是您问题的实际答案。这也许就是我解决问题的方法(除了像 GrzegorzOledzki 的答案那样手动运行命令之外)。
Just some pointers:
Does it hang at a particular time of the day? Or is it really random? Any new backups in place which shutdown the service for backup?
Have you compared the config.xml of the new cruise server with that of the old (assuming the cruise version is identical on both, do they have the exact same tasks or is there something that might be slowing down the modificationset task)?
Do the old and the new machines sit on the same networks as your subversion repositories (or at least do they have similar response times in accessing all the project repositories? ) Given that the cruise server itself remains responsive is it possible that the particular project repo it is accessing at the time of near-hang is too big, too slow or has too much going on in the repository?
These are just troubleshooting pointers - so they are by no means actual answers to your question. This is perhaps how I'd approach the problem (besides running the commands manually as in GrzegorzOledzki's answer).