cryptomator / cryptomator

Cryptomator for Windows, macOS, and Linux: Secure client-side encryption for your cloud storage, ensuring privacy and control over your data.
https://cryptomator.org
GNU General Public License v3.0
11.9k stars 1.03k forks source link

Can't build a vault-hosted Kotlin project with Gradle due to lock problem #3614

Open maxpat78 opened 1 week ago

maxpat78 commented 1 week ago

Please agree to the following

Summary

Can't build a vault-hosted Kotlin project with Gradle due to lock problem

What software is involved?

Volume Type

None

Steps to Reproduce

Launch gradble build to build a Kotlin project hosted inside the vault (F:). After about a minute pause it fails with a locking error:

FAILURE: Build failed with an exception.

* What went wrong:
Gradle could not start your build.
> Could not create service of type BuildLifecycleController using ServicesProvider.createBuildLifecycleController().
   > Could not create service of type BuildModelController using VintageBuildControllerProvider.createBuildModelController().
      > Could not create service of type OutputFilesRepository using ExecutionBuildServices.createOutputFilesRepository().
         > Timeout waiting to lock Build Output Cleanup Cache (F:\SpykeKt\.gradle\buildOutputCleanup). It is currently in use by this Gradle process.Owner Operation: unknown
           Our operation:
           Lock file: F:\SpykeKt\.gradle\buildOutputCleanup.lock

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 1m 1s

Moved the same project to a plain Windows drive, it compiles fine as usual!

Expected Behavior

Compilation work as usual

Actual Behavior

Gradle does not succeed due to a file locking problem.

Reproducibility

Always

Relevant Log Output

-

Anything else?

-

infeo commented 1 week ago

A little test with the bare-bon fuse-nio-adapter (no encryption) showed, that gradle queries the same file for 1min again and again:

17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7817625Z, isRegularFile: false, isDirectory: true, isSymbolicLink: false, isOther: false, size: 4096, fileKey: null)
17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle (lastModifiedTime: 2024-11-19T16:07:17.8058209Z, lastAccessTime: 2024-11-19T16:10:20.9402487Z, creationTime: 2024-11-19T16:07:17.7492786Z, isRegularFile: false, isDirectory: true, isSymbolicLink: false, isOther: false, size: 4096, fileKey: null)
17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5 (lastModifiedTime: 2024-11-19T16:07:17.7892748Z, lastAccessTime: 2024-11-19T16:10:20.9402487Z, creationTime: 2024-11-19T16:07:17.7492786Z, isRegularFile: false, isDirectory: true, isSymbolicLink: false, isOther: false, size: 4096, fileKey: null)
17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7817625Z, isRegularFile: false, isDirectory: true, isSymbolicLink: false, isOther: false, size: 4096, fileKey: null)
17:20:19.710 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:20.927 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:21.965 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:23.238 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:24.249 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:25.383 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:26.635 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:27.908 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:29.022 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
17:20:30.376 [Thread-0] DEBUG org.cryptomator.frontend.fuse.ReadOnlyAdapter - getattr /.gradle/8.5/fileHashes/fileHashes.lock (lastModifiedTime: 2024-11-19T16:10:24.728403Z, lastAccessTime: 2024-11-19T16:10:24.728403Z, creationTime: 2024-11-19T16:07:17.7852686Z, isRegularFile: true, isDirectory: false, isSymbolicLink: false, isOther: false, size: 0, fileKey: null)
....

My working hypothesis is, that WinFSP automatically locks the file at every request and thus gradle keeps queriying.