OverlappingFileLockException when accessing FileCache
See original GitHub issueI’ve noticed that sometimes, usually in CI, that update fails to work in newer versions of sbt that uses coursier by default. Here is a stactkrace from a failed ci job:
[error] java.nio.channels.OverlappingFileLockException
[error] at sun.nio.ch.SharedFileLockTable.checkList(FileLockTable.java:255)
[error] at sun.nio.ch.SharedFileLockTable.add(FileLockTable.java:152)
[error] at sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1063)
[error] at java.nio.channels.FileChannel.lock(FileChannel.java:1053)
[error] at lmcoursier.internal.shaded.coursier.paths.CachePath.withStructureLock(CachePath.java:126)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withStructureLock(CacheLocks.scala:21)
[error] at lmcoursier.internal.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:38)
[error] at lmcoursier.internal.shaded.coursier.cache.FileCache.$anonfun$download$27(FileCache.scala:456)
[error] at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:658)
[error] at scala.util.Success.$anonfun$map$1(Try.scala:255)
[error] at scala.util.Success.map(Try.scala:213)
[error] at scala.concurrent.Future.$anonfun$map$1(Future.scala:292)
[error] at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:33)
[error] at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:33)
[error] at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:64)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
[error] at java.lang.Thread.run(Thread.java:745)
I’ve seen this failure with sbt 1.3.0-RC2 and 1.3.0-RC3.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:7 (2 by maintainers)
Top Results From Across the Web
OverlappingFileLockException in Java with Examples
An OverlappingFileLockException is thrown when attempting to acquire a lock that overlaps an existing or pending lock held by this process.
Read more >OverlappingFileLockException and OOM when loading ...
The first DB exception is logged at 15:48:24, about 48 seconds after opening the forum; Two DB tasks fail in quick succession: the...
Read more >Getting OverlappingFileLockException when locking file ...
What happens is when I access the file with notepad while the program is running, I sometimes get the OverlappingFileLockException .
Read more >[dubbo] branch 3.1 updated: Replace logging implementation with ...
+ logger.warn("1-9", "multiple Dubbo instance are using the same file", "", + "Failed to save registry cache file after retrying " + ...
Read more >Example usage for java.io RandomAccessFile getChannel
... synchronises file access between programs, but not between threads inside // the current JVM. The latter results in the OverlappingFileLockException.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ve been running into this issue a lot using sbt 1.3.12
@mcanlas @jho Do you have the details of the plugins you’re using? The initial report was fixed by ensuring all plugins use an up-to-date version of coursier.