Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build requires network access due to Pkg #43006

Closed
vtjnash opened this issue Nov 8, 2021 · 8 comments · Fixed by JuliaLang/Pkg.jl#2834 · May be fixed by JuliaLang/Pkg.jl#2833
Closed

build requires network access due to Pkg #43006

vtjnash opened this issue Nov 8, 2021 · 8 comments · Fixed by JuliaLang/Pkg.jl#2834 · May be fixed by JuliaLang/Pkg.jl#2833
Labels
building Build system, or building Julia or its dependencies regression Regression in behavior compared to a previous version
Milestone

Comments

@vtjnash
Copy link
Member

vtjnash commented Nov 8, 2021

Printing out the generate_precompile.jl script, we see that it may waste a lot of time on network access, which it is not supposed to do. With networking partially blocked, I see reported that:

...
Generating REPL precompile statements... 28/35
#### inputting statement: ####
"Pkg.update()"
####
julia> Pkg.update()
┌ Warning: could not download https://pkg.julialang.org/registries
│   exception = Operation timed out after 30016 milliseconds with 0 out of 0 bytes received while requesting https://pkg.julialang.org/registries
...

Refs #40185, #41019,

@vtjnash vtjnash added the regression Regression in behavior compared to a previous version label Nov 8, 2021
@vtjnash vtjnash added this to the 1.7 milestone Nov 8, 2021
@DilumAluthge DilumAluthge added the building Build system, or building Julia or its dependencies label Nov 8, 2021
@KristofferC KristofferC reopened this Nov 10, 2021
@KristofferC KristofferC removed this from the 1.7 milestone Nov 10, 2021
@KristofferC
Copy link
Member

Fixed for 1.7. Probably still problematic on master.

@vtjnash vtjnash added this to the 1.8 milestone Aug 10, 2022
@vtjnash
Copy link
Member Author

vtjnash commented Aug 10, 2022

Adding milestone, since this is apparently still "problematic for master". Please close if it is not

@KristofferC
Copy link
Member

This is an issue on 1.8 but is IMO not release blocking since the worst thing it does is make the build a bit longer.

@ViralBShah
Copy link
Member

Please reopen if still an issue.

@vtjnash vtjnash reopened this Sep 6, 2023
@vtjnash
Copy link
Member Author

vtjnash commented Sep 6, 2023

This seems to be causing problems with moving Pkg out of the sysimg, since it appears to cause that process to crash if there are network issues: #51189

@KristofferC
Copy link
Member

This seems to be causing problems with moving Pkg out of the sysimg, since it appears to cause that process to crash if there are network issues:

This is not correct since the PR there does not run a precompile workload.

@vtjnash vtjnash closed this as completed Feb 6, 2024
@JeroenOlieslagers
Copy link

Still an issue on most recent Julia release. Not an issue on 1.9.4 release. When trying to add JLD2 (or any other package), this error presents:

  Installing known registries into `/scratch/jo2229/.julia`
┌ Warning: could not download https://pkg.julialang.org/registries
│   exception = RequestError: Error reading ca cert file /etc/ssl/certs/ca-certificates.crt - mbedTLS: (-0x3E00) PK - Read/write of file failed while requesting https://pkg.julialang.org/registries
└ @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:69
┌ Warning: could not download https://pkg.julialang.org/registries
│   exception = RequestError: Error reading ca cert file /etc/ssl/certs/ca-certificates.crt - mbedTLS: (-0x3E00) PK - Read/write of file failed while requesting https://pkg.julialang.org/registries
└ @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:69
     Cloning registry from "https://github.com/JuliaRegistries/General.git"
ERROR: LoadError: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:SSL, failed to load CA certificates: 0xffffc200 - PK - Read/write of file failed)

Stacktrace:
  [1] pkgerror(msg::String)
    @ Pkg.Types ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Types.jl:70
  [2] clone(io::IOStream, url::String, source_path::String; header::String, credentials::Nothing, kwargs::@Kwargs{})
    @ Pkg.GitTools ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:132
  [3] (::Base.var"#96#98"{Base.var"#96#97#99"{Vector{Float64}, Pkg.Registry.var"#51#55", typeof(Pkg.GitTools.clone)}})(::IOStream, ::Vararg{Any}; kwargs::@Kwargs{header::String})
    @ Base ./error.jl:296
  [4] #96
    @ ./error.jl:291 [inlined]
  [5] (::Pkg.Registry.var"#50#54"{Pkg.Registry.RegistrySpec, Nothing, IOStream, String})(tmp::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:238
  [6] mktempdir(fn::Pkg.Registry.var"#50#54"{Pkg.Registry.RegistrySpec, Nothing, IOStream, String}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:766
  [7] mktempdir(fn::Function, parent::String)
    @ Base.Filesystem ./file.jl:762
  [8] mktempdir
    @ ./file.jl:762 [inlined]
  [9] (::Pkg.Registry.var"#48#52"{IOStream, Vector{Pkg.Registry.RegistrySpec}, String})()
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:202
 [10] mkpidlock(f::Pkg.Registry.var"#48#52"{IOStream, Vector{Pkg.Registry.RegistrySpec}, String}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
 [11] mkpidlock
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:90 [inlined]
 [12] mkpidlock
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
 [13] download_registries(io::IOStream, regs::Vector{Pkg.Registry.RegistrySpec}, depot::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:168
 [14] download_default_registries(io::IOStream; only_if_empty::Bool, depot::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:111
 [15] download_default_registries
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:98 [inlined]
 [16] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOStream, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:149
 [17] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:148
 [18] add
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
 [19] add(pkg::String)
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:146
 [20] top-level scope
    @ /scratch/jo2229/state_encoding.jl:2
in expression starting at /scratch/jo2229/state_encoding.jl:2

caused by: GitError(Code:ERROR, Class:SSL, failed to load CA certificates: 0xffffc200 - PK - Read/write of file failed)
Stacktrace:
  [1] set_ssl_cert_locations(cert_loc::String)
    @ LibGit2 ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:1014
  [2] initialize()
    @ LibGit2 ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:991
  [3] (::LibGit2.var"#161#162")()
    @ LibGit2 ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:977
  [4] lock(f::LibGit2.var"#161#162", l::ReentrantLock)
    @ Base ./lock.jl:229
  [5] ensure_initialized
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:973 [inlined]
  [6] LibGit2.GitConfig(level::LibGit2.Consts.GIT_CONFIG)
    @ LibGit2 ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/config.jl:50
  [7] GitConfig
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/config.jl:50 [inlined]
  [8] CredentialPayload
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/types.jl:1367 [inlined]
  [9] #CredentialPayload#23
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/types.jl:1385 [inlined]
 [10] CredentialPayload
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/types.jl:1384 [inlined]
 [11] clone(repo_url::SubString{String}, repo_path::String; branch::String, isbare::Bool, remote_cb::Ptr{Nothing}, credentials::LibGit2.CachedCredentials, callbacks::Dict{Symbol, Tuple{Ptr{Nothing}, Any}})
    @ LibGit2 ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:564
 [12] clone
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/LibGit2/src/LibGit2.jl:558 [inlined]
 [13] clone(io::IOStream, url::String, source_path::String; header::String, credentials::Nothing, kwargs::@Kwargs{})
    @ Pkg.GitTools ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/GitTools.jl:121
 [14] (::Base.var"#96#98"{Base.var"#96#97#99"{Vector{Float64}, Pkg.Registry.var"#51#55", typeof(Pkg.GitTools.clone)}})(::IOStream, ::Vararg{Any}; kwargs::@Kwargs{header::String})
    @ Base ./error.jl:296
 [15] #96
    @ ./error.jl:291 [inlined]
 [16] (::Pkg.Registry.var"#50#54"{Pkg.Registry.RegistrySpec, Nothing, IOStream, String})(tmp::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:238
 [17] mktempdir(fn::Pkg.Registry.var"#50#54"{Pkg.Registry.RegistrySpec, Nothing, IOStream, String}, parent::String; prefix::String)
    @ Base.Filesystem ./file.jl:766
 [18] mktempdir(fn::Function, parent::String)
    @ Base.Filesystem ./file.jl:762
 [19] mktempdir
    @ ./file.jl:762 [inlined]
 [20] (::Pkg.Registry.var"#48#52"{IOStream, Vector{Pkg.Registry.RegistrySpec}, String})()
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:202
 [21] mkpidlock(f::Pkg.Registry.var"#48#52"{IOStream, Vector{Pkg.Registry.RegistrySpec}, String}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:93
 [22] mkpidlock
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:90 [inlined]
 [23] mkpidlock
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/FileWatching/src/pidfile.jl:88 [inlined]
 [24] download_registries(io::IOStream, regs::Vector{Pkg.Registry.RegistrySpec}, depot::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:168
 [25] download_default_registries(io::IOStream; only_if_empty::Bool, depot::String)
    @ Pkg.Registry ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:111
 [26] download_default_registries
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/Registry/Registry.jl:98 [inlined]
 [27] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::IOStream, kwargs::@Kwargs{})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:149
 [28] add(pkgs::Vector{Pkg.Types.PackageSpec})
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:148
 [29] add
    @ ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:147 [inlined]
 [30] add(pkg::String)
    @ Pkg.API ~/.julia/juliaup/julia-1.10.1+0.x64.linux.gnu/share/julia/stdlib/v1.10/Pkg/src/API.jl:146
 [31] top-level scope
    @ /scratch/jo2229/state_encoding.jl:2

@KristofferC
Copy link
Member

When trying to add JLD2 (or any other package), this error presents:

This is #53339. See the thread for a work around in there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies regression Regression in behavior compared to a previous version
Projects
None yet
5 participants