Uploaded image for project: 'Bigtop'
  1. Bigtop
  2. BIGTOP-472

make deb fails when building Whirr - OutOfMemoryError: PermGen space

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 0.3.0
    • 0.4.0
    • debian
    • Ubuntu 10.04 LTS (Lucid). Sun JDK 1.6.0_26-b03

    Description

      During 'make deb' Whirr fails to build because the Sun JVM (running Maven) is out of Permanent Generation space (this is not heap space).
      By setting the env variable MAVEN_OPTS=-XX:MaxPermSize=128m this parameter will be used when Maven evokes the JVM and 128m seems to be sufficient PermGen space to complete the make deb (I have tested this).

      HOWEVER, setting this env variable is not enough. There needs to be a change to package.mk so debuild will 'perserve' this env variable and pass it to the (presumably) forked process where maven runs. See the debuild man pages ENVIRONMENT VARIABLES section for documentation on this.

      So, without the MAVEN_OPTS env var 'preserved' by debuild in package.mk, setting MAVEN_OPTS alone will have no affect on make deb.

      Attached is a suggested change to package.mk (just adding --preserve-envvar MAVEN_OPTS ) - not sure if this is the best way to handle this, but this is what I did locally to complete make deb on 0.3.0

      Here is the make deb output of the error:
      [INFO]
      [INFO] Apache Whirr Build Tools .......................... SUCCESS [5.186s]
      [INFO] Whirr ............................................. SUCCESS [47.677s]
      [INFO] Apache Whirr Core ................................. SUCCESS [44.167s]
      [INFO] Apache Whirr Cassandra ............................ SUCCESS [18.302s]
      [INFO] Apache Whirr Hadoop ............................... SUCCESS [14.291s]
      [INFO] Apache Whirr ZooKeeper ............................ SUCCESS [11.758s]
      [INFO] Apache Whirr HBase ................................ SUCCESS [14.493s]
      [INFO] Apache Whirr CDH .................................. SUCCESS [6.571s]
      [INFO] Apache Whirr Ganglia .............................. SUCCESS [10.758s]
      [INFO] Apache Whirr Mahout ............................... SUCCESS [11.585s]
      [INFO] Apache Whirr ElasticSearch ........................ FAILURE [6.547s]
      [INFO] Apache Whirr Hama ................................. SKIPPED
      [INFO] Apache Whirr Puppet ............................... SKIPPED
      [INFO] Apache Whirr Chef ................................. SKIPPED
      [INFO] Apache Whirr CLI .................................. SKIPPED
      [INFO] Apache Whirr Examples ............................. SKIPPED
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 3:14.536s
      [INFO] Finished at: Tue Mar 20 00:24:00 UTC 2012
      [INFO] Final Memory: 50M/325M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project whirr-elasticsearch: Compilation failure
      [ERROR] Failure executing javac, but could not parse the error:
      [ERROR]
      [ERROR]
      [ERROR] The system is out of resources.
      [ERROR] Consult the following stack trace for details.
      [ERROR] java.lang.OutOfMemoryError: PermGen space
      [ERROR] at java.lang.ClassLoader.defineClass1(Native Method)
      [ERROR] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      [ERROR] at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      [ERROR] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      [ERROR] at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      [ERROR] at java.net.URLClassLoader.access$000(URLClassLoader.java:58)

      Attachments

        1. package.mk.diff
          0.7 kB
          Ron Bogdanoff
        2. BIGTOP-472-diff.txt
          0.5 kB
          Ron Bogdanoff

        Issue Links

          Activity

            People

              rvs Roman Shaposhnik
              ron.bogdanoff Ron Bogdanoff
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: