Community
Participate
Working Groups
>Problem: For the last couple weeks I noticed that the core-lrg has been failing with an OutOfMemoryError, causing the whole suite to fail. This does not appear to be JVM or PC related. JVM=SUN 1.6.0_05 to _10 RAM=4Gb >Fix: Increase the hardcoded maxmemory from 512 to 1024 >Optionally: add a build.properties variable so that users can change this in the future without modifying the build >Failed: Core LRG has OutOfMemoryError running with maxmemory="512m" foundation\eclipselink.core.test\build.xml <target name="run-test" depends="process-resource"> <junit printsummary="yes" failureproperty="junit.failed" fork="yes" showoutput="true" maxmemory="512m" dir="${eclipselink.core.test}/${run.dir}"> C:\view_w342f>ant test-core > 20090630_core_clean.txt .... [junit] [EL Info]: 2009-06-30 09:39:56.062--DatabaseSessionImpl(20461199)--Thread(Thread[Main Thread,5,main])-- login successful [junit] Test org.eclipse.persistence.testing.tests.TestRunModel FAILED (crashed) [junit] Exception in thread "Main Thread" java.lang.OutOfMemoryError: allocLargeObjectOrArray - Object size: 257307144, Num elements: 128653563 [junit] at java.lang.String.<init>(String.java:571) [junit] at java.lang.String.<init>(String.java:594) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:448) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:911) [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:768) [junit] Running org.eclipse.persistence.testing.tests.TestRunModel [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0 sec [junitreport] Processing C:\view_w342f\foundation\eclipselink.core.test\reports\TESTS-TestSuites.xml to C:\view_w342f\foundation\eclipselink.core.test\reports\junit-noframes.html [junitreport] Loading stylesheet jar:file:/C:/opt/ant171/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-noframes.xsl [junitreport] Transform time: 1265ms BUILD SUCCESSFUL Total time: 33 minutes 17 seconds >Fixed: Core LRG completes with maxmemory="1024m" foundation\eclipselink.core.test\build.xml <target name="run-test" depends="process-resource"> <junit printsummary="yes" failureproperty="junit.failed" fork="yes" showoutput="true" maxmemory="1024m" dir="${eclipselink.core.test}/${run.dir}"> [junit] [EL Info]: 2009-06-29 17:10:28.234--DatabaseSessionImpl(26265111)--Thread(Thread[Main Thread,5,main])-- login successful [junit] Tests run: 8731, Failures: 0, Errors: 14, Time elapsed: 3,694.203 sec [junit] Test org.eclipse.persistence.testing.tests.TestRunModel FAILED [junitreport] Processing C:\view_w342e\foundation\eclipselink.core.test\reports\TESTS-TestSuites.xml to C:\view_w342e\foundation\eclipselink.core.test\reports\junit-noframes.html [junitreport] Loading stylesheet jar:file:/C:/opt/ant171/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-noframes.xsl [junitreport] Transform time: 11063ms BUILD SUCCESSFUL Total time: 64 minutes 15 seconds >Review: Discussed this in the daily scrum meeting, other developers see the same issue.
Created attachment 140502 [details] Core LRG build.xml patch to increase maxmemory to 1024
>Fixed in 2.0 trunk, see rev# 4586 http://fisheye2.atlassian.com/changelog/eclipselink/?cs=4586
>getting out-of-memory on an 8GB Corei7 running on Vista 64-bit SP2 on the SUN 1.6.0_14 64-bit JVM after 14 min One of the JUnit java.exe processes reaches a peak of 1034Mb within a 5GB system peak (2 GB for 32-bit Oracle11) The JPA lrg runs fine in 7 min >Fix - increase to 2048 or 1536 [junit] Tests run: 8831, Failures: 0, Errors: 14, Time elapsed: 742.294 sec [junitreport] Transform time: 843ms BUILD SUCCESSFUL Total time: 12 minutes 25 seconds
>This issue is likely the fact that double the word length from 32 to 64 bits reduces the effective memory back down to 512. >we may want to create a test.properties variable for 64 bit JVM users so they can increase beyond 1024GB as needed.
Created attachment 148364 [details] Core Test build.xml upgrade from 1024 to 2048 for 64 bit Vista
Created attachment 148417 [details] jconsole heap memory capture for test-core reaches past 512 but fails on xml report processing on 64 bit JVM without at least 1536 >jconsole heap memory capture for test-core reaches past 512 but fails on xml report processing on 64 bit JVM without at least 1536 Note: It is not the lack of GC during the test run that fails with an OOM - it is the XML processing by the 64-bit JVM at the end.
>see SVN rev# 5365 http://fisheye2.atlassian.com/changelog/eclipselink/?cs=5365
Created attachment 148648 [details] Reduce max ram for test-core from 2048 to 1536 for backwards compatibility with older XP 2GB system
>see SVN rev# 5412 http://fisheye2.atlassian.com/changelog/eclipselink/?cs=5412 - reduce max heap ram from 2048 to 1536 to be compatible with some other legacy XP OS machines running 2GB ram We avoid the following message on these slower machines during a trunk>ant test-core [junit] [WARN ] Unable to acquire some virtual address space - reduced from 2048 to 1908 MB. Tested on Vista 64 i7 with 12GB and an XP p630 with 2GB
>See related bug# 291410 for "test-jpa"
>We are limitied by the 2GB RAM footprint of some of the build servers - this 1536 fix will only run on 4GB XP machines - I am reducing to 1024 and adding a variable for developers to bump it up to 1536 if they get an OOME
Created attachment 148937 [details] Decrease maxmemory to 1024 from 1536 to accomidate 2GB RAM machines - introduce max.heap.memory variable that power users can override
>Reviewed by Yan - running the LRG to test now
>see SVN rev# 5465 http://fisheye2.atlassian.com/changelog/~author=mobrien/eclipselink/?cs=5465
>The moxy project will also require heap increase during XML test results generation on lines 356,381,403,443,485,538,588 in build.xml off eclipselink.moxy.test. - another developer is getting the same out of heap message.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink