Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » RCP Testing Tool » java.lang.OutOfMemoryError: Java heap space in Runner(236 test cases, after about 170 runner exits with java.lang.OutOfMemoryError: Java heap space)
java.lang.OutOfMemoryError: Java heap space in Runner [message #1746764] Fri, 04 November 2016 10:35 Go to next message
Marcus Höpfner is currently offline Marcus HöpfnerFriend
Messages: 48
Registered: February 2014
Member
Hi,

we are executing the tests nightly on Jenkins.

There are 236 (partly complex) test cases.
After about 170 runner exits with java.lang.OutOfMemoryError: Java heap space.

We are using runner version 2.1.0.
Heap space is 512m (-Xmx512m)

Here is the relevant part of console log:

[INFO] java.lang.OutOfMemoryError: Java heap space
06:35:30 [INFO] Dumping heap to java_pid52302.hprof ...
06:35:37 [INFO] Heap dump file created [536193080 bytes in 6.532 secs]
06:35:37 [INFO] Skip remaining: Execution finished
06:35:37 [ERROR] Exception in thread "AUT-Worker-0" java.lang.OutOfMemoryError: Java heap space
06:35:37 [ERROR] at org.eclipse.emf.ecore.impl.BasicEObjectImpl.eSetting(BasicEObjectImpl.java:1604)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.getTarget(EcoreUtil.java:562)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAttribute(EcoreUtil.java:623)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:483)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyAll(EcoreUtil.java:449)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:595)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copyContainment(EcoreUtil.java:599)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil$Copier.copy(EcoreUtil.java:490)
06:35:37 [ERROR] at org.eclipse.emf.ecore.util.EcoreUtil.copy(EcoreUtil.java:357)
06:35:37 [ERROR] at org.eclipse.rcptt.sherlock.core.streams.SherlockReportFormat.storeReport(SherlockReportFormat.java:44)
06:35:37 [ERROR] at org.eclipse.rcptt.sherlock.core.streams.SherlockReportOutputStream.write(SherlockReportOutputStream.java:46)
06:35:37 [ERROR] at org.eclipse.rcptt.runner.ScenarioRunnable.run(ScenarioRunnable.java:96)
06:35:37 [ERROR] at org.eclipse.rcptt.runner.util.AutThread.run(AutThread.java:137)
06:35:37 [INFO] Process terminated. Shut down AUTs
06:35:42 [INFO] An error has occurred. See the log file
06:35:42 [INFO] /var/lib/jenkins/jobs/com.sap.bw.rcptt.ui.test/workspace/com.sap.bw.rcptt.ui.test/target/runner-workspace/.metadata/.log.
06:35:43 [INFO] Runner exit code is: 13
06:35:43 [INFO] ------------------------------------------------------------------------
06:35:43 [INFO] BUILD FAILURE
06:35:43 [INFO] ------------------------------------------------------------------------
06:35:43 [INFO] Total time: 02:22 h
06:35:43 [INFO] Finished at: 2016-11-04T06:35:43+01:00
06:35:43 [INFO] Final Memory: 8M/181M
06:35:43 [INFO] ------------------------------------------------------------------------
06:35:43 [ERROR] Failed to execute goal org.eclipse.rcptt:rcptt-maven-plugin:2.1.0:execute (default-execute) on project com.sap.bw.rcptt.ui.test: Failed to launch RCPTT runner. Runner exit code is: 13 -> [Help 1]
06:35:43 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.eclipse.rcptt:rcptt-maven-plugin:2.1.0:execute (default-execute) on project com.sap.bw.rcptt.ui.test: Failed to launch RCPTT runner. Runner exit code is: 13
06:35:43 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:212)
06:35:43 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
06:35:43 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
06:35:43 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
06:35:43 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
06:35:43 at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
06:35:43 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
06:35:43 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
06:35:43 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
06:35:43 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
06:35:43 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
06:35:43 at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
06:35:43 at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
06:35:43 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
06:35:43 at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
06:35:43 at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
06:35:43 at java.lang.reflect.Method.invoke(Unknown Source)
06:35:43 at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
06:35:43 at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
06:35:43 at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
06:35:43 at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
06:35:43 Caused by: org.apache.maven.plugin.MojoExecutionException: Failed to launch RCPTT runner. Runner exit code is: 13
06:35:43 at org.eclipse.rcptt.maven.ExecuteMojo.execute(ExecuteMojo.java:257)
06:35:43 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
06:35:43 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
06:35:43 ... 20 more
06:35:43 [ERROR]
06:35:43 [ERROR]
06:35:43 [ERROR] For more information about the errors and possible solutions, please read the following articles:
06:35:43 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

The heapdump is about 500 mb. No clue where to upload it.
But I first leak suspect analysis shows:
=========================
Problem Suspect 1




One instance of "org.eclipse.rcptt.runner.util.TestSuite" loaded by "org.eclipse.rcptt.runner" occupies 176.512.952 (42,79%) bytes. The memory is accumulated in one instance of "java.util.HashMap$Node[]" loaded by "<system class loader>".

Keywords
org.eclipse.rcptt.runner
java.util.HashMap$Node[]
org.eclipse.rcptt.runner.util.TestSuite
=========================================
Problem Suspect 2




30 instances of "org.eclipse.rcptt.internal.launching.Executable[]", loaded by "org.eclipse.rcptt.launching" occupy 79.947.448 (19,38%) bytes.

Biggest instances:
•org.eclipse.rcptt.internal.launching.Executable[1] @ 0xf5af2340 - 5.314.344 (1,29%) bytes.
These instances are referenced from one instance of "java.util.HashMap$Node[]", loaded by "<system class loader>"

Keywords
org.eclipse.rcptt.internal.launching.Executable[]
java.util.HashMap$Node[]
org.eclipse.rcptt.launching

=============================================
Problem Suspect 3




18 instances of "org.eclipse.pde.internal.core.target.TargetDefinition", loaded by "org.eclipse.pde.core" occupy 62.344.368 (15,11%) bytes.

Biggest instances:
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe2cff6b0 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe4e47e50 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe52c0b88 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe573b488 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe5f5fb48 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe63aaac8 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe6836598 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe6cb9818 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe711cf60 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe75c0d00 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe7d2fbf8 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe81d29b0 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe8659b38 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe8c6b088 - 4.134.736 (1,00%) bytes.
•org.eclipse.pde.internal.core.target.TargetDefinition @ 0xe90e4d78 - 4.134.736 (1,00%) bytes.
These instances are referenced from one instance of "java.util.HashMap$Node[]", loaded by "<system class loader>"

Keywords
java.util.HashMap$Node[]
org.eclipse.pde.internal.core.target.TargetDefinition
org.eclipse.pde.core
================================

Of course increasing to 1g is possible. But maybe there is leak somewhere.

Thanks, Marcus

[Updated on: Fri, 04 November 2016 12:38]

Report message to a moderator

Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1746858 is a reply to message #1746764] Sun, 06 November 2016 17:42 Go to previous messageGo to next message
Artem Kovalev is currently offline Artem KovalevFriend
Messages: 25
Registered: April 2016
Junior Member
Hi Marcus,

Thanks for describe and analyse the problem. I will try to reproduce this behaviour.
Can you send dump file to my email ?


Thanks, Artem.
Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1746882 is a reply to message #1746858] Mon, 07 November 2016 09:04 Go to previous messageGo to next message
Marcus Höpfner is currently offline Marcus HöpfnerFriend
Messages: 48
Registered: February 2014
Member
Hi Artem,

dump file is about 500mb.

I've no clue how to send it to you. Email won't work I guess.

Thanks, Marcus
Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1747202 is a reply to message #1746882] Thu, 10 November 2016 17:07 Go to previous messageGo to next message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Hi Mate, I solved in this way.

1. Try to add the mem to the runner in the pom.xml.
<vmArgs>
<vmArg>-Xmx4048m</vmArg>
<vmArg>-XX:MaxPermSize=512m</vmArg>
</vmArgs>

2. Change the MAVEN PLUGIN and RUNNER ( I had the problem using 2.0.0).
note: The MAVEN PLUGIN is compatible with MAVEN 3.1.X

Remember the version should be match.

Plugin

2.0.0/ Wed Jun 17 05:31:35 EDT 2015
2.0.1/ Fri Jun 19 04:58:30 EDT 2015
2.1.0/ Wed Jun 22 07:40:47 EDT 2016

Runner
2.0.0/ Fri Jun 12 05:35:22 EDT 2015
2.0.1/ Tue Aug 25 01:44:52 EDT 2015
2.0.2/ Tue Nov 10 03:49:13 EST 2015
2.1.0-M4/ Wed Jan 13 06:56:50 EST 2016
2.1.0-M4b/ Fri Jan 22 13:23:22 EST 2016
2.1.0-M7/ Tue May 03 02:19:33 EDT 2016
2.1.0-M7_rc1/ Thu Apr 07 02:46:49 EDT 2016
2.1.0-M7b/ Tue May 10 09:48:08 EDT 2016
2.1.0-RC3/ Tue May 31 06:54:35 EDT 2016
2.1.0-RC3a/ Wed Jun 01 01:07:11 EDT 2016
2.1.0/ Wed Jun 22 13:48:45 EDT 2016
2.2.0-M1/ Thu Jul 14 05:26:49 EDT 2016
2.2.0-M1a/ Thu Jul 14 05:28:51 EDT 2016
2.2.0-M1c/ Mon Jul 18 10:02:53 EDT 2016
2.2.0-M1d/ Thu Sep 01 10:21:34 EDT 2016


Please let us know.


