1. Gradle
  2. GRADLE-1496

sonar task fails with java.lang.OutOfMemoryError: PermGen space


    • Type: Bug Bug
    • Status: Resolved Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.0-milestone-3
    • Fix Version/s: 1.0-milestone-8


      The "sonar" task executing on my project over at keeps failing with "java.lang.OutOfMemoryError: PermGen space"

      I gave this several tries:
      a) no manual JAVA_OPTS
      b) export JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=128m"
      c) export JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=512m"

      With increasing amount of MaxPermSize my build got further than before.
      I guess that it would probably be able to finish with 1G of PermSize for sulky but this wouldn't be of much use since my other project, "lilith" is much larger.

      The stacktrace of the last crash looks like this:
      java.lang.OutOfMemoryError: PermGen space
      at org.picocontainer.monitors.NullComponentMonitor.lifecycleInvocationFailed(
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.monitorAndThrowReflectionLifecycleException(
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.invokeMethod(
      at org.picocontainer.lifecycle.ReflectionLifecycleStrategy.stop(
      at org.picocontainer.injectors.AbstractInjectionFactory$LifecycleAdapter.stop(
      at org.picocontainer.behaviors.AbstractBehavior.stop(
      at org.picocontainer.behaviors.Stored$RealComponentLifecycle.stop(
      at org.picocontainer.behaviors.Stored.stop(
      at org.picocontainer.DefaultPicoContainer.stopAdapters(
      at org.picocontainer.DefaultPicoContainer.stop(
      at org.sonar.batch.Batch.execute(
      at org.sonar.batch.Batch$ Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(
      at org.gradle.api.plugins.sonar.internal.SonarCodeAnalyzer.execute(SonarCodeAnalyzer.groovy:52)
      at org.gradle.api.plugins.sonar.internal.SonarCodeAnalyzer$ Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(
      at org.gradle.api.plugins.sonar.internal.SonarCodeAnalyzer$ Source)
      at org.gradle.api.plugins.sonar.Sonar$_execute_closure1.doCall(Sonar.groovy:116)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(
      at java.lang.reflect.Method.invoke(
      at org.codehaus.groovy.reflection.CachedMethod.invoke(
      at groovy.lang.MetaMethod.doMethodInvoke(
      at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(
      at groovy.lang.MetaClassImpl.invokeMethod(
      at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(
      at org.gradle.api.plugins.sonar.Sonar$_execute_closure1.doCall(Sonar.groovy)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      but will likely be of little use, I guess.

      I executed my build using './gradlew -I initSonar.gradle sonar' with the init-file looking like this:
      projectsEvaluated {
      rootProject.subprojects {
      apply plugin: 'sonar'

      { serverUrl = "url" globalProperty "sonar.jdbc.url", "jdbc:mysql://ip:3306/sonar?autoReconnect=true&useUnicode=true&characterEncoding=utf8" globalProperty "sonar.jdbc.driverClassName", "com.mysql.jdbc.Driver" globalProperty "sonar.jdbc.username", "sonar" globalProperty "sonar.jdbc.password", "xxx" }



        Daz DeBoer
        made changes -
        Field Original Value New Value
        Workflow jira [ 12918 ] jira with pivotal tracker [ 13750 ]
        Peter Niederwieser
        made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 1.0-milestone-8 [ 10165 ]
        Resolution Fixed [ 1 ]
        Peter Niederwieser
        made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Luke Daley
        made changes -
        Workflow jira with pivotal tracker [ 13750 ] jira with pivotal tracker (no resolved, only closed) [ 17068 ]
        Luke Daley
        made changes -
        Workflow jira with pivotal tracker (no resolved, only closed) [ 17068 ] Copy of jira with pivotal tracker (no closed, only resolved) [ 19773 ]
        Status Closed [ 6 ] Resolved [ 5 ]


          • Assignee:
            Joern Huxhorn
          • Votes:
            0 Vote for this issue
            4 Start watching this issue


            • Created: