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

Add another workaround for #184 #187

Merged
merged 1 commit into from
Aug 1, 2021
Merged

Conversation

timholy
Copy link
Member

@timholy timholy commented Aug 1, 2021

See discussion in #185. CC @ChrisRackauckas. Does this work? I can't reproduce the issue locally so I'm not actually certain what will happen for this nothing return.

@codecov-commenter
Copy link

codecov-commenter commented Aug 1, 2021

Codecov Report

Merging #187 (1260874) into master (18e558f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #187   +/-   ##
=======================================
  Coverage   52.96%   52.96%           
=======================================
  Files           7        7           
  Lines         895      895           
=======================================
  Hits          474      474           
  Misses        421      421           
Impacted Files Coverage Δ
src/backedges.jl 95.18% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 18e558f...1260874. Read the comment docs.

@ChrisRackauckas
Copy link
Contributor

julia> itrig = itrigs[12]
Inference triggered to call OrdinaryDiffEq.perform_step!(::OrdinaryDiffEq.ODEIntegrator{Tsit5, true, Vector{Float64}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryMinHeap{Float64}, DataStructures.BinaryMinHeap{Float64}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, ::Bool) called from toplevel

julia> ascend(itrig)
ERROR: MethodError: Cannot `convert` an object of type
  Cthulhu.Data{Nothing} to an object of type
  Cthulhu.Data{Core.MethodInstance}
Closest candidates are:
  convert(::Type{T}, ::T) where T at essentials.jl:218
  Cthulhu.Data{T}(::Any, ::Any) where T at C:\Users\accou\.julia\packages\Cthulhu\mxXer\src\backedges.jl:111
Stacktrace:
 [1] FoldingTrees.Node{Cthulhu.Data{Core.MethodInstance}}(data::Cthulhu.Data{Nothing}, parent::FoldingTrees.Node{Cthulhu.Data{Core.MethodInstance}}, foldchildren::Bool)
   @ FoldingTrees C:\Users\accou\.julia\packages\FoldingTrees\ugpju\src\foldingtree.jl:25
 [2] FoldingTrees.Node(data::Cthulhu.Data{Nothing}, parent::FoldingTrees.Node{Cthulhu.Data{Core.MethodInstance}}, foldchildren::Bool) (repeats 2 times)
   @ FoldingTrees C:\Users\accou\.julia\packages\FoldingTrees\ugpju\src\foldingtree.jl:32
 [3] treelist!(parent::FoldingTrees.Node{Cthulhu.Data{Core.MethodInstance}}, io::IOBuffer, mi::InferenceTrigger, indent::String, visited::Base.IdSet{Core.MethodInstance})
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\mxXer\src\backedges.jl:126
 [4] treelist(mi::InferenceTrigger)
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\mxXer\src\backedges.jl:118
 [5] ascend(mi::InferenceTrigger; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\mxXer\src\Cthulhu.jl:414
 [6] ascend(mi::InferenceTrigger)
   @ Cthulhu C:\Users\accou\.julia\packages\Cthulhu\mxXer\src\Cthulhu.jl:414
 [7] top-level scope
   @ REPL[13]:1

(@v1.7) pkg> st
      Status `C:\Users\accou\.julia\environments\v1.7\Project.toml`
  [c52e3926] Atom v0.12.33
  [6e4b80f9] BenchmarkTools v1.1.1
  [f68482b8] Cthulhu v2.1.2 `https://github.com/JuliaDebug/Cthulhu.jl.git#teh/truncated_stacktraces`
  [2b5f629d] DiffEqBase v6.70.0 `https://github.com/SciML/DiffEqBase.jl.git#cthulhu`
  [e5e0dc1b] Juno v0.8.4
  [1dea7af3] OrdinaryDiffEq v5.60.2 `https://github.com/SciML/OrdinaryDiffEq.jl.git#cthulhu`
  [4722fa14] PkgAuthentication v1.1.1
  [aa65fe97] SnoopCompile v2.7.0 `https://github.com/timholy/SnoopCompile.jl.git#master`

Since it reproduces on my laptop, I think the easiest way to this may be to just hand a Windows computer to someone haha.

@timholy
Copy link
Member Author

timholy commented Aug 1, 2021

Excellent. What if instead of instance returning nothing it returns Core.Compiler.Timings.ROOTmi?

@ChrisRackauckas
Copy link
Contributor

Success!

julia> itrig = itrigs[12]
Inference triggered to call OrdinaryDiffEq.perform_step!(::OrdinaryDiffEq.ODEIntegrator{Tsit5, true, Vector{Float64}, Nothing, Float64, SciMLBase.NullParameters, Float64, Float64, Float64, Float64, Vector{Vector{Float64}}, ODESolution{Float64, 2, Vector{Vector{Float64}}, Nothing, Nothing, Vector{Float64}, Vector{Vector{Vector{Float64}}}, ODEProblem{Vector{Float64}, Tuple{Float64, Float64}, true, SciMLBase.NullParameters, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}}, SciMLBase.StandardODEProblem}, Tsit5, OrdinaryDiffEq.InterpolationData{ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, Vector{Vector{Float64}}, Vector{Float64}, Vector{Vector{Vector{Float64}}}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}}, DiffEqBase.DEStats}, ODEFunction{true, typeof(OrdinaryDiffEq.lorenz), LinearAlgebra.UniformScaling{Bool}, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, typeof(SciMLBase.DEFAULT_OBSERVED), Nothing}, OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, OrdinaryDiffEq.DEOptions{Float64, Float64, Float64, Float64, PIController{Rational{Int64}}, typeof(DiffEqBase.ODE_DEFAULT_NORM), typeof(LinearAlgebra.opnorm), Nothing, CallbackSet{Tuple{}, Tuple{}}, typeof(DiffEqBase.ODE_DEFAULT_ISOUTOFDOMAIN), typeof(DiffEqBase.ODE_DEFAULT_PROG_MESSAGE), typeof(DiffEqBase.ODE_DEFAULT_UNSTABLE_CHECK), DataStructures.BinaryMinHeap{Float64}, DataStructures.BinaryMinHeap{Float64}, Nothing, Nothing, Int64, Tuple{}, Tuple{}, Tuple{}}, Vector{Float64}, Float64, Nothing, OrdinaryDiffEq.DefaultInit}, ::OrdinaryDiffEq.Tsit5Cache{Vector{Float64}, Vector{Float64}, Vector{Float64}, OrdinaryDiffEq.Tsit5ConstantCache{Float64, Float64}}, ::Bool) called from toplevel

julia> ascend(itrig)
Choose a call for analysis (q to quit):
 >   perform_step!(::OrdinaryDiffEq.ODEIntegrator{Tsit5, true, Vector{Float64}, Nothing, Float64, SciMLBase.NullParamete

See discussion in #185

Co-authored-by: Chris Rackauckas <[email protected]>
@timholy timholy force-pushed the teh/truncated_stacktraces branch from 5bb580f to 1260874 Compare August 1, 2021 14:40
@timholy timholy merged commit 571a905 into master Aug 1, 2021
@timholy timholy deleted the teh/truncated_stacktraces branch August 1, 2021 14:44
@timholy
Copy link
Member Author

timholy commented Aug 1, 2021

Excellent, thanks for your contribution to Cthulhu!

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

Successfully merging this pull request may close these issues.

3 participants