"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova
Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1747203 is a reply to message #1746882] Thu, 10 November 2016 17:07 Go to previous messageGo to next message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Hi Mate, I solved in this way.
(I'm working using Jenkins and I had an error similar your description)

1. Try to add the mem to the runner in the pom.xml.
<vmArgs>
<vmArg>-Xmx4048m</vmArg>
<vmArg>-XX:MaxPermSize=512m</vmArg>
</vmArgs>

2. Change the MAVEN PLUGIN and RUNNER ( I had the problem using 2.0.0).
note: The MAVEN PLUGIN is compatible with MAVEN 3.1.X

Remember the version should be match.

Plugin

2.0.0/ Wed Jun 17 05:31:35 EDT 2015
2.0.1/ Fri Jun 19 04:58:30 EDT 2015
2.1.0/ Wed Jun 22 07:40:47 EDT 2016

Runner
2.0.0/ Fri Jun 12 05:35:22 EDT 2015
2.0.1/ Tue Aug 25 01:44:52 EDT 2015
2.0.2/ Tue Nov 10 03:49:13 EST 2015
2.1.0-M4/ Wed Jan 13 06:56:50 EST 2016
2.1.0-M4b/ Fri Jan 22 13:23:22 EST 2016
2.1.0-M7/ Tue May 03 02:19:33 EDT 2016
2.1.0-M7_rc1/ Thu Apr 07 02:46:49 EDT 2016
2.1.0-M7b/ Tue May 10 09:48:08 EDT 2016
2.1.0-RC3/ Tue May 31 06:54:35 EDT 2016
2.1.0-RC3a/ Wed Jun 01 01:07:11 EDT 2016
2.1.0/ Wed Jun 22 13:48:45 EDT 2016
2.2.0-M1/ Thu Jul 14 05:26:49 EDT 2016
2.2.0-M1a/ Thu Jul 14 05:28:51 EDT 2016
2.2.0-M1c/ Mon Jul 18 10:02:53 EDT 2016
2.2.0-M1d/ Thu Sep 01 10:21:34 EDT 2016


Please let us know.


"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova

[Updated on: Thu, 10 November 2016 17:09]

Report message to a moderator

Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1747204 is a reply to message #1746882] Thu, 10 November 2016 17:07 Go to previous messageGo to next message
Angelo Luciani is currently offline Angelo LucianiFriend
Messages: 129
Registered: September 2015
Location: Milan
Senior Member

Hi Mate, I solved in this way.

1. Try to add the mem to the runner in the pom.xml.
<vmArgs>
<vmArg>-Xmx4048m</vmArg>
<vmArg>-XX:MaxPermSize=512m</vmArg>
</vmArgs>

2. Change the MAVEN PLUGIN and RUNNER ( I had the problem using 2.0.0).
note: The MAVEN PLUGIN is compatible with MAVEN 3.1.X

Remember the version should be match.

Plugin

2.0.0/ Wed Jun 17 05:31:35 EDT 2015
2.0.1/ Fri Jun 19 04:58:30 EDT 2015
2.1.0/ Wed Jun 22 07:40:47 EDT 2016

Runner
2.0.0/ Fri Jun 12 05:35:22 EDT 2015
2.0.1/ Tue Aug 25 01:44:52 EDT 2015
2.0.2/ Tue Nov 10 03:49:13 EST 2015
2.1.0-M4/ Wed Jan 13 06:56:50 EST 2016
2.1.0-M4b/ Fri Jan 22 13:23:22 EST 2016
2.1.0-M7/ Tue May 03 02:19:33 EDT 2016
2.1.0-M7_rc1/ Thu Apr 07 02:46:49 EDT 2016
2.1.0-M7b/ Tue May 10 09:48:08 EDT 2016
2.1.0-RC3/ Tue May 31 06:54:35 EDT 2016
2.1.0-RC3a/ Wed Jun 01 01:07:11 EDT 2016
2.1.0/ Wed Jun 22 13:48:45 EDT 2016
2.2.0-M1/ Thu Jul 14 05:26:49 EDT 2016
2.2.0-M1a/ Thu Jul 14 05:28:51 EDT 2016
2.2.0-M1c/ Mon Jul 18 10:02:53 EDT 2016
2.2.0-M1d/ Thu Sep 01 10:21:34 EDT 2016


Please let us know.


"Ce sont les petits désirs qui rendent un jeune homme hardi."
Giovanni Giacomo Casanova
Re: java.lang.OutOfMemoryError: Java heap space in Runner [message #1751346 is a reply to message #1747204] Mon, 09 January 2017 09:33 Go to previous message
Marcus Höpfner is currently offline Marcus HöpfnerFriend
Messages: 48
Registered: February 2014
Member
Hi Angelo,

I'm on Runner 2.1.0 ever since.
I had increased runner xmx to 1g already and it worked almost every time. I further increased to 2g now. maxpermsize is n.a. for my java version.

Let's see how it works.

Nevertheless it memory consumption seems to grow per testcase. Maybe linearly, but it grows. So with more testcases we need to increase again at some point in time.
Previous Topic:documentation on exec-with-options
Next Topic:Set workspace or autWsPrefix in pom.xml
Goto Forum:
  


Current Time: Wed Sep 19 05:30:04 GMT 2018

Powered by FUDForum. Page generated in 0.01728 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top