Precompilation warning - in which package should it be fixed?

If I run the following script:

#!/bin/bash -eu
rm -rf /tmp/testdepot
mkdir /tmp/testdepot
rm -rf /tmp/test
mkdir /tmp/test
cd /tmp/test
export JULIA_DEPOT_PATH=/tmp/testdepot 
julia --project="." -e "using Pkg; Pkg.add(\"LinearSolve\"); using LinearSolve"
cd ..

I get the following output:

Precompiling project...
  99 dependencies successfully precompiled in 46 seconds
  1 dependency had output during precompilation:
┌ MKL_jll
│   Downloading artifact: MKL
│  
│  [pid 37681] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x140ead0->0x73bd1b5c4460
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.
│  
│  [pid 37681] waiting for IO to finish:
│   Handle type        uv_handle_t->data
│   timer              0x140ead0->0x73bd1b5c4460
│  This means that a package has started a background task or event source that has not finished running. For precompilation to complete successfully, the event source needs to be closed explicitly. See the developer documentation on fixing precompilation hangs for more help.

Is this a bug in mkl_jll, or in LinearSolve, or in Pkg?

I filed a bug report: mkl_jll hangs during precompilation · Issue #9281 · JuliaPackaging/Yggdrasil · GitHub

and was told that the bug would have been fixed in Pkg already, but it is not fixed.

Any idea?

1 Like

You were referred to JuliaLang/Pkg.jl#3950, which backported a fix to the 1.10 branch on July 13. Since 1.10.4 was released on June 4 it’s obviously not included there but presumably will be in a forthcoming 1.10.5.

Since it was backported from 1.11 the fix should be in 1.11.0-rc2 as well.

1 Like

Just tested it with 1.11.0-rc2 (2024-07-29), and the issue is NOT fixed.

That’s unfortunate. Either the fix wasn’t working as well as expected or it has broken again later. At any rate it’s a Pkg bug.

I can confirm (on Linux) that the problem persists on 1.11.0-rc2 and 1.12.0-DEV.1085 but a source build of the 1.10 branch works fine, so it does look like this will indeed be fixed for 1.10.5.

That 1.11.0-rc2 has the problem is bad of course.

I tried a source build of the 1.10 branch.

I get this output:

Precompiling project...
  99 dependencies successfully precompiled in 41 seconds
  1 dependency had output during precompilation:
┌ MKL_jll
│   Downloading artifact: MKL
└  

This is much better than before, but is this message needed? I mean, it gets printed a long time after the download has finished, so it is not so very useful. Other packages do not print anything when they are downloading artifacts.

And which branch could I try to test the upcoming 1.11 release?

Because they don’t download them during precompilation but during installation. MKL_jll is a particular artifact because it’s lazy (there aren’t many lazy artifacts, so you don’t see this frequently).

Could you please open an issue with Pkg about this warning persisting on v1.11?

Done: Precompliation warning on 1.11rc2 · Issue #55577 · JuliaLang/julia · GitHub

2 Likes

Avoid side effects when precompiling `find_artifact_dir` by giordano · Pull Request #66 · JuliaPackaging/JLLWrappers.jl · GitHub might have helped with this as well.