Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-14032

java.lang.OutOfMemoryError: PermGen space Errors When Compiling with Maven in Bamboo Project

    XMLWordPrintable

Details

    • Bug
    • Resolution: Answered
    • Low
    • None
    • 4.4.4
    • Maven
    • None

    Description

      We are seeing intermittent failures of our maven builds for a particular project caused by memory issues. The following error log falls out on the last component that is compiled in the project:

      build 18-Nov-2013 09:10:10 [INFO] -------------------------------------------------------------
      build 18-Nov-2013 09:10:10 [ERROR] COMPILATION ERROR :
      build 18-Nov-2013 09:10:10 [INFO] -------------------------------------------------------------
      build 18-Nov-2013 09:10:10 [ERROR] Failure executing javac, but could not parse the error:
      build 18-Nov-2013 09:10:10
      build 18-Nov-2013 09:10:10
      build 18-Nov-2013 09:10:10 The system is out of resources.
      build 18-Nov-2013 09:10:10 Consult the following stack trace for details.
      build 18-Nov-2013 09:10:10 java.lang.OutOfMemoryError: PermGen space
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.<init>(Check.java:836)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.instance(Check.java:86)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.<init>(Types.java:101)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.instance(Types.java:88)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:264)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:226)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:331)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:88)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:424)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:353)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:342)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:333)
      build 18-Nov-2013 09:10:10 at com.sun.tools.javac.Main.compile(Main.java:94)
      build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      build 18-Nov-2013 09:10:10 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      build 18-Nov-2013 09:10:10 at java.lang.reflect.Method.invoke(Method.java:606)
      build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
      build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
      build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
      build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161)
      build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      build 18-Nov-2013 09:10:10 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

      We are running Bamboo 4.4.4 build 3506 with the following Maven and Java versions:

      Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500)
      Maven home: /usr/share/maven3
      Java version: 1.7.0_40, vendor: Oracle Corporation
      Java home: /usr/lib/jvm/java-7-oracle/jre
      Default locale: en_CA, platform encoding: UTF-8
      OS name: "linux", version: "3.2.0-53-generic", arch: "amd64", family: "unix"

      The contents of our wrapper.conf file are attached. I've tried rebuilding a number of times but the system seems to be stuck on lack of resources. Here is a "free -m" output from the Ubuntu server running our Bamboo:

      total used free shared buffers cached
      Mem: 32173 27268 4904 0 530 20528
      -/+ buffers/cache: 6209 25964
      Swap: 17409 19 17390

      Attachments

        Activity

          People

            Unassigned Unassigned
            8acb7cc97ea1 Maurice Romaniuk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: