Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fails horribly! #13

Closed
Ed42 opened this issue May 15, 2013 · 13 comments
Closed

build fails horribly! #13

Ed42 opened this issue May 15, 2013 · 13 comments

Comments

@Ed42
Copy link

Ed42 commented May 15, 2013

If I do this:

./gradlew build

I get this:

  • Exception is:
    org.gradle.api.UncheckedIOException: java.io.IOException: Input/output error
    at org.gradle.util.hash.HashUtil.createHash(HashUtil.java:56)
    at org.gradle.util.hash.HashUtil.createHash(HashUtil.java:34)
    at org.gradle.api.internal.changedetection.DefaultHasher.hash(DefaultHasher.java:24)
    at org.gradle.api.internal.changedetection.CachingHasher.hash(CachingHasher.java:42)
    at org.gradle.api.internal.changedetection.DefaultFileSnapshotter.snapshot(DefaultFileSnapshotter.java:44)
    at org.gradle.api.internal.changedetection.InputFilesChangedUpToDateRule.create(InputFilesChangedUpToDateRule.java:35)
    at org.gradle.api.internal.changedetection.CompositeUpToDateRule.create(CompositeUpToDateRule.java:35)
    at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.calcCurrentState(DefaultTaskArtifactStateRepository.java:80)
    at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$HistoricExecution.isUpToDate(DefaultTaskArtifactStateRepository.java:88)
    at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:128)
    at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$ShortCircuitArtifactState.isUpToDate(ShortCircuitTaskArtifactStateRepository.java:77)
    at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.isUpToDate(FileCacheBroadcastTaskArtifactStateRepository.java:37)
    at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:44)
    at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)
    at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)
    at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)
    at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)
    at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)
    at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:275)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.executeTask(DefaultTaskPlanExecutor.java:52)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.processTask(DefaultTaskPlanExecutor.java:38)
    at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:30)
    at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:84)
    at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)
    at org.gradle.internal.Factories$1.create(Factories.java:22)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:124)
    at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:112)
    at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
    at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)
    at org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)
    at org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)
    at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)
    at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)
    at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:165)
    at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
    at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
    at org.gradle.launcher.cli.ExecuteBuildAction.run(ExecuteBuildAction.java:38)
    at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:39)
    at org.gradle.launcher.exec.InProcessGradleLauncherActionExecuter.execute(InProcessGradleLauncherActionExecuter.java:25)
    at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:50)
    at org.gradle.api.internal.Actions$RunnableActionAdapter.execute(Actions.java:171)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)
    at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)
    at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
    at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
    at org.gradle.launcher.Main.doAction(Main.java:48)
    at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
    at org.gradle.launcher.Main.main(Main.java:39)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)
    at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:32)
    at org.gradle.launcher.GradleMain.main(GradleMain.java:26)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:33)
    at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:130)
    at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48)
    Caused by: java.io.IOException: Input/output error
    at java.io.FileInputStream.readBytes(Native Method)
    at java.io.FileInputStream.read(FileInputStream.java:220)
    at org.gradle.util.hash.HashUtil.createHash(HashUtil.java:46)
    ... 70 more

BUILD FAILED

can't we go back to maven?

At least it just works (mostly)

@wilkinsona
Copy link

Sorry to hear you're having trouble with the build. We can't reproduce the problem building on a mixture of OS X and Linux. Can you give us some more info please:

  • What OS are you building on?
  • What's the output from java -version

@jbrisbin
Copy link

Googling this error there seems to be a Gradle Issue with building on Windows related to this and I found another traceback with a similar error caused by file locking.

http://jira.grails.org/browse/GRAILS-8586

We can't really eliminate Gradle as a build tool since even the Spring Framework itself is using it and that's the direction we've chosen to go with new development. I'm sorry you're having trouble with it.

@ldaley
Copy link

ldaley commented May 15, 2013

I don't think GRAILS-8586 is related.

What version of Gradle are you using?

That seems to be coming from the wrapper jar. It might be worth regenerating it with a recent Gradle version. There's something environment specific going on here as this is a code path that is hit by every build using the wrapper.

@Ed42
Copy link
Author

Ed42 commented May 15, 2013

Hi, I'm new to gradle but it looks as if it's using the gradle version defined in the build.
Anyway, sorry I missed this before but this was in the output of "./gradlew --debug build":

Build aborted because of an unexpected internal error. Please file an issue at: http://forums.gradle.org.

So I'll check out the gradle forum.

OS: Ubuntu 12.04.2 LTS x86_64

$ java -version
java version "1.7.0_21"
Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

$ cat ./gradle/wrapper/prop
#Thu May 09 13:50:28 CDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http://services.gradle.org/distributions/gradle-1.4-bin.zip

@ldaley
Copy link

ldaley commented May 15, 2013

Hi @Ed42,

Could you try checking out https://github.com/ratpack/ratpack and running ./gradlew build on that? The project is insignificant, it's just another Gradle project. If that works, then that narrows things down a little.

If that fails, then we'll have to find what it is about your environment that is causing such a deep error.

The failure actually looks to be within the JDK as it's throwing a very generic exception when trying to read the properties file.

@Ed42
Copy link
Author

Ed42 commented May 15, 2013

Hello @alkemist, no that doesn't work either. Fails with a different exception. It's using gradle 1.6 rather than 1.4 as in the reactor.

Here's a few lines of the nested exception:

08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: org.gradle.process.internal.ExecException: Process 'command '/opt/java/jdk1.7.0_21/bin/java'' finished with non-zero exit value 1
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultExecHandle$ExecResultImpl.assertNormalExitValue(DefaultExecHandle.java:362)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.process.internal.DefaultJavaExecAction.execute(DefaultJavaExecAction.java:34)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.file.DefaultFileOperations.javaexec(DefaultFileOperations.java:156)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.AbstractProject.javaexec(AbstractProject.java:821)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.ProcessOperations$javaexec.call(Unknown Source)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.plugins.compass.JRubyTask.jrubyexec(JRubyTask.groovy:11)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.plugins.compass.CompassTask.super$4$jrubyexec(CompassTask.groovy)
08:18:22.603 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.plugins.compass.CompassTask.jrubyexec(CompassTask.groovy:56)
08:18:22.604 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:216)
08:18:22.604 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:122)

I'm new to github too - is there any way I can attach a file, such as the full build output?

@ldaley
Copy link

ldaley commented May 15, 2013

So that's a different error. There's something peculiar about your system. I suspect it's something about the file system.

Can you please try this one: https://github.com/alkemist/gradle-test-kit

It's much simpler.

@jbrisbin
Copy link

@Ed42 If you want to attach log output, you can create a Gist [1] and put the link here in the comments.

[1] - https://gist.github.com/

@Ed42
Copy link
Author

Ed42 commented May 15, 2013

@alkemist, @jbrisbin the gradle-test-kit builds fine - can see it's using gradle-1.3 so I modified the build.gradle and set the gradle version to 1.6. That also builds fine.

File system is ext4, 74GB free space

@Ed42
Copy link
Author

Ed42 commented May 15, 2013

@alkemist @jbrisbin Looks like it's a gradle issue, at least the build problem has gone away after I did "rm -rf ~/.gradle". My guess would be that the automatic gradle install/cache mechanism got confused with previous versions somehow (I had 1.3, 1.4 and 1.6 in my ~/.gradle). Not sure how best to explain this on the gradle forum.

I did notice one consistency issue in reactor-quickstart - build.gradle has the gradle version set at 1.5, but gradle/wrapper/gradle-wrapper.properties set it to 1.4. What would you recommend as the "correct" way to specify the gradle version? My preference would be a single place, say in build.gradle.

Anyway I'm now using gradle 1.6 for both the reactor and reactor-quickstart and it's all building nicely now.

Next: how do I integrate gradle with our existing nexus repo manager --- is there a gradle equivalent of ~/.m2/settings.xml? I know, that's a gradle RTFM :-)

Thanks for your help.

@Ed42
Copy link
Author

Ed42 commented May 15, 2013

@alkemist @jbrisbin FYI the ratpack application still will not build with gradle 1.6. I've posted the verbose build output here

@ldaley
Copy link

ldaley commented May 16, 2013

@Ed42 that Ratpack issue is different. That's a specific failure with the 3rd party JRuby plugin (which is very new and experimental). It's failing because it's trying to read UTF8 files and your platform encoding is US-ASCII.

I've let the author know about this problem.

@wilkinsona
Copy link

@Ed42 Glad to hear to go to the bottom of your builds problems. Thanks for persevering, and for the pointer to the Gradle version mismatch in the quickstart repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants