Closed Drachta closed 2 years ago
Hi @Drachta, thanks for reporting this. Does this happen every time?
It looks very similar to this: https://github.com/JuliaLang/julia/issues/39457
Yes, it happens every time. I tried to restart my computer just in case, but it still happens. It seems I also have the same problem with version 1.7.2 of Julia.
I can delete the temporary file from within windows explorer without any popup saying that the file is used somewhere.
Is there any folder / files I can remove so I can start from a fresh envirronement ? Or reinstalling Julia is enough ?
EDIT: after reinstalling Julia and deleting the folder: C:\Users\Etudiant\.julia
, the issue persists. Other packages seem to work fine. JLD2 is installed as a dependency and its target version is 0.4.21
The error sadly has little to do with JLD2 - only that JLD2 uses mktempdir
during precompilation.
This was introduced in JLD2 v0.4.20 for better performance. 0.4.19 shouldn't have this issue.
@JonasIsensee Thank you very much! It works with version 0.4.19.
This issue prevents me from installing the latest version on Windows7
julia> versioninfo() Julia Version 1.9.2 Commit e4ee485e90 (2023-07-05 09:39 UTC) Platform Info: OS: Windows (x86_64-w64-mingw32) CPU: 4 × Intel(R) Core(TM) i5-3230M CPU @ 2.60GHz WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-14.0.6 (ORCJIT, ivybridge) Threads: 1 on 4 virtual cores Environment: JULIA_IMAGE_THREADS = 1
julia> using JLD2 [ Info: Precompiling JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819] ┌ Error: mktemp cleanup │ exception = │ IOError: unlink("C:\Users\kmb\AppData\Local\Temp\jl_2127.tmp"): resou rce busy or locked (EBUSY) │ Stacktrace: │ [1] uv_error │ @ .\libuv.jl:100 [inlined] │ [2] unlink(p::String) │ @ Base.Filesystem .\file.jl:972 │ [3] rm(path::String; force::Bool, recursive::Bool) │ @ Base.Filesystem .\file.jl:283 │ [4] rm │ @ .\file.jl:273 [inlined] │ [5] mktemp(fn::JLD2.var"#121#125", parent::String) │ @ Base.Filesystem .\file.jl:736 │ [6] mktemp(fn::Function) │ @ Base.Filesystem .\file.jl:730 │ [7] top-level scope │ @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\precompile.jl:2 │ [8] include(mod::Module, _path::String) │ @ Base .\Base.jl:457 │ [9] include │ @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:1 [inlined] │ [10] top-level scope │ @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:616 │ [11] include │ @ .\Base.jl:457 [inlined] │ [12] include_package_for_output(pkg::Base.PkgId, input::String, depot_path ::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concr ete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) │ @ Base .\loading.jl:2049 │ [13] top-level scope │ @ stdin:3 │ [14] eval │ @ .\boot.jl:370 [inlined] │ [15] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String) │ @ Base .\loading.jl:1903 │ [16] include_string │ @ .\loading.jl:1913 [inlined] │ [17] exec_options(opts::Base.JLOptions) │ @ Base .\client.jl:305 │ [18] _start() │ @ Base .\client.jl:522 └ @ Base.Filesystem file.jl:738 ERROR: LoadError: IOError: realpath("C:\Users\kmb\AppData\Local\Temp\jl_21 27.tmp"): resource busy or locked (EBUSY) Stacktrace: [1] uv_error @ .\libuv.jl:100 [inlined] [2] realpath(path::String) @ Base.Filesystem .\path.jl:487 [3] jldopen(fname::String, wr::Bool, create::Bool, truncate::Bool, iotype::Typ e{JLD2.MmapIO}; fallback::Type{IOStream}, compress::Bool, mmaparrays::Bool, type map::Dict{String, Any}, parallel_read::Bool) @ JLD2 C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:357 [4] jldopen(fname::String, mode::String; iotype::Type, kwargs::Base.Pairs{Symb ol, Bool, Tuple{Symbol}, NamedTuple{(:compress,), Tuple{Bool}}}) @ JLD2 C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:439 [5] jldopen(::Function, ::String, ::Vararg{String}; kws::Base.Pairs{Symbol, An y, Tuple{Symbol, Symbol}, NamedTuple{(:compress, :iotype), Tuple{Bool, DataType} }}) @ JLD2 C:\Users\kmb.julia\packages\JLD2\cHcDY\src\loadsave.jl:2 [6] jldopen @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\loadsave.jl:1 [inlined] [7] #jldsave#81 @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\loadsave.jl:243 [inlined] [8] jldsave (repeats 2 times) @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\loadsave.jl:240 [inlined] [9] (::JLD2.var"#121#125")(path::String, #unused#::IOStream) @ JLD2 C:\Users\kmb.julia\packages\JLD2\cHcDY\src\precompile.jl:14 [10] mktemp(fn::JLD2.var"#121#125", parent::String) @ Base.Filesystem .\file.jl:732 [11] mktemp(fn::Function) @ Base.Filesystem .\file.jl:730 [12] top-level scope @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\precompile.jl:2 [13] include(mod::Module, _path::String) @ Base .\Base.jl:457 [14] include @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:1 [inlined] [15] top-level scope @ C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:616 [16] include @ .\Base.jl:457 [inlined] [17] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vec tor{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_d eps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing) @ Base .\loading.jl:2049 [18] top-level scope @ stdin:3 in expression starting at C:\Users\kmb.julia\packages\JLD2\cHcDY\src\precompile .jl:1 in expression starting at C:\Users\kmb.julia\packages\JLD2\cHcDY\src\JLD2.jl:1 in expression starting at stdin:3 ┌ Warning: temp cleanup │ exception = │ IOError: unlink("C:\Users\kmb\AppData\Local\Temp\jl_2127.tmp"): permi ssion denied (EACCES) │ Stacktrace: │ [1] uv_error │ @ .\libuv.jl:100 [inlined] │ [2] unlink(p::String) │ @ Base.Filesystem .\file.jl:972 │ [3] rm(path::String; force::Bool, recursive::Bool) │ @ Base.Filesystem .\file.jl:283 │ [4] rm │ @ .\file.jl:273 [inlined] │ [5] temp_cleanup_purge(; force::Bool) │ @ Base.Filesystem .\file.jl:543 │ [6] temp_cleanup_purge │ @ .\file.jl:535 [inlined] │ [7] (::Base.var"#930#931")() │ @ Base .\initdefs.jl:354 │ [8] _atexit(exitcode::Int32) │ @ Base .\initdefs.jl:416 │ [9] exit │ @ .\initdefs.jl:28 [inlined] │ [10] exec_options(opts::Base.JLOptions) │ @ Base .\client.jl:312 │ [11] _start() │ @ Base .\client.jl:522 └ @ Base.Filesystem file.jl:547 ERROR: Failed to precompile JLD2 [033835bb-8acc-5ee8-8aae-3f567f8a3819] to "C:\ Users\kmb\.julia\compiled\v1.9\JLD2\jl_F81D.tmp". Stacktrace: [1] error(s::String) @ Base .\error.jl:35 [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_s tdout::IO, keep_loaded_modules::Bool) @ Base .\loading.jl:2300 [3] compilecache @ .\loading.jl:2167 [inlined] [4] _require(pkg::Base.PkgId, env::String) @ Base .\loading.jl:1805 [5] _require_prelocked(uuidkey::Base.PkgId, env::String) @ Base .\loading.jl:1660 [6] macro expansion @ .\loading.jl:1648 [inlined] [7] macro expansion @ .\lock.jl:267 [inlined] [8] require(into::Module, mod::Symbol) @ Base .\loading.jl:1611
Hello, this problem may be caused by the jldopen() function under win7 being unable to write. Under win7, iotype = IOStream is required to write. It is likely that this problem causes the precompilation to fail under win7.
Both users here are showing problems with unlink
. That is Julia is unable to remove the temporary files.
Hello,
I'm having trouble using JLD2. It seems to complain about a permission on a temp file during precompile, but running Julia command prompt as admin didn't solve the issue.
I'm not sure what else I can try to solve this issue.