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

What does "The applicable method may be too new" mean? #157

Closed
Darksonn opened this issue Apr 13, 2021 · 4 comments
Closed

What does "The applicable method may be too new" mean? #157

Darksonn opened this issue Apr 13, 2021 · 4 comments

Comments

@Darksonn
Copy link

When I run JET on my project, it failed with the following. It doesn't point to anywhere in my codebase, so it's unclear what has gone wrong.

ERROR: MethodError: no method matching namemap(::Type{MathOptInterface.ActivationCondition})
The applicable method may be too new: running in world age 29620, while current world is 29981.
Closest candidates are:
  namemap(::Type{MathOptInterface.ActivationCondition}) at Enums.jl:195 (method too new to be called from this world context.)
  namemap(::Type{MathOptInterface.FileFormats.MPS.Sense}) at Enums.jl:195 (method too new to be called from this world context.)
  namemap(::Type{Pkg.Types.PreserveLevel}) at Enums.jl:195
  ...
Stacktrace:
  [1] Symbol(x::MathOptInterface.ActivationCondition)
    @ Base.Enums ./Enums.jl:26
  [2] show(io::IOContext{IOBuffer}, x::MathOptInterface.ActivationCondition)
    @ Base.Enums ./Enums.jl:31
  [3] sprint(f::Function, args::Type; context::IOBuffer, sizehint::Int64)
    @ Base ./strings/io.jl:103
  [4] print_type_stacktrace(io::IOBuffer, type::Type; color::Symbol)
    @ Base ./show.jl:2262
  [5] print_type_stacktrace(io::IOBuffer, type::Type)
    @ Base ./show.jl:2262
  [6] show_tuple_as_call(io::IOBuffer, name::Symbol, sig::Type, demangle::Bool, kwargs::Nothing, argnames::Nothing, qualified::Bool)
    @ Base ./show.jl:2243
  [7] sprint(::Function, ::Symbol, ::Vararg{Any, N} where N; context::Nothing, sizehint::Int64)
    @ Base ./strings/io.jl:105
  [8] sprint
    @ ./strings/io.jl:101 [inlined]
  [9] get_sig
    @ ~/.julia/packages/JET/4GIWe/src/reports.jl:325 [inlined]
 [10] get_virtual_frame(interp::JET.JETInterpreter, loc::Core.MethodInstance)
    @ JET ~/.julia/packages/JET/4GIWe/src/reports.jl:291
 [11] UncaughtExceptionReport
    @ ~/.julia/packages/JET/4GIWe/src/reports.jl:168 [inlined]
 [12] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:154
 [13] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:209
 [14] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:30
 [15] typeinf_edge(interp::JET.JETInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:806
 [16] abstract_call_method(interp::JET.JETInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:490
 [17] abstract_call_method
    @ ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:240 [inlined]
 [18] abstract_call_gf_by_type(interp::JET.JETInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ~/.julia/packages/JET/4GIWe/src/legacy/abstractinterpretation:158
 [19] abstract_call_known(interp::JET.JETInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1033
 [20] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1056
 [21] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1040
 [22] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1167
 [23] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:416
 [24] typeinf_local(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1462
 [25] typeinf_nocycle(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1520
 [26] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:214
 [27] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:96
 [28] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:209
 [29] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:30
 [30] typeinf_edge(interp::JET.JETInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:806
 [31] abstract_call_method(interp::JET.JETInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:490
 [32] abstract_call_method
    @ ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:240 [inlined]
 [33] abstract_call_gf_by_type(interp::JET.JETInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ~/.julia/packages/JET/4GIWe/src/legacy/abstractinterpretation:158
 [34] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1054
 [35] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1040
 [36] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1167
 [37] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:416
 [38] typeinf_local(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1462
 [39] typeinf_nocycle(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1520
 [40] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:214
 [41] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:96
 [42] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:209
 [43] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:30
 [44] typeinf_edge(interp::JET.JETInterpreter, method::Method, atypes::Any, sparams::Core.SimpleVector, caller::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:806
 [45] abstract_call_method(interp::JET.JETInterpreter, method::Method, sig::Any, sparams::Core.SimpleVector, hardlimit::Bool, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:490
 [46] abstract_call_method
    @ ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:240 [inlined]
 [47] abstract_call_gf_by_type(interp::JET.JETInterpreter, f::Any, argtypes::Vector{Any}, atype::Any, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ~/.julia/packages/JET/4GIWe/src/legacy/abstractinterpretation:158
 [48] abstract_call_known(interp::JET.JETInterpreter, f::Any, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1033
 [49] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState, max_methods::Int64)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1056
--- the last 15 lines are repeated 2 more times ---
 [80] abstract_call(interp::JET.JETInterpreter, fargs::Vector{Any}, argtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1040
 [81] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1167
 [82] abstract_eval_statement(interp::JET.JETInterpreter, e::Any, vtypes::Vector{Any}, sv::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/abstractinterpretation.jl:416
 [83] typeinf_local(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1462
 [84] typeinf_nocycle(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/abstractinterpretation.jl:1520
 [85] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:214
 [86] _typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:96
 [87] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ Core.Compiler ./compiler/typeinfer.jl:209
 [88] typeinf(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/typeinfer.jl:30
 [89] analyze_frame!(interp::JET.JETInterpreter, frame::Core.Compiler.InferenceState)
    @ JET ~/.julia/packages/JET/4GIWe/src/JET.jl:738
 [90] analyze_method_signature!(interp::JET.JETInterpreter, m::Method, atype::Any, sparams::Core.SimpleVector)
    @ JET ~/.julia/packages/JET/4GIWe/src/JET.jl:734
 [91] analyze_from_definitions!(interp::JET.JETInterpreter, res::NamedTuple{(:included_files, :toplevel_error_reports, :inference_error_reports, :toplevel_signatures, :actual2virtual), Tuple{Set{String}, Vector{JET.ToplevelErrorReport}, Vector{JET.InferenceErrorReport}, Vector{Type}, Pair{Module, Module}}})
    @ JET ~/.julia/packages/JET/4GIWe/src/virtualprocess.jl:234
 [92] virtual_process(x::String, filename::String, actualmod::Module, interp::JET.JETInterpreter, config::JET.ToplevelConfig, virtualmod::Module)
    @ JET ~/.julia/packages/JET/4GIWe/src/virtualprocess.jl:212
 [93] #analyze_text#103
    @ ~/.julia/packages/JET/4GIWe/src/JET.jl:618 [inlined]
 [94] analyze_file(filename::String, args::Module; jetconfigs::Base.Iterators.Pairs{Symbol, Any, Tuple{Symbol, Symbol}, NamedTuple{(:toplevel_logger, :analyze_from_definitions), Tuple{IOContext{Base.TTY}, Bool}}})
    @ JET ~/.julia/packages/JET/4GIWe/src/JET.jl:509
 [95] #report_file#96
    @ ~/.julia/packages/JET/4GIWe/src/JET.jl:493 [inlined]
 [96] report_file(args::String; jetconfigs::Base.Iterators.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:analyze_from_definitions,), Tuple{Bool}}})
    @ JET ~/.julia/packages/JET/4GIWe/src/JET.jl:496
@aviatesk
Copy link
Owner

Sounds like a bug within a JET. Can you share your script to reproduce this error ?

@Darksonn
Copy link
Author

It's a rather large project. If you have a gitlab account, I can give you access to it so you can try it yourself.

@aviatesk
Copy link
Owner

Is that a private project ? This issue probably relates to JET's concretization strategy, and it's hard to debug it just with the stacktrace.

@Darksonn
Copy link
Author

Yeah, the repo is private.

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

2 participants