question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

OverlappingFileLockException when accessing FileCache

See original GitHub issue

I’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:closed
  • Created 4 years ago
  • Reactions:4
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
mcanlascommented, Jun 4, 2020

I’ve been running into this issue a lot using sbt 1.3.12

0reactions
alexarchambaultcommented, Jun 26, 2020

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found