CorruptedCacheException


(richard murray) #1

Hi,

We are running gradle 1.0-milestone-3 and keep getting a CorruptedCacheException as below

I realise the cache has/is being re-written for the next release - but any ideas what might be causing this? To resolve the issue I have been clearing out our cache and re-running the build - however I’m concerned in-case the corrupted datablock indicates a problem on the hard disk.

  • Exception is: org.gradle.api.UncheckedIOException: Could not remove entry ‘148’ from cache ‘/home/orchard/.gradle/caches/1.0-milestone-3/fileSnapshots/cache.bin’.

at org.gradle.cache.btree.BTreePersistentIndexedCache.remove(BTreePersistentIndexedCache.java:164)

at org.gradle.api.internal.changedetection.CacheBackedFileSnapshotRepository.remove(CacheBackedFileSnapshotRepository.java:47)

at org.gradle.api.internal.changedetection.CacheBackedTaskHistoryRepository$1.update(CacheBackedTaskHistoryRepository.java:78)

at org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.afterTask(DefaultTaskArtifactStateRepository.java:191)

at org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository$1.afterTask(ShortCircuitTaskArtifactStateRepository.java:47)

at org.gradle.api.internal.changedetection.FileCacheBroadcastTaskArtifactStateRepository$1.afterTask(FileCacheBroadcastTaskArtifactStateRepository.java:51)

at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:57)

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.execute(AbstractTask.java:237)

at org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:167)

at org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:160)

at org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:78)

at org.gradle.execution.TaskNameResolvingBuildExecuter.execute(TaskNameResolvingBuildExecuter.java:113)

at org.gradle.execution.DelegatingBuildExecuter.execute(DelegatingBuildExecuter.java:54)

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

at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:112)

at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:80)

at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:41)

at org.gradle.launcher.RunBuildAction.execute(RunBuildAction.java:27)

at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:32)

at org.gradle.launcher.ExceptionReportingAction.execute(ExceptionReportingAction.java:21)

at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:219)

at org.gradle.launcher.CommandLineActionFactory$WithLoggingAction.execute(CommandLineActionFactory.java:203)

at org.gradle.launcher.Main.execute(Main.java:55)

at org.gradle.launcher.Main.main(Main.java:40)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

at java.lang.reflect.Method.invoke(Method.java:597)

at org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:46)

at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:28)

at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Caused by: org.gradle.cache.btree.CorruptedCacheException: Corrupted DataBlock 6601876 found in cache ‘/home/orchard/.gradle/caches/1.0-milestone-3/fileSnapshots/cache.bin’.

at org.gradle.cache.btree.FileBackedBlockStore$BlockImpl.blockCorruptedException(FileBackedBlockStore.java:239)

at org.gradle.cache.btree.FileBackedBlockStore$BlockImpl.read(FileBackedBlockStore.java:215)

at org.gradle.cache.btree.FileBackedBlockStore.read(FileBackedBlockStore.java:91)

at org.gradle.cache.btree.CachingBlockStore.read(CachingBlockStore.java:84)

at org.gradle.cache.btree.FreeListBlockStore.read(FreeListBlockStore.java:78)

at org.gradle.cache.btree.StateCheckBlockStore.read(StateCheckBlockStore.java:61)

at org.gradle.cache.btree.BTreePersistentIndexedCache.remove(BTreePersistentIndexedCache.java:160)

… 35 more

Thanks.


(richard murray) #2

I see there are a couple of jira issues for this already

http://issues.gradle.org/browse/GRADLE-1166 - Closed

http://issues.gradle.org/browse/GRADLE-1627 - Resolved

So I assume this is a code bug rather than a hard-disk error? Apologies for posting on here first without checking your Jira system - completely forgot about it since you’ve started using Get Satisfaction.


(Luke Daley) #3

As you’ve found, this was a bug that’s now been fixed.

We’re still in the progress of setting up and defining a process on how our JIRA instance will integrate with the forums, but we’ll get there.

Also, we made the forum understand Gradle issue numbers. So if you want to link to an issue you just need to put the issue number in your post: GRADLE-1166