JuliaServices/ConcurrentUtilities.jl

Precompile broken on julia-1.9.0-rc2 (also observed on julia-1.9.0)

Closed this issue · 5 comments

This succeeded a couple hours ago (and when I pin ConcurrentUtilities to v2.3.1), but seems to be broken now:

ERROR: LoadError: ArgumentError: unsupported threadpool in @Spawn: Threads.threadpool()
Stacktrace:
[1] var"@Spawn"(source::LineNumberNode, module::Module, args::Vararg{Any})
@ Base.Threads ./threadingconstructs.jl:331
[2] #macroexpand#63
@ ./expr.jl:119 [inlined]
[3] macroexpand
@ ./expr.jl:117 [inlined]
[4] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any, define::Bool)
@ Base.Docs ./docs/Docs.jl:539
[5] docm(source::LineNumberNode, mod::Module, meta::Any, ex::Any)
@ Base.Docs ./docs/Docs.jl:539
[6] var"@doc"(::LineNumberNode, ::Module, ::String, ::Vararg{Any})
@ Core ./boot.jl:539
[7] include(mod::Module, _path::String)
@ Base ./Base.jl:457
[8] include(x::String)
@ ConcurrentUtilities /opt/julia-1.9.0-rc2/.julia/packages/ConcurrentUtilities/RLFRH/src/ConcurrentUtilities.jl:1
[9] top-level scope
@ /opt/julia-1.9.0-rc2/.julia/packages/ConcurrentUtilities/RLFRH/src/ConcurrentUtilities.jl:15
[10] include
@ ./Base.jl:457 [inlined]
[11] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
@ Base ./loading.jl:2012
[12] top-level scope
@ stdin:2
in expression starting at /opt/julia-1.9.0-rc2/.julia/packages/ConcurrentUtilities/RLFRH/src/try_with_timeout.jl:27
in expression starting at /opt/julia-1.9.0-rc2/.julia/packages/ConcurrentUtilities/RLFRH/src/try_with_timeout.jl:27
in expression starting at /opt/julia-1.9.0-rc2/.julia/packages/ConcurrentUtilities/RLFRH/src/ConcurrentUtilities.jl:1
in expression starting at stdin:2
ERROR: LoadError: Failed to precompile ConcurrentUtilities [f0e56b4a-5159-44fe-b623-3e5288b988bb] to "/opt/julia-1.9.0-rc2/.julia/compiled/v1.9/ConcurrentUtilities/jl_bFI73H".
Stacktrace:
[1] error(s::String)
@ Base ./error.jl:35
[2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
@ Base ./loading.jl:2262
[3] compilecache
@ ./loading.jl:2129 [inlined]
[4] _require(pkg::Base.PkgId, env::String)
@ Base ./loading.jl:1772
[5] _require_prelocked(uuidkey::Base.PkgId, env::String)
@ Base ./loading.jl:1623
[6] macro expansion
@ ./loading.jl:1611 [inlined]
[7] macro expansion
@ ./lock.jl:267 [inlined]
[8] require(into::Module, mod::Symbol)
@ Base ./loading.jl:1574
[9] include(mod::Module, _path::String)
@ Base ./Base.jl:457
[10] include(x::String)
@ HTTP /opt/julia-1.9.0-rc2/.julia/packages/HTTP/LsfSO/src/HTTP.jl:1
[11] top-level scope
@ /opt/julia-1.9.0-rc2/.julia/packages/HTTP/LsfSO/src/HTTP.jl:40
[12] include
@ ./Base.jl:457 [inlined]
[13] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
@ Base ./loading.jl:2012
[14] top-level scope
@ stdin:2
in expression starting at /opt/julia-1.9.0-rc2/.julia/packages/HTTP/LsfSO/src/Connections.jl:1
in expression starting at /opt/julia-1.9.0-rc2/.julia/packages/HTTP/LsfSO/src/HTTP.jl:1
in expression starting at stdin:2

We are seeing this also, seems like #32 broke HTTP.jl on 1.9.0

seems ok with julia 1.9.4

we observed that with julia 1.9.0

julia> Threads.@spawn Threads.threadpool() 123
ERROR: LoadError: ArgumentError: unsupported threadpool in @spawn: Threads.threadpool()
Stacktrace:
 [1] var"@spawn"(__source__::LineNumberNode, __module__::Module, args::Vararg{Any})
   @ Base.Threads ./threadingconstructs.jl:363
in expression starting at REPL[1]:1

but with julia 1.9.4

julia> Threads.@spawn Threads.threadpool() 123
Task (done) @0x0000000109fc9460

I tried on Julia 1.9.0, 1.9.1 and 1.9.2. It seems to be broken on 1.9.0 and 1.9.1, but works starting on 1.9.2. Given that, I made a quick work-a-round in #34. I guess there might be a better solution, but not sure if it is worth the effort to figure out a better solution for the two failing point releases? see JuliaLang/julia#50182.

Closed with #34