On Sep 10, 2009, at 11:22 PM, Adam Murdoch wrote:

The problem is that I can run the Gradle build without running into an out of memory exception. It always happens at the same task (gradle-ui:compile).

* Exception is:
org.gradle.api.GradleScriptException: Build file '/Users/hans/ gradle/subprojects/gradle-ui/build.gradle'
Execution failed for task ':gradle-ui:compile'.
at org.gradle.api.internal.AbstractTask.execute (AbstractTask.java:233) at org.gradle.execution.DefaultTaskExecuter.executeTask (DefaultTaskExecuter.java:165) at org.gradle.execution.DefaultTaskExecuter.doExecute (DefaultTaskExecuter.java:156) at org.gradle.execution.DefaultTaskExecuter.execute (DefaultTaskExecuter.java:74) at org.gradle.execution.TaskNameResolvingBuildExecuter.execute (TaskNameResolvingBuildExecuter.java:174) at org.gradle.execution.DelegatingBuildExecuter.execute (DelegatingBuildExecuter.java:54) at org.gradle.GradleLauncher.doBuildStages (GradleLauncher.java:164)
       at org.gradle.GradleLauncher.doBuild(GradleLauncher.java:123)
       at org.gradle.GradleLauncher.run(GradleLauncher.java:94)
       at org.gradle.Main.execute(Main.java:100)
       at org.gradle.Main.main(Main.java:43)
       at org.gradle.BootstrapMain.main(BootstrapMain.java:53)
Caused by: java.lang.OutOfMemoryError: PermGen space
at org.gradle.util.GradleUtil.executeIsolatedAntScript (GradleUtil.groovy:85) at org.gradle.util.GradleUtil$executeIsolatedAntScript$0.call (Unknown Source)

I have tried it many times, rebooted my machine (that has sometimes helped for outofmemory issues in the past), to no avail. I have tried to set some JVM parameters:

[compile, compileTest]*.groovyOptions*.fork(memoryInitialSize: '128M', memoryMaximumSize: '2G') [compile, compileTest]*.options*.fork(jvmArgs: ['-XX:PermSize=64M', '-XX:MaxPermSize=256M'])

Nothing helped. Any ideas?

It looks like the gradle process, rather than the forked compile process, is running out of perm gen space. The fact it is happening in the compile task might just be a symptom.

Any chance you can run it in the profiler to see where the perm gen space is going?

What I can say so far is that <root>/gradle compile works, whereas <root>/gradle developerBuild failed as described above. Increasing the PermSize to 256m in the GRADLE_OPTS 'fixed' this. As you said, it looks like the gradle process is running out of perm gen space. I will y to do some detailed profiling later on.

- Hans

--
Hans Dockter
Gradle Project Manager
http://www.gradle.org

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to