# Query help on Flux error

**URL:** <https://discourse.julialang.org/t/query-help-on-flux-error/134296>\
**Category:** New to Julia\
**Created:** [December 2, 2025, 2:45pm UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296 "2025-12-02T14:45:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [December 2, 2025, 2:45pm UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296/1 "2025-12-02T14:45:34Z")

</div>

┌ Error: Error during loading of extension FluxCUDAcuDNNExt of Flux, use `Base.retry_load_extensions()` to retry.  
│ exception =  
│ 1-element ExceptionStack:  
│ ConcurrencyViolationError(“deadlock detected in loading FluxCUDAExt using FluxCUDAExt (while loading FluxCUDAcuDNNExt)”)  
│ Stacktrace:  
│ [1] canstart\_loading(modkey::Base.PkgId, build\_id::UInt128, stalecheck::Bool)  
│ @ Base .\loading.jl:2207  
│ [2] \_require\_search\_from\_serialized(pkg::Base.PkgId, sourcepath::String, build\_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT\_PATH::Vector{String})  
│ @ Base .\loading.jl:2041  
│ [3] \_\_require\_prelocked(pkg::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:2624  
│ [4] \_require\_prelocked(uuidkey::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:2490  
│ [5] \_require\_prelocked(uuidkey::Base.PkgId)  
│ @ Base .\loading.jl:2484  
│ [6] run\_extension\_callbacks(extid::Base.ExtensionId)  
│ @ Base .\loading.jl:1604  
│ [7] run\_extension\_callbacks(pkgid::Base.PkgId)  
│ @ Base .\loading.jl:1641  
│ [8] run\_package\_callbacks(modkey::Base.PkgId)  
│ @ Base .\loading.jl:1457  
│ [9] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
│ @ Base .\loading.jl:2498  
│ [10] macro expansion  
│ @ .\loading.jl:2418 [inlined]  
│ [11] macro expansion  
│ @ .\lock.jl:376 [inlined]  
│ [12] \_\_require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:2383  
│ [13] require  
│ @ .\loading.jl:2359 [inlined]  
│ [14] **init** ()  
│ @ FluxCUDAExt D:\Program Files\Julia.julia\packages\Flux\uRn8o\ext\FluxCUDAExt\FluxCUDAExt.jl:8  
│ [15] run\_module\_init(mod::Module, i::Int64)  
│ @ Base .\loading.jl:1440  
│ [16] register\_restored\_modules(sv::Core.SimpleVector, pkg::Base.PkgId, path::String)  
│ @ Base .\loading.jl:1428  
│ [17] \_include\_from\_serialized(pkg::Base.PkgId, path::String, ocachepath::String, depmods::Vector{Any}; register::Bool)  
│ @ Base .\loading.jl:1316  
│ [18] \_include\_from\_serialized  
│ @ .\loading.jl:1271 [inlined]  
│ [19] \_require\_search\_from\_serialized(pkg::Base.PkgId, sourcepath::String, build\_id::UInt128, stalecheck::Bool; reasons::Dict{String, Int64}, DEPOT\_PATH::Vector{String})  
│ @ Base .\loading.jl:2112  
│ [20] \_\_require\_prelocked(pkg::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:2624  
│ [21] \_require\_prelocked(uuidkey::Base.PkgId, env::Nothing)  
│ @ Base .\loading.jl:2490  
│ [22] \_require\_prelocked(uuidkey::Base.PkgId)  
│ @ Base .\loading.jl:2484  
│ [23] run\_extension\_callbacks(extid::Base.ExtensionId)  
│ @ Base .\loading.jl:1604  
│ [24] run\_extension\_callbacks(pkgid::Base.PkgId)  
│ @ Base .\loading.jl:1641  
│ [25] run\_package\_callbacks(modkey::Base.PkgId)  
│ @ Base .\loading.jl:1457  
│ [26] \_require\_prelocked(uuidkey::Base.PkgId, env::String)  
│ @ Base .\loading.jl:2498  
│ [27] macro expansion  
│ @ .\loading.jl:2418 [inlined]  
│ [28] macro expansion  
│ @ .\lock.jl:376 [inlined]  
│ [29] \_\_require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:2383  
│ [30] require(into::Module, mod::Symbol)  
│ @ Base .\loading.jl:2359  
│ [31] eval(m::Module, e::Any)  
│ @ Core .\boot.jl:489  
│ [32] include\_string(mapexpr::typeof(REPL.softscope), mod::Module, code::String, filename::String)  
│ @ Base .\loading.jl:2867  
│ [33] inlineeval(m::Module, code::String, code\_line::Int64, code\_column::Int64, file::String; softscope::Bool)  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:271  
│ [34] (::VSCodeServer.var"#repl\_runcode\_request##6#repl\_runcode\_request##7"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:181  
│ [35] withpath(f::VSCodeServer.var"#repl\_runcode\_request##6#repl\_runcode\_request##7"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, path::String)  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\repl.jl:278  
│ [36] (::VSCodeServer.var"#repl\_runcode\_request##4#repl\_runcode\_request##5"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})()  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:179  
│ [37] hideprompt(f::VSCodeServer.var"#repl\_runcode\_request##4#repl\_runcode\_request##5"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams})  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\repl.jl:38  
│ [38] #repl\_runcode\_request##2  
│ @ c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:150 [inlined]  
│ [39] with\_logstate(f::VSCodeServer.var"#repl\_runcode\_request##2#repl\_runcode\_request##3"{Bool, Bool, Bool, Module, String, Int64, Int64, String, VSCodeServer.ReplRunCodeRequestParams}, logstate::Base.CoreLogging.LogState)  
│ @ Base.CoreLogging .\logging\logging.jl:540  
│ [40] with\_logger  
│ @ .\logging\logging.jl:651 [inlined]  
│ [41] (::VSCodeServer.var"#repl\_runcode\_request##0#repl\_runcode\_request##1"{VSCodeServer.ReplRunCodeRequestParams})()  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:263  
│ [42] (::VSCodeServer.var"#start\_eval\_backend##0#start\_eval\_backend##1")()  
│ @ VSCodeServer c:\Users\Administrator.vscode\extensions\julialang.language-julia-1.158.2\scripts\packages\VSCodeServer\src\eval.jl:34  
└ @ Base loading.jl:1614

Is there anyone encountering similar errors? How could I deal with it. I have tried to reinstall the packages of Flux and CUDA, but the problem still exist. My package status reads as follows:  
[336ed68f] CSV v0.10.15  
[052768ef] CUDA v5.9.5  
[8f4d0f93] Conda v1.10.3  
[a93c6f00] DataFrames v1.8.1  
[31c24e10] Distributions v0.25.122  
⌃ [c04bee98] ExcelReaders v0.11.0  
[587475ba] Flux v0.16.5  
[87dc4568] HiGHS v1.20.1  
[b6b21f68] Ipopt v1.13.0  
[4076af6c] JuMP v1.29.3  
[91a5bcdd] Plots v1.41.2  
[438e738f] PyCall v1.96.4  
[295af30f] Revise v3.12.3  
[04da0e3b] TypeTree v0.3.0  
[fdbf4ff8] XLSX v0.10.4  
[02a925ec] cuDNN v1.4.6  
[ade2ca70] Dates v1.11.0  
[9a3f8284] Random v1.11.0

---

<div class="post-metadata">

**Author:** ![mcabbott](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/mcabbott/32/6603_2.png) [@mcabbott](https://discourse.julialang.org/u/mcabbott)\
**Post date:** [December 2, 2025, 4:52pm UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296/2 "2025-12-02T16:52:21Z")

</div>

I think this is a known issue on Julia 1.12. I’d suggest using Julia 1.11 for now, as the simplest way to avoid this.

---

<div class="post-metadata">

**Author:** ![bionicinnovations](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/bionicinnovations/32/6065_2.png) [@bionicinnovations](https://discourse.julialang.org/u/bionicinnovations)\
**Post date:** [December 3, 2025, 5:13am UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296/3 "2025-12-03T05:13:18Z")

</div>

Im having the same issue too:

```julia-auto
┌ Error: Error during loading of extension FluxCUDAcuDNNExt of Flux, use `Base.retry_load_extensions()` to retry.
│ exception =
│ 1-element ExceptionStack:
│ ConcurrencyViolationError("deadlock detected in loading FluxCUDAExt using FluxCUDAExt (while loading FluxCUDAcuDNNExt)")

```

We’ve been running into the same issue on Windows when upgrading from Julia 1.11.7 to 1.12.1 or 1.12.2. In our case the environment, CUDA version, and cuDNN versions were all known-good under Julia 1.11, but 1.12 consistently triggers a `ConcurrencyViolationError` during extension loading, specifically between `FluxCUDAExt` and `FluxCUDAcuDNNExt`.

The deadlock appears regardless of whether the CUDA.jl version is 5.8.x or 5.9.x, and even after recreating the environment from scratch. GPU discovery, CUDA runtime, and all low-level libs load correctly; the failure only occurs when Julia 1.12 tries to activate Flux’s cuDNN extension.

---

<div class="post-metadata">

**Author:** ![Fourier](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fourier/32/38176_2.png) [@Fourier](https://discourse.julialang.org/u/Fourier)\
**Post date:** [December 3, 2025, 6:23am UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296/4 "2025-12-03T06:23:41Z")

</div>

> [@mcabbott](#):
>
> I’d suggest using Julia 1.11 for now, as the simplest way to avoid this.

I can highly recommend using juliaup for managing julia versions.

---

<div class="post-metadata">

**Author:** ![lionisxn](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lionisxn/32/37989_2.png) [@lionisxn](https://discourse.julialang.org/u/lionisxn)\
**Post date:** [December 9, 2025, 5:00am UTC](https://discourse.julialang.org/t/query-help-on-flux-error/134296/5 "2025-12-09T05:00:09Z")

</div>

The new update of Flux v0.16.6 has resolved it, wonderful!
