Description
After finishing running testsuite this error appears on Windows:
ERROR: LoadError: IOError: unlink("C:\\Users\\tonys\\AppData\\Local\\Temp\\ReTestItemsTempLogsDirectory\\ReTestItems_setup_TSCore_12038651198515000257.log"): resource busy or locked (EBUSY)
Stacktrace:
[1] uv_error
@ Base .\libuv.jl:100 [inlined]
[2] unlink(p::String)
@ Base.Filesystem .\file.jl:978
[3] rm(path::String; force::Bool, recursive::Bool)
@ Base.Filesystem .\file.jl:283
[4] rm
@ .\file.jl:273 [inlined]
[5] foreach(f::ReTestItems.var"#16#17"{ReTestItems.TestItems}, itr::Vector{Union{ReTestItems.DirNode, ReTestItems.FileNode}})
@ Base .\abstractarray.jl:3086 [inlined]
[6] _runtests_in_current_env(shouldrun::Function, paths::Tuple{String}, projectfile::String, nworkers::Int64, nworker_threads::String, worker_init_expr::Expr, test_end_expr::Expr, testitem_timeout::Int64, retries::Int64, memory_threshold::Float64, verbose_results::Bool, debug::Int64, report::Bool, logs::Symbol)
@ ReTestItems C:\Users\tonys\.julia\packages\ReTestItems\HZCMZ\src\ReTestItems.jl:378
[7] (::ReTestItems.var"#46#47"{ReTestItems.var"#shouldrun_combined#44"{Nothing, Nothing, var"#4#5"}, Tuple{String}, Int64, String, Expr, Expr, Int64, Int64, Float64, Bool, Int64, Bool, Symbol, String})()
@ ReTestItems C:\Users\tonys\.julia\packages\ReTestItems\HZCMZ\src\ReTestItems.jl:278
[8] with_logstate(f::Function, logstate::Any)
@ Base.CoreLogging .\logging.jl:515
[9] with_logger
@ .\logging.jl:627 [inlined]
[10] _runtests(shouldrun::Function, paths::Tuple{String}, nworkers::Int64, nworker_threads::String, worker_init_expr::Expr, test_end_expr::Expr, testitem_timeout::Int64, retries::Int64, memory_threshold::Float64, verbose_results::Bool, debug::Int64, report::Bool, logs::Symbol)
@ ReTestItems C:\Users\tonys\.julia\packages\ReTestItems\HZCMZ\src\ReTestItems.jl:274
[11] runtests(shouldrun::var"#4#5", paths::String; nworkers::Int64, nworker_threads::Int64, worker_init_expr::Expr, testitem_timeout::Int64, retries::Int64, memory_threshold::Float64, debug::Int64, name::Nothing, tags::Nothing, report::Bool, logs::Symbol, verbose_results::Bool, test_end_expr::Expr)
@ ReTestItems C:\Users\tonys\.julia\packages\ReTestItems\HZCMZ\src\ReTestItems.jl:244
[12] #runtests#39
@ ReTestItems C:\Users\tonys\.julia\packages\ReTestItems\HZCMZ\src\ReTestItems.jl:196 [inlined]
[13] top-level scope
@ C:\Users\tonys\.julia\dev\AMDGPU\test\runtests.jl:114
[14] include(fname::String)
@ Base.MainInclude .\client.jl:489
[15] top-level scope
@ none:6
in expression starting at C:\Users\tonys\.julia\dev\AMDGPU\test\runtests.jl:114
Activity
pxl-th commentedon Nov 22, 2023
Actually that does not happen all the time... Maybe it was a fluke
nickrobinson251 commentedon Dec 4, 2023
please re-open if this keeps happening
awadell1 commentedon Feb 15, 2024
I'm able to reproduce this fairly reliable here: https://github.com/awadell1/PkgJogger.jl/actions/runs/7223307848/job/19682092814?pr=69
avik-pal commentedon Nov 19, 2024
Is there any known workaround for this issue? We are seeing it consistently in https://github.com/SciML/NonlinearSolve.jl
nickrobinson251 commentedon Nov 19, 2024
I'm basically offline til the new year. @Drvi are you perhaps able to take a look?
Seems to be happening here
ReTestItems.jl/src/ReTestItems.jl
Lines 462 to 465 in f3735d5
Maybe since this is in
tmpdir
we don't even need to cllean these up ourselves? Or at least we could wrap this in atry catch
where thecatch
does nothing or maybe just logs a debug message about the error?