[GRADLE-2858] codenarcMain appears to hang when I try to build Gradle Created: 02/Aug/13  Updated: 10/Feb/17  Resolved: 10/Feb/17

Status: Resolved
Project: Gradle
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Gradle Forums Assignee: Unassigned
Resolution: Won't Fix Votes: 3


 Description   

This morning I cloned Gradle from github and, following the instructions in the README, ran:

./gradlew idea -i

Right now it says:

...

:buildSrc:codenarcMain

Executing task ':codenarcMain' due to:

No history is available.

Loaded properties file in 197ms; 305 rules

Loading ruleset from file:/home/jrs/Documents/Code/gradle/config/codenarc.xml

Loading ruleset from [rulesets/braces.xml]

Loading ruleset from [rulesets/imports.xml]

Loading ruleset from [rulesets/naming.xml]

RuleSet configuration properties file [codenarc.properties] not found.

Analysis time=6818ms

> Loading > :buildSrc:codenarcMain

It has been on this task for almost 12 hours. I don't have the fastest machine in the world, but I get the feeling it shouldn't take this long. Did I overlook an important configuration step or something? How do I solve this problem?

Running Fedora 19 64 bit with JDK 1.7.0.25



 Comments   
Comment by Gradle Forums [ 02/Aug/13 ]

Hard to say, I haven't heard of this before. Which OS? Try once more, and if it hangs again, take a thread dump and post it as a GitHub Gist.

Comment by Gradle Forums [ 02/Aug/13 ]

I'm using 64 bit Fedora Linux 19.

[Here's the thread dump]([1]https://gist.github.com/justinrstout/...)
----------------------------------------------------------------------------------------
[1] https://gist.github.com/justinrstout/6118570

Comment by Gradle Forums [ 02/Aug/13 ]

What I don't understand is that I don't see any traces of Codenarc in the thread dump.

Comment by Gradle Forums [ 02/Aug/13 ]

Hi,

I am seeing the same hang on 64bit Fedora 19.

I am trying to build Gradle 1.6, so I have run the following commands:

$ git clone [1]git@github.com:gradle/gradle.git
$ cd gradle/
$ git checkout REL_1.6
$ git checkout -b mbooth
$ ./gradlew eclipse

The process has hung after printing the following output to the terminal:

:buildSrc:clean
:buildSrc:compileJava UP-TO-DATE
:buildSrc:compileGroovy
:buildSrc:processResources
:buildSrc:classes
:buildSrc:jar
:buildSrc:assemble
:buildSrc:checkstyleMain
:buildSrc:compileTestJava UP-TO-DATE
:buildSrc:compileTestGroovy
:buildSrc:processTestResources
:buildSrc:testClasses
:buildSrc:checkstyleTest UP-TO-DATE
> Loading > :buildSrc:codenarcMain

If I grep the output of ps for 'gradle' there appears to be two Gradle processes running:
org.gradle.process.internal.launcher.GradleWorkerMain
org.gradle.wrapper.GradleWrapperMain eclipse

Here are thread dumps of both of those processes:

[2]http://fpaste.org/29685/13754434/
[3]http://fpaste.org/29686/44350413/

I can also supply heap dumps, if that would help.
----------------------------------------------------------------------------------------
[1] git@github.com
[2] http://fpaste.org/29685/13754434/
[3] http://fpaste.org/29686/44350413/

Comment by Adam Murdoch [ 10/Sep/13 ]

Appears to only happen with OpenJDK

Comment by Sune Wettersteen [ 11/Sep/13 ]

I can verify that a workaround is to use the Oracle JDK.

Comment by Andrew Oberstar [ 28/Oct/13 ]

Same issue on Ubuntu 13.10. OpenJDK hangs at :buildSrc:codenarcMain, Oracle JDK works fine.

Comment by Torsten Landschoff [ 05/Nov/13 ]

Actually this is not a bug in gradle. It seems like this is due to the upcoming removal of sun.reflect.Reflection.getCallerClass for JDK 8, also reported here: http://www.infoq.com/news/2013/07/Oracle-Removes-getCallerClass

I don't fully grok the discussion but I hope they actually reconsider that goal. Anyway, there is a bug in OpenJDK that getCallerClass returns the information from the wrong stack frame: https://bugs.openjdk.java.net/browse/JDK-8016814

This also causes https://jira.codehaus.org/browse/GROOVY-6246

In summary: Not a bug in gradle. If you want to build gradle with the broken OpenJDK version (still current in Debian unstable for example), you can use the patch from over here:

This did not really work here for building git master as the plugin is still activated for the docs. But it is a start

Comment by Benjamin Muschko [ 15/Nov/16 ]

As announced on the Gradle blog we are planning to completely migrate issues from JIRA to GitHub.

We intend to prioritize issues that are actionable and impactful while working more closely with the community. Many of our JIRA issues are inactionable or irrelevant. We would like to request your help to ensure we can appropriately prioritize JIRA issues you’ve contributed to.

Please confirm that you still advocate for your JIRA issue before December 10th, 2016 by:

  • Checking that your issues contain requisite context, impact, behaviors, and examples as described in our published guidelines.
  • Leave a comment on the JIRA issue or open a new GitHub issue confirming that the above is complete.

We look forward to collaborating with you more closely on GitHub. Thank you for your contribution to Gradle!

Comment by Benjamin Muschko [ 10/Feb/17 ]

Thanks again for reporting this issue. We haven't heard back from you after our inquiry from November 15th. We are closing this issue now. Please create an issue on GitHub if you still feel passionate about getting it resolved.

Generated at Wed Jun 30 12:33:22 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.