问题描述
我正在运行Jenkins作业,该作业会创建findbugs报告.似乎Findbugs
是内存和时间很紧,最初我遇到OutOfMemory错误问题,并且通过设置MAVEN_OPTS
变量
I am running a Jenkins job which creates findbugs report. It seems Findbugs
is memory and time hungry Initially I was facing OutOfMemory error issue and I increased memory by setting MAVEN_OPTS
variable i.e.
MAVEN_OPTS=-Xms512m -Xmx1024m -XX:MaxPermSize=512m.
现在我正面临超时:子流程中断异常.有什么建议可以摆脱这种情况吗?
Now I am facing Timeout: sub-process interrupted exception. Any suggestion how to get rid of this?
注意:我正在使用"mvn clean compile findbugs:findbugs"命令,如果我手动运行该命令,则该命令将正常工作(没有任何超时异常).
Note: I am using "mvn clean compile findbugs:findbugs" command and if I run it manually its working(without any timeout exception).
Findbugs版本:2.5.3詹金斯版本:1.545
Findbugs version: 2.5.3Jenkins version: 1.545
这是错误日志:
[INFO] [findbugs:findbugs {execution: default-cli}]
[INFO] Fork Value is false
[java] JVM args ignored when same JVM is used.
Timeout: sub-process interrupted
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Timeout: killed the sub-process
[INFO] ------------------------------------------------------------------------
[INFO] Trace
: Timeout: killed the sub-process
at org.apache.tools.ant.taskdefs.Java.run(Java.java:774)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at groovy.util.AntBuilder.nodeCompleted(AntBuilder.java:199)
at groovy.util.BuilderSupport.doInvokeMethod(BuilderSupport.java:147)
at groovy.util.AntBuilder.doInvokeMethod(AntBuilder.java:149)
at groovy.util.BuilderSupport.invokeMethod(BuilderSupport.java:64)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:756)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:730)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:170)
at org.codehaus.mojo.findbugs.FindBugsMojo.executeFindbugs(FindBugsMojo.groovy:997)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:86)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:230)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:912)
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnCurrentN(ScriptBytecodeAdapter.java:78)
at org.codehaus.mojo.findbugs.FindBugsMojo.execute(FindBugsMojo.groovy:786)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:182)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:65)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at hudson.maven.agent.Main.launch(Main.java:204)
at hudson.maven.MavenBuilder.call(MavenBuilder.java:154)
at hudson.maven.Maven2Builder.call(Maven2Builder.java:79)
at hudson.maven.Maven2Builder.call(Maven2Builder.java:55)
at hudson.remoting.UserRequest.perform(UserRequest.java:118)
at hudson.remoting.UserRequest.perform(UserRequest.java:48)
at hudson.remoting.Request$2.run(Request.java:328)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11 minutes 16 seconds
[INFO] Finished at: Mon Mar 24 04:13:52 PDT 2014
[INFO] Final Memory: 355M/910M
推荐答案
您可能需要检查 timeout
属性.默认情况下,它设置为10分钟.由于您的分析需要11分16秒,因此这可能是造成问题的原因.请注意,您还必须将 fork
设置为true
可以正常工作.
You may want to check the timeout
property of the Maven Findbugs plugin. It is set to 10 minutes by default. Since your analysis is taking 11 minutes 16 seconds, this may be the cause of your problems. Note that you must also set fork
to true
for this to work.
这篇关于詹金斯致命错误超时:杀死了子进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!