Jenkins OutOfMemory while Recording Tests Results

715 views
Skip to first unread message

Mehdi Hayani

unread,
Oct 23, 2013, 5:43:09 PM10/23/13
to jenkins...@googlegroups.com
Hi,

We are getting an OutOfMemory error in Jenkins while recording tests results.

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running com.plugin.TestPlugin
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 430.495 sec - in com.plugin.TestPlugin

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[JENKINS] Recording test results
java.lang.OutOfMemoryError: Java heap space
mavenExecutionResult exceptions not empty
message : Java heap space
Stack trace : 
java.lang.OutOfMemoryError: Java heap space
	at java.nio.HeapCharBuffer.<init>(HeapCharBuffer.java:57)
	at java.nio.CharBuffer.allocate(CharBuffer.java:331)
	at java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:792)
	at java.nio.charset.Charset.decode(Charset.java:810)
	at hudson.tasks.junit.SuiteResult.<init>(SuiteResult.java:215)
	at hudson.tasks.junit.SuiteResult.parseSuite(SuiteResult.java:147)
	at hudson.tasks.junit.SuiteResult.parse(SuiteResult.java:132)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:267)
	at hudson.tasks.junit.TestResult.parsePossiblyEmpty(TestResult.java:223)
	at hudson.tasks.junit.TestResult.parse(TestResult.java:192)
	at hudson.maven.reporters.SurefireArchiver.postExecute(SurefireArchiver.java:148)
	at hudson.maven.Maven3Builder$MavenExecutionListener.recordMojoEnded(Maven3Builder.java:453)
	at hudson.maven.Maven3Builder$MavenExecutionListener.mojoSucceeded(Maven3Builder.java:435)
	at org.jfrog.build.extractor.maven.BuildInfoRecorder.mojoSucceeded(BuildInfoRecorder.java:255)
	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:87)
	at org.apache.maven.lifecycle.internal.DefaultExecutionEventCatapult.fire(DefaultExecutionEventCatapult.java:42)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:228)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
	at org.jvnet.hudson.maven3.launcher.Maven3Launcher.main(Maven3Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:329)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:239)
channel stopped

Even chaging the JVM Xmx property to 2048Mo does not change the build output.

We think that this may occur because Jenkins tries to serialize test reports (which it's size in this case is about 325Mo) and send it from the slave (where the build is executed) to the master,


I would appreciate any suggestion on how to solve this issue.
Thanks in advance.


Regards,
Mehdi

Maureen Barger

unread,
Oct 23, 2013, 5:48:02 PM10/23/13
to jenkins...@googlegroups.com
Hi - you have to adjust Maven's heap -
job - configure - build - go to Maven section, click Advanced - add
new parameters to MAVEN_OPTS
ie -Xmx1024m -XX:PermSize=256m

Hope this helps!
> --
> You received this message because you are subscribed to the Google Groups
> "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jenkinsci-use...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

Mehdi Hayani

unread,
Oct 23, 2013, 6:02:48 PM10/23/13
to jenkins...@googlegroups.com
Hello Maureen,

I've already done this, but it didn't work :(

Maureen Barger

unread,
Oct 23, 2013, 6:18:23 PM10/23/13
to jenkins...@googlegroups.com
You may have to do it again with larger values. What are your MAVEN_OPTS now?

On Wed, Oct 23, 2013 at 6:02 PM, Mehdi Hayani <hayani....@gmail.com> wrote:
> Hello Maureen,
>
> I've already done this, but it didn't work :(
>

Mehdi Hayani

unread,
Oct 23, 2013, 6:22:40 PM10/23/13
to jenkins...@googlegroups.com
i'm using -Xmx2048m, Are you sure that chaging JVM property is the only way to solve this problem ?

James Nord (jnord)

unread,
Oct 23, 2013, 11:04:42 PM10/23/13
to jenkins...@googlegroups.com

Which version of Jenkins?

 

1.509.4 should have a fixed fix for this issue (unless all your tests are failing.)

 

/James

 

--

Reply all
Reply to author
Forward
0 new messages