java OutOfMemoryError in hudson

38 views
Skip to first unread message

sravan

unread,
Feb 2, 2011, 9:05:23 PM2/2/11
to Jenkins Users, srav...@gmail.com

Im getting the following error while running pmd, findbugs in hudson.

FATAL: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.HashMap.(Unknown Source)
at
hudson.plugins.analysis.util.model.AnnotationContainer.initialize(AnnotationContainer.java:
163)
at hudson.plugins.analysis.util.model.AnnotationContainer.
(AnnotationContainer.java:119)
at hudson.plugins.analysis.util.model.WorkspaceFile.
(WorkspaceFile.java:25)
at
hudson.plugins.analysis.util.model.AnnotationContainer.addFile(AnnotationContainer.java:
303)
at
hudson.plugins.analysis.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:
212)
at
hudson.plugins.analysis.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:
317)
at
hudson.plugins.analysis.util.model.AnnotationContainer.addAnnotations(AnnotationContainer.java:
327)
at
hudson.plugins.analysis.core.BuildResult.initialize(BuildResult.java:
266)
at hudson.plugins.analysis.core.BuildResult.(BuildResult.java:
206)
at hudson.plugins.findbugs.FindBugsResult.(FindBugsResult.java:
40)
at
hudson.plugins.findbugs.FindBugsPublisher.perform(FindBugsPublisher.java:
132)
at
hudson.plugins.analysis.core.HealthAwarePublisher.perform(HealthAwarePublisher.java:
280)
at hudson.tasks.BuildStepMonitor$2.perform(BuildStepMonitor.java:
27)
at hudson.model.AbstractBuild
$AbstractRunner.perform(AbstractBuild.java:603)
at hudson.model.AbstractBuild
$AbstractRunner.performAllBuildSteps(AbstractBuild.java:582)
at hudson.model.AbstractBuild
$AbstractRunner.performAllBuildSteps(AbstractBuild.java:560)
at hudson.model.Build$RunnerImpl.post2(Build.java:156)
at hudson.model.AbstractBuild
$AbstractRunner.post(AbstractBuild.java:529)
at hudson.model.Run.run(Run.java:1349)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:
88)
at hudson.model.Executor.run(Executor.java:139)

I have specified jvmargs for pmd, findbugs and ant_opts is set to
1024M.

Kohsuke Kawaguchi

unread,
Feb 2, 2011, 9:13:20 PM2/2/11
to jenkins...@googlegroups.com, sravan

Please see
http://wiki.jenkins-ci.org/display/JENKINS/I'm+getting+OutOfMemoryError
and help us help you.


--
Kohsuke Kawaguchi | CloudBees, Inc. | http://cloudbees.com/

Sravan kumar Revuru

unread,
Feb 2, 2011, 9:21:15 PM2/2/11
to Kohsuke Kawaguchi, jenkins...@googlegroups.com
Thanks Koshuke, 

I consistently see OOME around the same phase in a build. So, i think it just needs a big memory...
I have given jvmargs as -Xmx1024m -Xms1024m

but still im getting the same issue.
can u plz tell me where can i do this:

Run JVM with -XX:+HeapDumpOnOutOfMemoryError so that JVM will automatically produce a heap dump when it hits OutOfMemoryError.


Thanks,
Sravan kumar R

Ullrich Hafner

unread,
Feb 3, 2011, 3:44:48 AM2/3/11
to jenkins...@googlegroups.com
Did you change the memory settings for your job or the master? Since the warnings are processed on the master you may need to change the settings on the master, too.

Note that the analysis suite currently is not capable of handling projects with #warnings > 10k, see http://issues.jenkins-ci.org/browse/JENKINS-1960. How many warnings do you have?

Ulli

Sravan kumar Revuru

unread,
Feb 3, 2011, 11:18:56 AM2/3/11
to jenkins...@googlegroups.com
Hi Ulli,

Now I have changed the memory settings in manage hudson (please refer attachment)

I'm getting the following error
Please let me know if i am doing wrong and where can I change the settings...

BUILD SUCCESSFUL 
Total time: 16 minutes 40 seconds
FATAL: Java heap space
java.lang.OutOfMemoryError
: Java heap space
	at org.jvnet.winp.Native.getCmdLineAndEnvVars(Native Method)
	at org.jvnet.winp.WinProcess.parseCmdLineAndEnvVars(WinProcess.java:114)
	at org.jvnet.winp.WinProcess.getEnvironmentVariables(WinProcess.java:109)
	at hudson.util.ProcessTree$Windows$1.getEnvironmentVariables(ProcessTree.java:419)
	at hudson.util.ProcessTree$OSProcess.hasMatchingEnvVars(ProcessTree.java:259)
	at hudson.util.ProcessTree$Windows.killAll(ProcessTree.java:441)
	at hudson.Launcher$LocalLauncher.kill(Launcher.java:657)
	at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:422)
	at hudson.model.Run.run(Run.java:1325)
	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
	at hudson.model.ResourceController.execute(ResourceController.java:88)
	at hudson.model.Executor.run(Executor.java:139)
Thanks,
Sravan kumar R
Hudson_settings.doc

Ullrich Hafner

unread,
Feb 3, 2011, 12:40:50 PM2/3/11
to jenkins...@googlegroups.com
I don't think that this option helps.

How do you start Hudson? Can you add the parameters to that command? E.g. java -jar jenkins.war -Xms256m -Xmx1024m

Ulli

Sravan kumar Revuru

unread,
Feb 3, 2011, 12:49:03 PM2/3/11
to jenkins...@googlegroups.com
No, Its deployed in tomcat 6. 
So I generally start the server and follow the link   http://localhost:8080/hudson/


Thanks,
Sravan kumar R

Ulli Hafner

unread,
Feb 3, 2011, 12:53:08 PM2/3/11
to jenkins...@googlegroups.com
Then you need to assign more memory in Tomcat for that application.

See: http://wiki.jenkins-ci.org/display/JENKINS/Tomcat

Ulli
Reply all
Reply to author
Forward
0 new messages