Skip to content

Repeated GitHub Actions failure on Windows: java.nio.channels.OverlappingFileLockException on Coursier #8203

@eed3si9n

Description

@eed3si9n

steps

I'm just trying to run some basic CI.

problem

https://github.com/sbt/sbt-pgp/actions/runs/16870311104/job/47784140252

[error] Caused by: java.nio.channels.OverlappingFileLockException
[error] 	at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
[error] 	at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
[error] 	at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1109)
[error] 	at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1063)
[error] 	at coursierapi.shaded.coursier.paths.CachePath.withStructureLock(CachePath.java:132)

[error] (library / Test / scalafmt) org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
[error] (plugin / Compile / scalafmt) org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
Details
sbt -v clean test scripted
  sbt -v clean test scripted
  shell: C:\Program Files\Git\bin\bash.EXE --noprofile --norc -e -o pipefail {0}
  env:
    JAVA_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
    JVM_OPTS: -Xms2048M -Xmx2048M -Xss6M -XX:ReservedCodeCacheSize=256M -Dfile.encoding=UTF-8
    JAVA_HOME: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64
    JAVA_HOME_11_X64: C:\hostedtoolcache\windows\Java_Temurin-Hotspot_jdk\11.0.28-6\x64
[sbt_options] declare -a sbt_options=()
[process_args] java_version = '11'
[copyRt] java9_rt = 'C:\Users\runneradmin\.sbt\1.0\java9-rt-ext-eclipse_adoptium_11_0_28/rt.jar'
# Executing command line:
java
-Xms2048M
-Xmx2048M
-Xss6M
-XX:ReservedCodeCacheSize=256M
-Dfile.encoding=UTF-8
-Dsbt.script=/c/hostedtoolcache/windows/sbt/1.11.2/sbt/bin/sbt
-Dscala.ext.dirs=C:\Users\runneradmin\.sbt\1.0\java9-rt-ext-eclipse_adoptium_11_0_28
-Djline.terminal=jline.UnixTerminal
-Dsbt.cygwin=true
-jar
C:\hostedtoolcache\windows\sbt\1.11.2\sbt\bin\sbt-launch.jar
clean
test
scripted

[info] [launcher] getting org.scala-sbt sbt 1.11.4  (this may take some time)...
[info] [launcher] getting Scala 2.12.20 (for sbt)...
[info] welcome to sbt 1.11.4 (Eclipse Adoptium Java 11.0.28)
[info] loading settings for project sbt-pgp-build from plugins.sbt...
[info] loading project definition from D:\a\sbt-pgp\sbt-pgp\project
[info] found version conflict(s) in library dependencies; some are suspected to be binary incompatible:
[info] 	* org.scala-lang.modules:scala-xml_2.12:2.1.0 (early-semver) is selected over {1.0.6, 1.3.0}
[info] 	    +- com.github.sbt:sbt-site:1.5.0 (scalaVersion=2.12, sbtVersion=1.0) (depends on 2.1.0)
[info] 	    +- ws.unfiltered:unfiltered_2.12:0.10.4               (depends on 1.3.0)
[info] 	    +- org.foundweekends:knockoff_2.12:0.8.6              (depends on 1.0.6)
[info] compiling 1 Scala source to D:\a\sbt-pgp\sbt-pgp\project\target\scala-2.12\sbt-1.0\classes ...
[info] Non-compiled module 'compiler-bridge_2.12' for Scala 2.12.20. Compiling...
[info]   Compilation completed in 9.644s.
[info] done compiling
[info] loading settings for project root from build.sbt...
[info] set current project to sbt-pgp root (in build file:/D:/a/sbt-pgp/sbt-pgp/)
[success] Total time: 0 s, completed Aug 11, 2025, 3:51:32 AM
[info] Formatting 1 Scala sources...
[info] Formatting 23 Scala sources...
[error] org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
[error] Caused by: java.nio.channels.OverlappingFileLockException
[error] 	at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
[error] 	at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
[error] 	at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1109)
[error] 	at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1063)
[error] 	at coursierapi.shaded.coursier.paths.CachePath.withStructureLock(CachePath.java:132)
[error] 	at coursierapi.shaded.coursier.cache.CacheLocks$.withStructureLock(CacheLocks.scala:21)
[error] 	at coursierapi.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:38)
[error] 	at coursierapi.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:506)
[error] 	at coursierapi.shaded.scala.concurrent.Future$.$anonfun$apply$1(Future.scala:661)
[error] 	at coursierapi.shaded.scala.concurrent.impl.Promise$Transformation.run(Promise.scala:430)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
[error] Caused by: java.nio.channels.OverlappingFileLockException
[error] 	at java.base/sun.nio.ch.FileLockTable.checkList(FileLockTable.java:229)
[error] 	at java.base/sun.nio.ch.FileLockTable.add(FileLockTable.java:123)
[error] 	at java.base/sun.nio.ch.FileChannelImpl.lock(FileChannelImpl.java:1109)
[error] 	at java.base/java.nio.channels.FileChannel.lock(FileChannel.java:1063)
[error] 	at coursierapi.shaded.coursier.paths.CachePath.withStructureLock(CachePath.java:132)
[error] 	at coursierapi.shaded.coursier.cache.CacheLocks$.withStructureLock(CacheLocks.scala:21)
[error] 	at coursierapi.shaded.coursier.cache.CacheLocks$.withLockOr(CacheLocks.scala:38)
[error] 	at coursierapi.shaded.coursier.cache.FileCache.$anonfun$download$32(FileCache.scala:506)
[error] 	at coursierapi.shaded.scala.concurrent.Future$.$anonfun$apply$1(Future.scala:661)
[error] 	at coursierapi.shaded.scala.concurrent.impl.Promise$Transformation.run(Promise.scala:430)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[error] 	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[error] 	at java.base/java.lang.Thread.run(Thread.java:829)
[error] (library / Test / scalafmt) org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
[error] (plugin / Compile / scalafmt) org.scalafmt.sbt.ScalafmtSbtReporter$FailedToFormat: D:\a\sbt-pgp\sbt-pgp\.scalafmt.conf
[error] Total time: 8 s, completed Aug 11, 2025, 3:51:40 AM

Error: Process completed with exit code 1.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions