Skip to content

Registry downloads not atomic across processes: IOError: unlink("registries\\General.tar.gz"): resource busy or locked #2746

@IanButterworth

Description

@IanButterworth

Seen in #2732 where multiple processes are updating the registry at the same time. https://github.com/JuliaLang/Pkg.jl/pull/2732/checks?check_run_id=3739676185
Might just be a problem on windows?

ERROR: IOError: unlink("tmp\\registries\\General.tar.gz"): resource busy or locked (EBUSY)
Stacktrace:
  [1] uv_error
    @ .\libuv.jl:97 [inlined]
  [2] unlink(p::String)
    @ Base.Filesystem .\file.jl:970
  [3] rm(path::String; force::Bool, recursive::Bool)
    @ Base.Filesystem .\file.jl:281
  [4] checkfor_mv_cp_cptree(src::String, dst::String, txt::String; force::Bool)
    @ Base.Filesystem .\file.jl:328
  [5] #mv#15
    @ .\file.jl:423 [inlined]
  [6] download_registries(io::Base.DevNull, regs::Vector{Pkg.Registry.RegistrySpec}, depot::String)
    @ Pkg.Registry D:\a\Pkg.jl\Pkg.jl\src\Registry\Registry.jl:182
  [7] download_registries
    @ D:\a\Pkg.jl\Pkg.jl\src\Registry\Registry.jl:161 [inlined]
  [8] download_default_registries(io::Base.DevNull; only_if_empty::Bool)
    @ Pkg.Registry D:\a\Pkg.jl\Pkg.jl\src\Registry\Registry.jl:108
  [9] download_default_registries
    @ D:\a\Pkg.jl\Pkg.jl\src\Registry\Registry.jl:96 [inlined]
 [10] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.DevNull, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
    @ Pkg.API D:\a\Pkg.jl\Pkg.jl\src\API.jl:145
 [11] #add#27
    @ D:\a\Pkg.jl\Pkg.jl\src\API.jl:143 [inlined]
 [12] #add#26
    @ D:\a\Pkg.jl\Pkg.jl\src\API.jl:142 [inlined]
 [13] top-level scope
    @ none:4

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions