Premature end of file in cache


(Kenny Stridh) #1

Hello, I’ve been reporting a similar problem before but this is a new problem, it occurred in 1.0 but is even more frequent in 1.2.

There are several concurrent builds, in jenkins. All builds have their own workspace on a local disk. The only thing shared is the global cache directory.

Could not resolve group:com.ericsson.em.bt.deploy, module:reserve-plugin, version:1.0.0-SNAPSHOT.

Required by:

:emfc-bt:unspecified

java.text.ParseException: [[Fatal Error] b3172ca99dfe876c53bba1d5425310ae.ivy.xml:1:1: Premature end of file. in file:/local/.gradle/caches/artifacts-14/module-metadata/com.ericsson.em.bt.deploy/reserve-plugin/1.0.0-SNAPSHOT/b3172ca99dfe876c53bba1d5425310ae.ivy.xml

]

The file do exist and is correct at least after the failure. This only happens for dependencies declared for the buildscript.


(René Groeschke) #2

I think you’re running into http://issues.gradle.org/browse/GRADLE-2457. Is it possible to test with the latest master?

best regards, René


(Kenny Stridh) #3

Thanks. I’ve changed to latest in the test environment. Since it’s quite hard to reproduce I’ll let it run with 1.3 latest for some time.

In the bug report, what type of crash are we talking about?


(Kenny Stridh) #4

Havn’t got any premature eof yet, but got another error instead. Less frequent and I’m going add --stacktrace to see what’s actually happening:

  • What went wrong: Could not resolve all dependencies for configuration ‘:classpath’. > Could not resolve group:com.ericsson.em.bt.deploy, module:reserve-plugin, version:1.0.0-SNAPSHOT.

Required by:

:serviceprovider-bt:unspecified

Failed to move file ‘/local/.gradle/caches/artifacts-15/temp/5648234159696377797’ into filestore at ‘/local/.gradle/caches/artifacts-15/module-metadata/com.ericsson.em.bt.deploy/reserve-plugin/1.0.0-SNAPSHOT/b3172ca99dfe876c53bba1d5425310ae.ivy.xml’

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

(Kenny Stridh) #5

Got the exeception again:

  • What went wrong: Could not resolve all dependencies for configuration ‘:classpath’. > Could not resolve group:com.ericsson.em.bt.deploy, module:reserve-plugin, version:1.0.0-SNAPSHOT.

Required by:

:emfc-bt:unspecified

Failed to move file ‘/local/.gradle/caches/artifacts-15/temp/3366874905933155901’ into filestore at ‘/local/.gradle/caches/artifacts-15/module-metadata/com.ericsson.em.bt.deploy/reserve-plugin/1.0.0-SNAPSHOT/b3172ca99dfe876c53bba1d5425310ae.ivy.xml’

  • Try: Run with --info or --debug option to get more log output.

  • Exception is: org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ‘:classpath’.

at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(DefaultLenientConfiguration.java:52)

at org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(DefaultResolvedConfiguration.java:36)

at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver$1.rethrowFailure(SelfResolvingDependencyResolver.java:81)

at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver$ErrorHandlingResolvedConfiguration.rethrowFailure(ErrorHandlingArtifactDependencyResolver.java:70)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:464)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getFiles(DefaultConfiguration.java:209)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getFiles(Unknown Source)

at org.gradle.api.internal.initialization.DefaultScriptHandler.updateClassPath(DefaultScriptHandler.java:36)

at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:118)

at org.gradle.configuration.BuildScriptProcessor.evaluate(BuildScriptProcessor.java:38)

at org.gradle.configuration.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:43)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:463)

at org.gradle.api.internal.project.AbstractProject.evaluate(AbstractProject.java:75)

at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:23)

at org.gradle.configuration.ProjectEvaluationConfigurer.execute(ProjectEvaluationConfigurer.java:21)

at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:38)

at org.gradle.configuration.DefaultBuildConfigurer$1.execute(DefaultBuildConfigurer.java:35)

at org.gradle.api.internal.project.AbstractProject.configure(AbstractProject.java:439)

at org.gradle.api.internal.project.AbstractProject.allprojects(AbstractProject.java:434)

at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:35)

at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:142)

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.launcher.cli.ActionAdapter.execute(ActionAdapter.java:30)

at org.gradle.launcher.cli.ActionAdapter.execute(ActionAdapter.java:22)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:200)

at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:173)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)

at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:138)

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 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) Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionResolveException: Could not resolve group:com.ericsson.em.bt.deploy, module:reserve-plugin, version:1.0.0-SNAPSHOT. Required by:

:emfc-bt:unspecified

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.resolve(UserResolverChain.java:61)

at org.gradle.api.internal.artifacts.ivyservice.clientmodule.ClientModuleResolver.resolve(ClientModuleResolver.java:39)

at org.gradle.api.internal.artifacts.ivyservice.projectmodule.ProjectDependencyResolver.resolve(ProjectDependencyResolver.java:42)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.LazyDependencyToModuleResolver$StaticVersionResolveResult.resolve(LazyDependencyToModuleResolver.java:113)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$ModuleVersionSelectorResolveState.resolve(DependencyGraphBuilder.java:940)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DefaultModuleRevisionResolveState.getDescriptor(DependencyGraphBuilder.java:650)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.calculateTargetConfigurations(DependencyGraphBuilder.java:331)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder$DependencyEdge.attachToTargetConfigurations(DependencyGraphBuilder.java:307)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.traverseGraph(DependencyGraphBuilder.java:124)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DependencyGraphBuilder.resolve(DependencyGraphBuilder.java:60)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.DefaultDependencyResolver.resolve(DefaultDependencyResolver.java:69)

at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:36)

at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver$1.create(CacheLockingArtifactDependencyResolver.java:34)

at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:133)

at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:125)

at org.gradle.api.internal.artifacts.ivyservice.DefaultCacheLockingManager.useCache(DefaultCacheLockingManager.java:49)

at org.gradle.api.internal.artifacts.ivyservice.CacheLockingArtifactDependencyResolver.resolve(CacheLockingArtifactDependencyResolver.java:34)

at org.gradle.api.internal.artifacts.ivyservice.SelfResolvingDependencyResolver.resolve(SelfResolvingDependencyResolver.java:42)

at org.gradle.api.internal.artifacts.ivyservice.ShortcircuitEmptyConfigsArtifactDependencyResolver.resolve(ShortcircuitEmptyConfigsArtifactDependencyResolver.java:38)

at org.gradle.api.internal.artifacts.ivyservice.ErrorHandlingArtifactDependencyResolver.resolve(ErrorHandlingArtifactDependencyResolver.java:36)

at org.gradle.api.internal.artifacts.ivyservice.resolveengine.EmptyResolutionResultConfigurer.resolve(EmptyResolutionResultConfigurer.java:37)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:242)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration_Decorated.getResolvedConfiguration(Unknown Source)

at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration$ConfigurationFileCollection.getFiles(DefaultConfiguration.java:462)

… 36 more Caused by: org.gradle.api.GradleException: Failed to move file ‘/local/.gradle/caches/artifacts-15/temp/3366874905933155901’ into filestore at ‘/local/.gradle/caches/artifacts-15/module-metadata/com.ericsson.em.bt.deploy/reserve-plugin/1.0.0-SNAPSHOT/b3172ca99dfe876c53bba1d5425310ae.ivy.xml’

at org.gradle.api.internal.filestore.PathKeyFileStore.saveIntoFileStore(PathKeyFileStore.java:122)

at org.gradle.api.internal.filestore.PathKeyFileStore.move(PathKeyFileStore.java:63)

at org.gradle.api.internal.filestore.PathKeyFileStore.add(PathKeyFileStore.java:95)

at org.gradle.api.internal.artifacts.ivyservice.modulecache.ModuleDescriptorFileStore.writeModuleDescriptorFile(ModuleDescriptorFileStore.java:57)

at org.gradle.api.internal.artifacts.ivyservice.modulecache.ModuleDescriptorStore.putModuleDescriptor(ModuleDescriptorStore.java:57)

at org.gradle.api.internal.artifacts.ivyservice.modulecache.DefaultModuleDescriptorCache.cacheModuleDescriptor(DefaultModuleDescriptorCache.java:85)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.resolveModule(CachingModuleVersionRepository.java:164)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.findModule(CachingModuleVersionRepository.java:95)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.CachingModuleVersionRepository.getDependency(CachingModuleVersionRepository.java:86)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.IvyContextualiser$1.invoke(IvyContextualiser.java:44)

at $Proxy21.getDependency(Unknown Source)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.findLatestModule(UserResolverChain.java:73)

at org.gradle.api.internal.artifacts.ivyservice.ivyresolve.UserResolverChain.resolve(UserResolverChain.java:54)

… 59 more Caused by: java.io.IOException: Destination ‘/local/.gradle/caches/artifacts-15/module-metadata/com.ericsson.em.bt.deploy/reserve-plugin/1.0.0-SNAPSHOT/b3172ca99dfe876c53bba1d5425310ae.ivy.xml’ already exists

at org.apache.commons.io.FileUtils.moveFile(FileUtils.java:1811)

at org.gradle.api.internal.filestore.PathKeyFileStore.saveIntoFileStore(PathKeyFileStore.java:113)

… 71 more

it the buildscript classpath. Havn’t seen this error with “normal” dependencies


(Peter Niederwieser) #6

Is this with a recent nightly build?


(Kenny Stridh) #7

The build I have at the moment is gradle-1.3-20120916220010+0000, two days old


(Luke Daley) #8

There’s a problem in the filestore code, I’m fixing now.


(Luke Daley) #9

@Kenny: I’ve just published a new http://gradle.org/nightly - can you please try with that.

That should at least provide more information on what is going on.


(Kenny Stridh) #10

Absolutely, I’ve already changed in the continuous integration environment. I’ll get back with feedback on how it’s working tomorrow morning. Thanks!!


(Kenny Stridh) #11

I havn’t seen the io exception anymore but the premature end of file has happened once in 25 builds