UncheckedIOException: Could not open cache fileHashes.bin


(anthony.petrov) #1

Hello,

I’m on Ubuntu 13.10 x64 using gradle 1.8. I’m trying to build OpenJFX. The build fails with the following error:

Caused by: org.gradle.api.UncheckedIOException: Could not open cache fileHashes.bin (/export/anthony/ws/g-1-SwingNodeButtonLinux-RT-33022/rt/buildSrc/.gradle/1.8/taskArtifacts/fileHashes.bin).
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.<init>(BTreePersistentIndexedCache.java:70)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.<init>(BTreePersistentIndexedCache.java:55)
 at org.gradle.cache.internal.DefaultCacheAccess.doCreateCache(DefaultCacheAccess.java:307)
 at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:290)
 at org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:288)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache$5.run(MultiProcessSafePersistentIndexedCache.java:96)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.doWriteAction(DefaultFileLockManager.java:198)
 at org.gradle.cache.internal.DefaultFileLockManager$DefaultFileLock.writeFile(DefaultFileLockManager.java:187)
 at org.gradle.cache.internal.DefaultCacheAccess$UnitOfWorkFileAccess.writeFile(DefaultCacheAccess.java:365)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache.getCache(MultiProcessSafePersistentIndexedCache.java:94)
 at org.gradle.cache.internal.MultiProcessSafePersistentIndexedCache.get(MultiProcessSafePersistentIndexedCache.java:35)
 at org.gradle.listener.LazyCreationProxy$LazyInvocationHandler.invoke(LazyCreationProxy.java:49)
 at com.sun.proxy.$Proxy25.get(Unknown Source)
 at org.gradle.api.internal.changedetection.state.CachingHasher.hash(CachingHasher.java:37)
 at org.gradle.api.internal.changedetection.state.DefaultFileSnapshotter$1.run(DefaultFileSnapshotter.java:48)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:143)
 at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:131)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:134)
 at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:74)
 at org.gradle.api.internal.changedetection.state.DefaultFileSnapshotter.snapshot(DefaultFileSnapshotter.java:44)
 at org.gradle.api.internal.changedetection.rules.InputFilesStateChangeRule.create(InputFilesStateChangeRule.java:33)
 at org.gradle.api.internal.changedetection.rules.TaskUpToDateState.<init>(TaskUpToDateState.java:46)
 at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.getStates(DefaultTaskArtifactStateRepository.java:127)
 at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:69)
 at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
 at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:42)
 at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
 at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
 at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
 at org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:283)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.executeTask(AbstractTaskPlanExecutor.java:79)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:63)
 at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:51)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$1.run(DefaultTaskPlanExecutor.java:33)
 at org.gradle.internal.Factories$1.create(Factories.java:22)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:214)
 at org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:276)
 at org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:142)
 at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:78)
 at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:31)
 at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:86)
 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.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:166)
 at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:113)
 at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:81)
 ... 33 more
Caused by: org.gradle.cache.internal.btree.CorruptedCacheException: Corrupted FreeListBlock 0 found in cache '/export/anthony/ws/g-1-SwingNodeButtonLinux-RT-33022/rt/buildSrc/.gradle/1.8/taskArtifacts/fileHashes.bin'.
 at org.gradle.cache.internal.btree.FileBackedBlockStore$BlockImpl.blockCorruptedException(FileBackedBlockStore.java:239)
 at org.gradle.cache.internal.btree.FileBackedBlockStore$BlockImpl.read(FileBackedBlockStore.java:215)
 at org.gradle.cache.internal.btree.FileBackedBlockStore.read(FileBackedBlockStore.java:91)
 at org.gradle.cache.internal.btree.FileBackedBlockStore.readFirst(FileBackedBlockStore.java:83)
 at org.gradle.cache.internal.btree.CachingBlockStore.readFirst(CachingBlockStore.java:70)
 at org.gradle.cache.internal.btree.FreeListBlockStore.open(FreeListBlockStore.java:55)
 at org.gradle.cache.internal.btree.StateCheckBlockStore.open(StateCheckBlockStore.java:29)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.doOpen(BTreePersistentIndexedCache.java:112)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.rebuild(BTreePersistentIndexedCache.java:209)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.open(BTreePersistentIndexedCache.java:84)
 at org.gradle.cache.internal.btree.BTreePersistentIndexedCache.<init>(BTreePersistentIndexedCache.java:68)
 ... 85 more

Previously I got the same error on Ubuntu 13.04. I also tried gradle 1.4 and it failed with a similar error. If that matters, I’m on a reiserfs partition. I tried ext4 before, but got the same error as well.

How do I resolve this issue?