Can't compile gradle (master)


(seandanielgillespie) #1

Hello

I seem to be having an issue compiling the latest gradle code from github. If I try the

./gradlew build

, as suggested in the README document, it seems to hang on :buildSrc:compileGroovy. Here is the debug output just before it stops outputting:

5-1258396a2adc, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
       08:30:25.094 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer available: [ConsumerAvailable id: 2d978197-a4f6-4c7f-b985-1258396a2adc, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
                08:30:25.103 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer ready: [ConsumerReady, consumerId: 2d978197-a4f6-4c7f-b985-1258396a2adc, producerId: 0fd1dc57-e9c8-4187-be09-19d67d917ca4]
                                                                              08:30:25.107 [DEBUG] [org.gradle.messaging.remote.internal.UnicastSendProtocol] Consumer available: [ConsumerAvailable id: 2d978197-a4f6-4c7f-b985-1258396a2adc, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
         08:30:25.105 [QUIET] [system.out] 08:30:25.100 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Producer ready: [ProducerReady producerId: 0fd1dc57-e9c8-4187-be09-19d67d917ca4, consumerId: 2d978197-a4f6-4c7f-b985-1258396a2adc
                                           08:30:25.849 [QUIET] [system.out] 08:30:25.848 [DEBUG] [org.gradle.messaging.remote.internal.WorkerProtocol] Dispatching request to worker: [Request consumer: 2d978197-a4f6-4c7f-b985-1258396a2adc, payload: [MethodInvocation method: execute()]]
                                       08:30:25.860 [QUIET] [system.out] 08:30:25.853 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer] Executing org.gradle.api.internal.tasks.compile.ApiGroovyCompiler@1fbbd7b2 in compiler daemon.
                                                                  08:31:04.826 [QUIET] [system.out] 08:31:04.766 [INFO] [org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler] Compiling with JDK 6 Java compiler API.
                                                                                                                               08:33:15.785 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
                                               08:33:15.787 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route b8ab7e27-fa4e-41d5-9ba1-cc5301be19dd due to end of stream.
 08:33:15.830 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route 2d978197-a4f6-4c7f-b985-1258396a2adc due to end of stream.
 08:33:15.834 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer unavailable: [ConsumerUnavailable id: 2d978197-a4f6-4c7f-b985-1258396a2adc]
                                                                                                                             08:33:15.837 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route 8fc305e6-18f1-4e73-8582-10fdaa87cb7b due to end of stream.
 08:33:15.841 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Producer unavailable: [ProducerUnavailable id: 8fc305e6-18f1-4e73-8582-10fdaa87cb7b]
                                                                                                                          08:33:17.033 [INFO] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle Worker 1' finished with exit value 137 (state: FAILED)
   > Loading > :buildSrc:compileGroovy

Any ideas? Thanks in advance

Sean


(seandanielgillespie) #2

I should add that I’m using a newly installed ArchLinux


(Peter Walker) #3

Can you post the output of: gradlew -v gradlew -task which git


(seandanielgillespie) #4
--(sgillespie@arch-laptop-01)--(gradle)
--(bash:13:39)-- ./gradlew -v
  ------------------------------------------------------------
Gradle 1.3
------------------------------------------------------------
  Gradle build time: Tuesday, November 20, 2012 11:37:38 AM UTC
Groovy: 1.8.6
Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012
Ivy: 2.2.0
JVM: 1.6.0_24 (Sun Microsystems Inc. 20.0-b12)
OS: Linux 3.6.10-1-ARCH amd64
  --(sgillespie@arch-laptop-01)--(gradle)
--(bash:13:40)-- which git
/usr/bin/git
--(sgillespie@arch-laptop-01)--(gradle)
--(bash:13:40)-- git --version
git version 1.8.0.2

When I try ./gradlew -task, I get:

--(sgillespie@arch-laptop-01)--(gradle)
                                                                                                      --(bash:13:40)-- ./gradlew -task
                                                                                                                                                                                                                                                            Unknown command-line option '-t'.

(Peter Walker) #5

Apologies -> gradlew task


(René Groeschke) #6

Hmm not sure about the root casue, On linux, Exit-code above 128 means that the process died because of a received signal (exitCode = 128 + signalNumber). ==> In your case it was signal 9 (= SIGKILL)

Does gradle just stop logging any output and it hangs?


(seandanielgillespie) #7
--(sgillespie@arch-laptop-01)--(gradle)
                                                                                                      --(bash:11:55)-- ./gradlew --debug task
   <- Snip ->
11:56:23.121 [QUIET] [system.out] 11:56:23.114 [DEBUG] [org.gradle.messaging.remote.internal.Router] Received route available. Message: [ConsumerAvailable id: aa15e10a-87ec-4b05-a090-f29aa5eec7b0, displayName: message client, channel: org.gradle.internal.Stoppable]
                 11:56:23.128 [QUIET] [system.out] 11:56:23.127 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Discarding [MessageCredits credits: 200].
                                                                                                                                   11:56:23.134 [QUIET] [system.out] 11:56:23.134 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Starting receiver aee77cd1-7bd6-4640-8e21-9723385da72f.
                                                                                                                     11:56:23.145 [QUIET] [system.out] 11:56:23.143 [DEBUG] [org.gradle.messaging.remote.internal.Router] Received route available. Message: [ConsumerAvailable id: aee77cd1-7bd6-4640-8e21-9723385da72f, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
                                                                                                                  11:56:23.150 [QUIET] [system.out] 11:56:23.146 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Discarding [MessageCredits credits: 200].
                                                                                                                                   11:56:23.154 [DEBUG] [org.gradle.messaging.remote.internal.Router] Received route available. Message: [ConsumerAvailable id: aee77cd1-7bd6-4640-8e21-9723385da72f, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
       11:56:23.158 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer available: [ConsumerAvailable id: aee77cd1-7bd6-4640-8e21-9723385da72f, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
                11:56:23.167 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer ready: [ConsumerReady, consumerId: aee77cd1-7bd6-4640-8e21-9723385da72f, producerId: bd68867f-a7c8-4d95-8ba7-2075cf2bde15]
                                                                              11:56:23.171 [DEBUG] [org.gradle.messaging.remote.internal.UnicastSendProtocol] Consumer available: [ConsumerAvailable id: aee77cd1-7bd6-4640-8e21-9723385da72f, displayName: message client, channel: org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServerProtocol]
         11:56:23.169 [QUIET] [system.out] 11:56:23.164 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Producer ready: [ProducerReady producerId: bd68867f-a7c8-4d95-8ba7-2075cf2bde15, consumerId: aee77cd1-7bd6-4640-8e21-9723385da72f
                                           11:56:23.880 [QUIET] [system.out] 11:56:23.878 [DEBUG] [org.gradle.messaging.remote.internal.WorkerProtocol] Dispatching request to worker: [Request consumer: aee77cd1-7bd6-4640-8e21-9723385da72f, payload: [MethodInvocation method: execute()]]
                                       11:56:23.883 [QUIET] [system.out] 11:56:23.879 [INFO] [org.gradle.api.internal.tasks.compile.daemon.CompilerDaemonServer] Executing org.gradle.api.internal.tasks.compile.ApiGroovyCompiler@3313beb5 in compiler daemon.
                                                                  11:56:37.292 [QUIET] [system.out] 11:56:37.291 [INFO] [org.gradle.api.internal.tasks.compile.jdk6.Jdk6JavaCompiler] Compiling with JDK 6 Java compiler API.
                                                                                                                               11:56:51.883 [DEBUG] [org.gradle.process.internal.DefaultExecHandle] Changing state to: FAILED
                                               11:56:51.897 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route aee77cd1-7bd6-4640-8e21-9723385da72f due to end of stream.
 11:56:51.903 [DEBUG] [org.gradle.messaging.remote.internal.SendProtocol] Consumer unavailable: [ConsumerUnavailable id: aee77cd1-7bd6-4640-8e21-9723385da72f]
                                                                                                                             11:56:51.907 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route aa15e10a-87ec-4b05-a090-f29aa5eec7b0 due to end of stream.
 11:56:51.910 [DEBUG] [org.gradle.messaging.remote.internal.Router] Removing route 61606df3-3422-43dd-9e9f-fdb4fbd82da0 due to end of stream.
 11:56:51.913 [DEBUG] [org.gradle.messaging.remote.internal.ReceiveProtocol] Producer unavailable: [ProducerUnavailable id: 61606df3-3422-43dd-9e9f-fdb4fbd82da0]
                                                                                                                          11:56:52.581 [INFO] [org.gradle.process.internal.DefaultExecHandle] Process 'Gradle Worker 1' finished with exit value 137 (state: FAILED)
   > Loading > :buildSrc:compileGroovy

(seandanielgillespie) #8

At that point, yes, gradle just stops logging. It appears that it hangs, but I can just hit C-c at that point and it returns my prompt


(Peter Walker) #9

Please can you tell us the version of arch linux? uname -a


(seandanielgillespie) #10
--(sgillespie@arch-laptop-01)--(~)
--(bash:16:08)-- uname -a
Linux arch-laptop-01 3.6.10-1-ARCH #1 SMP PREEMPT Tue Dec 11 09:40:17 CET 2012 x86_64 GNU/Linux

(Peter Walker) #11

Please can you tell us more about the jdk. What is the output of “pacman -Qs jdk”?


(seandanielgillespie) #12

I can tell you that it’s an openjdk6. I have another ArchLinux machine that I switched to the Sun/Oracle jdk6, and I was able to run the full build (with the exception of one integration test). I’ll try that on the original machine when I get home tonight and see if that works. Will send you the openjdk details also if you are interested.


(Peter Walker) #13

Thanks. It would be great if we can isolate this to a JDK difference.


(Peter Walker) #14

Are you running in a physical or virtual environment? How much memory does the OS have?


(Peter Walker) #15

The reason I ask is that I have been able to reproduce the issue with a virtualbox vm that defaulted to 256MB RAM. As I increased the amount of memory, I had more success with the Gradle build. From my testing, you might need 4GB RAM available to get a clean “gradlew build test” for Gradle itself.


(seandanielgillespie) #16

Well, unfortunately I couldn’t get my AC Adapter to work last night. It was a physical environment (as in, not virtual). That machine has 1G of memory.

My other ArchLinux machine also has 1G of memory, and it appears to work well with a Sun JVM. I did, however, see a similar issue when I was running OpenJDK. It didn’t hang on :buildSrc:compileGroovy, but it did hang later on in the process.


(Peter Walker) #17

With OpenJDK 1.6 and ArchLinux set to 1GB, my build hangs on :openApi:compileGroovy. My theory is still that 1GB is insufficient.


(Peter Walker) #18

I can get a clean build with the following constraints and setup.

Checkout of Gradle Master. Execute “./gradlew clean build -x integTest -x :docs:userguidePdf”

This will compile and unit test gradle, and suppress some integrationTests that have not been tested on this development platform. It should be enough coverage to get your development started.

Environment:

[vagrant@vagrant-archlinux gradle]$ uname -a
Linux vagrant-archlinux.vagrantup.com 3.6.11-1-ARCH #1 SMP PREEMPT Tue Dec 18 08:57:15 CET 2012 x86_64 GNU/Linux
[vagrant@vagrant-archlinux gradle]$ java -version
java version "1.6.0_24"
OpenJDK Runtime Environment (IcedTea6 1.11.5) (ArchLinux-6.b24_1.11.5-1-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b12, mixed mode)

VM Container: 1 CPU, 5 GB Ram.

If you add more CPUs, you will most likely need more RAM available.

Is this enough to enable you to move forward?


(seandanielgillespie) #19

Yes, I think that will be good enough for me, at least for now.

I’ve switched to an Oracle JVM (1.6) and added another 1G ram (now at 2). My hardware doesn’t support any more than 2G, but I can now run almost all of the integration tests most of the time.

Thanks for taking the time to look into this.


(Peter Walker) #20

Good luck!