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

Precompilation failure on nightly #618

Open
jishnub opened this issue Feb 15, 2025 · 3 comments
Open

Precompilation failure on nightly #618

jishnub opened this issue Feb 15, 2025 · 3 comments

Comments

@jishnub
Copy link
Contributor

jishnub commented Feb 15, 2025

I'm not entirely certain if this is a Cthulhu issue, or a Compiler one, but this is the error that I obtain when trying to load Cthulhu on a recent julia v1.13 nightly (v"1.13.0-DEV.64").

ERROR: LoadError: UndefVarError: `Core` not defined in `Compiler.Timings`
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/typeinfer.jl:17
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
  [3] include(x::String)
    @ Compiler ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:93
  [4] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:178
  [5] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
  [6] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:36
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
  [8] 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:3004
  [9] top-level scope
    @ stdin:6
 [10] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
 [11] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2855
 [12] include_string
    @ ./loading.jl:2865 [inlined]
 [13] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:326
 [14] _start()
    @ Base ./client.jl:556
in expression starting at /home/jishnu/.julia/packages/Compiler/Hllhj/src/typeinfer.jl:3
in expression starting at /home/jishnu/.julia/packages/Compiler/Hllhj/src/Compiler.jl:3
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile Compiler [807dbc54-b67e-4c79-8afb-eafe4df6f2e1] to "/home/jishnu/.julia/compiled/v1.13/Compiler/jl_e8WewG".u
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base ./loading.jl:3291
  [3] (::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId})()
    @ Base ./loading.jl:2682
  [4] mkpidlock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#7
    @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:114
  [7] apply_gr_kw(::NamedTuple, ::GlobalRef, ::Any, ::Vararg{Any})
    @ Base ./reflection.jl:1280
  [8] #invokelatest_gr#227
    @ ./reflection.jl:1288 [inlined]
  [9] invokelatest_gr
    @ ./reflection.jl:1282 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3862
 [11] maybe_cachefile_lock
    @ ./loading.jl:3859 [inlined]
 [12] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2668
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2493
 [14] macro expansion
    @ ./loading.jl:2421 [inlined]
 [15] macro expansion
    @ ./lock.jl:376 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2386
 [17] #invoke_in_world#2
    @ ./essentials.jl:1092 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:1088 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2366
 [20] top-level scope
    @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:16
 [21] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
 [22] 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::Nothing)
    @ Base ./loading.jl:3004
 [23] top-level scope
    @ stdin:6
 [24] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
 [25] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2855
 [26] include_string
    @ ./loading.jl:2865 [inlined]
 [27] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:326
 [28] _start()
    @ Base ./client.jl:556
in expression starting at /home/jishnu/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:1
in expression starting at stdin:6
  ✗ Compiler
  ✗ Cthulhu
Precompiling Cthulhu finished.
  0 dependencies successfully precompiled in 11 seconds. 19 already precompiled.

ERROR: The following 1 direct dependency failed to precompile:

Cthulhu 

Failed to precompile Cthulhu [f68482b8-f384-11e8-15f7-abe071a5a75f] to "/home/jishnu/.julia/compiled/v1.13/Cthulhu/jl_bfvx56".
ERROR: LoadError: UndefVarError: `Core` not defined in `Compiler.Timings`
Stacktrace:
  [1] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/typeinfer.jl:17
  [2] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
  [3] include(x::String)
    @ Compiler ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:93
  [4] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:178
  [5] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
  [6] top-level scope
    @ ~/.julia/packages/Compiler/Hllhj/src/Compiler.jl:36
  [7] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
  [8] 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:3004
  [9] top-level scope
    @ stdin:6
 [10] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
 [11] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2855
 [12] include_string
    @ ./loading.jl:2865 [inlined]
 [13] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:326
 [14] _start()
    @ Base ./client.jl:556
in expression starting at /home/jishnu/.julia/packages/Compiler/Hllhj/src/typeinfer.jl:3
in expression starting at /home/jishnu/.julia/packages/Compiler/Hllhj/src/Compiler.jl:3
in expression starting at stdin:6
ERROR: LoadError: Failed to precompile Compiler [807dbc54-b67e-4c79-8afb-eafe4df6f2e1] to "/home/jishnu/.julia/compiled/v1.13/Compiler/jl_e8WewG".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64}, loadable_exts::Nothing)
    @ Base ./loading.jl:3291
  [3] (::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId})()
    @ Base ./loading.jl:2682
  [4] mkpidlock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#7
    @ ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-nightly/share/julia/stdlib/v1.13/FileWatching/src/pidfile.jl:114
  [7] apply_gr_kw(::NamedTuple, ::GlobalRef, ::Any, ::Vararg{Any})
    @ Base ./reflection.jl:1280
  [8] #invokelatest_gr#227
    @ ./reflection.jl:1288 [inlined]
  [9] invokelatest_gr
    @ ./reflection.jl:1282 [inlined]
 [10] maybe_cachefile_lock(f::Base.var"#__require_prelocked##0#__require_prelocked##1"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3862
 [11] maybe_cachefile_lock
    @ ./loading.jl:3859 [inlined]
 [12] __require_prelocked(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2668
 [13] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2493
 [14] macro expansion
    @ ./loading.jl:2421 [inlined]
 [15] macro expansion
    @ ./lock.jl:376 [inlined]
 [16] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2386
 [17] #invoke_in_world#2
    @ ./essentials.jl:1092 [inlined]
 [18] invoke_in_world
    @ ./essentials.jl:1088 [inlined]
 [19] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2366
 [20] top-level scope
    @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:16
 [21] include(mod::Module, _path::String)
    @ Base ./Base.jl:307
 [22] 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::Nothing)
    @ Base ./loading.jl:3004
 [23] top-level scope
    @ stdin:6
 [24] eval(m::Module, e::Any)
    @ Core ./boot.jl:488
 [25] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2855
 [26] include_string
    @ ./loading.jl:2865 [inlined]
 [27] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:326
 [28] _start()
    @ Base ./client.jl:556
in expression starting at /home/jishnu/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:1
in expression starting at stdin:
@Keno
Copy link
Member

Keno commented Feb 15, 2025

Just needs a version bump of the compiler compat. You can dev path/to/julia/Compiler in the meantime.

@jishnub
Copy link
Contributor Author

jishnub commented Feb 15, 2025

Thanks, that resolves the issue with precompiling Compiler. I now encounter a different error (seemingly related to the precompile workload):

┌ Error: Errorred while running the precompile workload, the package may or may not work but latency will be long
│   exeption =
│    TypeError: in typeassert, expected Cthulhu.OptimizedSource, got a value of type Core.CodeInfo
│    Stacktrace:
│      [1] IRInterpretationState
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/interpreter.jl:232 [inlined]
│      [2] semi_concrete_eval_call(interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance, result::Compiler.MethodCallResult, arginfo::Compiler.ArgInfo, sv::Compiler.InferenceState)
│        @ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:1275
│      [3] abstract_call_method_with_const_args(interp::Cthulhu.CthulhuInterpreter, result::Compiler.MethodCallResult, f::Any, arginfo::Compiler.ArgInfo, si::Compiler.StmtInfo, match::Core.MethodMatch, sv::Compiler.InferenceState, invokecall::Nothing)
│        @ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:905
│      [4] abstract_call_method_with_const_args
│        @ ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:881 [inlined]
│      [5] (::Compiler.var"#handle1#abstract_call_gf_by_type##1"{Int64, Compiler.Future{Compiler.MethodCallResult}, Int64, Vector{Union{Nothing, Core.CodeInstance}}, Core.MethodMatch, Compiler.ArgInfo, Compiler.StmtInfo, Compiler.CallInferenceState, Vector{Any}, Compiler.var"#tmerge##0#tmerge##1"{Compiler.InferenceLattice{Compiler.ConditionalsLattice{Compiler.PartialsLattice{Compiler.ConstsLattice}}}}, Compiler.var"#tmerge##0#tmerge##1"{Compiler.InferenceLattice{Compiler.InterConditionalsLattice{Compiler.PartialsLattice{Compiler.ConstsLattice}}}}, Compiler.var"#⊑##0#⊑##1"{Compiler.InferenceLattice{Compiler.InterConditionalsLattice{Compiler.PartialsLattice{Compiler.ConstsLattice}}}}, Compiler.InferenceLattice{Compiler.ConditionalsLattice{Compiler.PartialsLattice{Compiler.ConstsLattice}}}, Compiler.InferenceLattice{Compiler.InterConditionalsLattice{Compiler.PartialsLattice{Compiler.ConstsLattice}}}})(interp::Cthulhu.CthulhuInterpreter, sv::Compiler.InferenceState)
│        @ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:178
│      [6] doworkloop(interp::Cthulhu.CthulhuInterpreter, sv::Compiler.InferenceState)
│        @ Compiler ./../usr/share/julia/Compiler/src/inferencestate.jl:1192
│      [7] typeinf(interp::Cthulhu.CthulhuInterpreter, frame::Compiler.InferenceState)
│        @ Compiler ./../usr/share/julia/Compiler/src/abstractinterpretation.jl:4288
│      [8] top-level scope
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:856
│      [9] top-level scope
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:868
│     [10] top-level scope
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:890
│     [11] top-level scope
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:888
│     [12] __descend_with_error_handling(args::Any; terminal::Any, kwargs...)
│        @ Cthulhu ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:275
│     [13] __descend_with_error_handling
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:272 [inlined]
│     [14] #_descend_with_error_handling#80
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:264 [inlined]
│     [15] _descend_with_error_handling
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:256 [inlined]
│     [16] descend
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:318 [inlined]
│     [17] macro expansion
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:972 [inlined]
│     [18] macro expansion
│        @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:78 [inlined]
│     [19] macro expansion
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:971 [inlined]
│     [20] macro expansion
│        @ ~/.julia/packages/PrecompileTools/L8A3n/src/workloads.jl:140 [inlined]
│     [21] top-level scope
│        @ ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:966
│     [22] include(mod::Module, _path::String)
│        @ Base ./Base.jl:307
│     [23] 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::Nothing)
│        @ Base ./loading.jl:3004
│     [24] top-level scope
│        @ stdin:6
│     [25] eval(m::Module, e::Any)
│        @ Core ./boot.jl:488
│     [26] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
│        @ Base ./loading.jl:2855
│     [27] include_string
│        @ ./loading.jl:2865 [inlined]
│     [28] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:326
│     [29] _start()
│        @ Base ./client.jl:556
└ @ Cthulhu ~/.julia/packages/Cthulhu/sgTKv/src/Cthulhu.jl:977

Despite this, precompilation for Cthulhu does seem to finish. However, trying to @descend into a call leads to the same error as above.

@serenity4
Copy link

serenity4 commented Feb 19, 2025

#620 should fix this last error. Then, with Compiler deved or once #619 is merged, it should all work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants