We are running Elastic Bamboo 4.4-i386 on Amazon 2014.09. As Clover finishes building we get the following PermGen Out of Memory error:
build 31-Aug-2015 16:17:32 Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.018 sec
build 31-Aug-2015 16:17:49 org.apache.maven.surefire.util.SurefireReflectionException: java.lang.reflect.InvocationTargetException; nested exception is java.lang.reflect.InvocationTargetException: null
build 31-Aug-2015 16:17:49 java.lang.reflect.InvocationTargetException
build 31-Aug-2015 16:17:49 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 31-Aug-2015 16:17:49 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
build 31-Aug-2015 16:17:49 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
build 31-Aug-2015 16:17:49 at java.lang.reflect.Method.invoke(Method.java:606)
build 31-Aug-2015 16:17:49 at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:188)
build 31-Aug-2015 16:17:49 at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:166)
build 31-Aug-2015 16:17:49 at org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:86)
build 31-Aug-2015 16:17:49 at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:101)
build 31-Aug-2015 16:17:49 at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:74)
build 31-Aug-2015 16:17:49 Caused by: java.lang.OutOfMemoryError: PermGen space
We are running Maven 3.0.2. In the Maven job definition I have reconfigured both MAVEN_OPTS and JAVA_OPTS to provide more PermGen memory with the following commands in the job plan:
MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=768m" JAVA_HOME="/mnt/bamboo-ebs/jdk1.7.0" M2_HOME="/opt/maven-3.0.2" M2="/opt/maven-3.0.2/bin" JAVA_OPTS="-Xmx512m -XX:MaxPermSize=768m"
We were successfully compiling and running Clover as recently as a week ago with the default PermGen value of 128 MB, about one-sixth what I have configured now. After the PermGen failures began I increased the PermGen values several times.
I checked the Elastic Bamboo instance while it was actually running. I see my settings running in the processes which eventually fail out for lack of memory. The increase PermGen values are visible in the Maven/Java processes.
What could be generating the PermGen Out of Memory error?