ConcurrencyViolationError in precompiling JLD2 on Julia 1.12

I just did a new install of Julia 1.12.0 and was adding packages when I got this error:

PkgPrecompileError: The following 1 direct dependency failed to precompile:

JLD2 
rror encountered while load FileIO.File{FileIO.DataFormat{:JLD2}, String}("/tmp/jl_RFt2v9").

Fatal error:
ERROR: LoadError: ConcurrencyViolationError("deadlock detected in loading JLD2 using JLD2")

There is a Stacktrace I can add if it helps, but I wasn’t sure what would make this happen or how to approach it. Any help appreciated.

Can you share the output of:

using Pkg
Pkg.status()

and the output of

versioninfo()

?

versioninfo()
Julia Version 1.12.0
Commit b907bd0600f (2025-10-07 15:42 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 4 × Intel(R) Core(TM) i5-7300HQ CPU @ 2.50GHz
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, skylake)
  GC: Built with stock GC
Threads: 1 default, 1 interactive, 1 GC (on 4 virtual cores)

(@v1.12) pkg> st
Status `~/.julia/environments/v1.12/Project.toml`
  [336ed68f] CSV v0.10.15
  [861a8166] Combinatorics v1.0.3
  [a93c6f00] DataFrames v1.8.0
⌅ [864edb3b] DataStructures v0.18.22
  [5c1252a2] GeometryBasics v0.5.10
⌃ [1ecd5474] GraphMakie v0.5.14
  [86223c79] Graphs v1.13.1
⌃ [033835bb] JLD2 v0.4.54
  [46757867] NetworkLayout v0.4.10

actually to see if it makes a difference, I removed some packages, so now it’s

Status `~/.julia/environments/v1.12/Project.toml`
  [861a8166] Combinatorics v1.0.3
  [a93c6f00] DataFrames v1.8.0
⌃ [864edb3b] DataStructures v0.18.22
  [5c1252a2] GeometryBasics v0.5.10
⌃ [033835bb] JLD2 v0.4.54

Did you try:

using Pkg
Pkg.update()

Sometimes older versions of the packages don’t work well with the newest Julia version.

This works fine for me on Ubuntu:

(tmp) pkg> st
Status `~/tmp/Project.toml`
  [861a8166] Combinatorics v1.0.3
  [a93c6f00] DataFrames v1.8.0
  [864edb3b] DataStructures v0.19.1
  [5c1252a2] GeometryBasics v0.5.10
  [033835bb] JLD2 v0.6.2

julia> using JLD2

This was fixed in stop precompiling FileIO.load by JonasIsensee · Pull Request #637 · JuliaIO/JLD2.jl · GitHub and convert UnPack into an extension by JonasIsensee · Pull Request #643 · JuliaIO/JLD2.jl · GitHub

So only available in JLD2 0.5 or above.

Feel free to try and backport fixes to JLD2 0.4, but you probably want to be on JLD2 0.6 to avoid other fragile loading code. Any help updating packages to JLD2 0.6 is greatly appreciated. 7. Compatibility · Pkg.jl

That explains everything. I had installed Agents.jl and that pinned my to version v0.4.54. Removing, updating as @ufechner7 suggested and restarting Julia got around this issue.

I’ll see if I can help get this package updated in the Agents repo.

2 Likes

I have the same issue with Agents.jl; after digging around a bit, the issue is really with LightOSM, not Agents: #111 precompile fails on Julia v1.12.0.

1 Like

As a quick note for anyone else with this issue… the quickest fix for me was to just edit the project.toml for LightOSM to 0.8.1 as described by @renatomc, then re-add Agents.