Gradle got freeze in different part of the build using java plugin

(Francisco Rojas) #1

I’m using gradle with java plugin in my CI server and always get freeze in different part of the java build with no common pattern. I run htop and I see 8 process[1] of gradle running using 75% of CPU and 6.5% of mem.

So I tested in my local computer in a virtual machine using the same installation and configuration than my CI server and work like a charm.

The only thing is running at the server in that moment is jenkins

I’m running gradle in my CI server (2 x Intel Xeon-Nehalem 5520-Quadcore [2.2GHz] with 12 Gb Ram)

gradle -v

------------------------------------------------------------ Gradle 1.0 ------------------------------------------------------------

Gradle build time: Tuesday, June 12, 2012 12:56:21 AM UTC Groovy: 1.8.6 Ant: Apache Ant™ version 1.8.2 compiled on December 20 2010 Ivy: 2.2.0 JVM: 1.6.0_26 (Sun Microsystems Inc. 20.1-b02) OS: Linux 2.6.32-5-amd64 amd64

[1] java -Dorg.gradle.appname=gradle -classpath /usr/local/gradle/lib/gradle-luncher-1.0.jar org.gradle.launcher.GradleMain clean clasees test

(Peter Niederwieser) #2

Your best chance is to trim down the build until you find the cause, with info (’-i’) or debug (’-d’) logging enabled. Make sure not to use the Gradle daemon on the CI server, and do not configure the test tasks to fork additional processes (i.e. don’t set ‘forkEvery’ or ‘maxParallelForks’). (Note that a ‘test’ task will always fork at least one process.)

(Peter Niederwieser) #3

Another thing to try is whether this makes a difference:

tasks.withType(Compile) {
  options.useAnt = true

(Francisco Rojas) #4

I changed the JRE from 64 to 32 bits and now works fine. Thanks for your help