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

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

Open
2 tasks done
maxpat78 opened this issue Nov 14, 2024 · 1 comment
Open
2 tasks done
Labels

Comments

@maxpat78
Copy link

Please agree to the following

Summary

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

What software is involved?

  • Operating System: Windows 11
  • Cryptomator: 1.14
  • Kotlin version 2.0.21-release-482 (JRE 21.0.2+13-LTS)
  • Gradle 8.10.2

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?

@maxpat78 maxpat78 added the type:bug Something isn't working label Nov 14, 2024
Copy link
Member

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.

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

No branches or pull requests

2 participants