简体   繁体   English

如何配置Hudson linux从属服务器以生成核心文件?

[英]How do do configure a Hudson linux slave to generate core files?

I've seeing occasional segmentation faults in glibc on several different Fedora Core 9 Hudson Slaves. 我在几次不同的Fedora Core 9 Hudson从站上看到glibc偶尔出现分段错误。 I've attempted to configure each slave to generate core files and place them in /corefiles, but have had no luck. 我试图配置每个从属服务器以生成核心文件,并将它们放置在/ corefiles中,但是没有运气。

Here is what I've done on each linux slave: 这是我在每个Linux从站上所做的事情:

1) Create a corefile storage location 1)创建一个corefile存储位置
sudo install -m 1777 -d /corefiles

2) Directed the corefiles to the storage location by adding the following to /etc/sysctl.conf 2)通过将以下内容添加到/etc/sysctl.conf中 ,将corefiles定向到存储位置
kernel.core_pattern = /corefiles/core.%e-PID:%p-%t-signal_%s-%h

3) Enabled unlimited corefiles for all users by adding the following to /etc/profile 3)通过将以下内容添加到/ etc / profile中,为所有用户启用无限的corefiles
ulimit -c unlimited

Is there some additional Linux magic required or do I need to do something to the Hudson slave or JVM? 是否还需要其他一些Linux魔术,或者我需要对Hudson从站或JVM做些事情?

Thanks for the help 谢谢您的帮助

Did you reboot or run "sysctl -p" (as root) after editing /etc/sysctl.conf ? 您在编辑/etc/sysctl.conf后是否重新启动或运行“ sysctl -p”(作为root用户)?

Also, if i remember correctly, ulimit values are per user and calling ulimit wont survive a boot. 另外,如果我没记错的话,ulimit的值是每个用户的,调用ulimit不会在启动后幸存下来。 You should add this to /etc/security/limits.conf: 您应该将此添加到/etc/security/limits.conf中:

*  soft  core  unlimited

Or call ulimit in the script that starts hudson if you don't wont everyone to produce coredumps. 或者,如果您不是每个人都不会产生coredump,请在启动hudson的脚本中调用ulimit。

I figured this out :-). 我想通了:-)。

The issue is Hudson invokes the bash shell as a non-interactive shell, which will bypass the ulimit setting in /etc/profile . 问题在于,Hudson将bash shell作为非交互式shell调用,它将绕过/ etc / profile中的ulimit设置。 The solution is to add the BASH_ENV environmental variable tothe Hudson slaves and set the value to a file with ulimit -c unlimited set. 解决方案是将BASH_ENV环境变量添加到Hudson从站,并将该值设置为设置了ulimit -c unlimited的文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM