tools-deps 2021-09-16

Running by repl, I get repeatedly the same error message about a certain jar:

Error building classpath. Could not acquire write lock for 'artifact:org.bytedeco:mkl:2020.3-1.5.4'
java.lang.IllegalStateException: Could not acquire write lock for 'artifact:org.bytedeco:mkl:2020.3-1.5.4'

concurrency issue? -Sthreads 1?

Indeed, this seems to fix it. I remmber that the jars are big, so individaul download takes long. rw-r--r-- 1 carsten carsten 219M Sep 3 21:35 mkl-2020.3-1.5.4-linux-x86_64-redist.jar -rw-r--r-- 1 carsten carsten 172M Sep 3 21:28 mkl-2020.3-1.5.4-windows-x86_64-redist.jar -rw-r--r-- 1 carsten carsten 147M Sep 3 21:34 mkl-2020.3-1.5.4-macosx-x86_64-redist.jar -rw-r--r-- 1 carsten carsten 137M Sep 3 21:34 mkl-2020.3-1.5.4-linux-x86-redist.jar -rw-r--r-- 1 carsten carsten 112M Sep 3 21:33 mkl-2020.3-1.5.4-windows-x86-redist.jar -rw-r--r-- 1 carsten carsten 4.4M Sep 3 21:25 mkl-2020.3-1.5.4-linux-x86_64.jar -rw-r--r-- 1 carsten carsten 4.1M Sep 3 21:28 mkl-2020.3-1.5.4-linux-x86.jar -rw-r--r-- 1 carsten carsten 4.1M Sep 3 21:25 mkl-2020.3-1.5.4-macosx-x86_64.jar -rw-r--r-- 1 carsten carsten 3.3M Sep 3 21:25 mkl-2020.3-1.5.4-windows-x86_64.jar -rw-r--r-- 1 carsten carsten 2.0M Sep 3 21:28 mkl-2020.3-1.5.4-windows-x86.jar

So it seems that clj has a reproducible issue with those.

I have it inside a Docker, so on an empty maven folder.

and it happens on every run

(or docker build, better said)

Alex Miller (Clojure team) 2021-09-16T19:53:40.271800Z

I'm going to be looking at some of this stuff tomorrow

I have it on every run against an empty .m2 folder with this deps.edn

{
 :mvn/repos {"clojars" {:url ""}
             "central" {:url ""}
             "bedatadriven" {:url ""}}

 :paths ["src" "resources"]

 :deps {
        org.clojure/clojure      {:mvn/version "1.10.3"}
        clj-python/libpython-clj {:mvn/version "2.000"}
        scicloj/clojisr          {:mvn/version "1.0.0-BETA19"}
        scicloj/tablecloth       {:mvn/version "6.012"}
        scicloj/notespace        {:mvn/version "3-beta9"}
        scicloj/scicloj.ml       {:mvn/version "0.1.0-beta4"}}}

Alex Miller (Clojure team) 2021-09-17T21:52:41.276300Z

Hey Carsten, I tried a lot of stuff today and I was able to reproduce this exactly once. The message you were seeing comes out of Maven itself. In a recent lib update I moved the maven resolver libs up to 1.7.x but those versions are not necessarily guaranteed to work with Maven core 3.8.x (they are expecting Maven core 4.0 alphas). Resolver 1.7 has been working on replacing the locking/synchronization infrastructure which is directly in this area. Anyhow, I have fallen back to 1.6.x which should work with the core libs I'm using. If you wanted to try with Clojure CLI 1.10.3.981, I'd be interested to know if that helped or not.

Alex Miller (Clojure team) 2021-09-20T16:11:39.286400Z

thanks, that will help

Alex Miller (Clojure team) 2021-09-20T16:12:18.286600Z

one thing that I think contributes here is a lot of the deps under http://scicloj.ml are really big native libs

Alex Miller (Clojure team) 2021-09-20T16:12:30.286800Z

I suspect the size == longer download time which exacerbates the problem

Iyes, the MKL libs are very big

> several jars of > 100 MB

error building classpath. Could not acquire write lock for 'artifact:org.bytedeco:mkl:2020.3-1.5.4' java.lang.IllegalStateException: Could not acquire write lock for 'artifact:org.bytedeco:mkl:2020.3-1.5.4'

Alex Miller (Clojure team) 2021-09-20T16:13:52.287600Z

yeah, that exception is in Maven

It works with this clj -P -Sthreads 1

i will quickly try with 1.10.3.981,

Alex Miller (Clojure team) 2021-09-20T16:14:26.288400Z

they have completely rewritten this area in the newest Maven resolver, but it does not work with the current released version of Maven core

Alex Miller (Clojure team) 2021-09-20T16:15:41.288600Z

in the latest I've fallen back to prior Maven resolver version

docker build running, it takes some minutes

It works with 1.10.3.981

Alex Miller (Clojure team) 2021-09-20T16:38:00.289400Z

oh really

Alex Miller (Clojure team) 2021-09-20T16:38:33.289600Z

well that took their new code out of the loop, so that's good to know