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

Infinite recursion in type intersection #30741

Closed
jagot opened this issue Jan 17, 2019 · 6 comments
Closed

Infinite recursion in type intersection #30741

jagot opened this issue Jan 17, 2019 · 6 comments
Assignees
Labels
domain:types and dispatch Types, subtyping and method dispatch

Comments

@jagot
Copy link
Contributor

jagot commented Jan 17, 2019

This occurs on nightly since at least e51a707, but not v1.0.3. Apologies for not having a MWE, when trying to run @code_typed or @code_warntype on the last line that triggers the error, I get a StackOverflowError.

When I run the following code

using Pkg
Pkg.activate(".")

pkg"add https://github.com/JuliaAtoms/AtomicLevels.jl.git#revamp"
pkg"add https://github.com/MasonProtter/Symbolics.jl.git"
pkg"add https://github.com/jagot/AngularMomentumAlgebra.jl.git"
pkg"add https://github.com/JuliaApproximation/ContinuumArrays.jl.git"
pkg"add https://github.com/jagot/FiniteDifferencesQuasi.jl.git"
pkg"add https://github.com/jagot/SolverTraces.jl.git"
pkg"add https://github.com/jagot/SCF.jl.git"
pkg"add https://github.com/JuliaAtoms/Atoms.jl.git"

using AtomicLevels
using FiniteDifferencesQuasi

using Atoms
using SCF

rₘₐₓ = 300

nucleus = pc"He"
Z = Atoms.charge(nucleus)
ρ = 0.25
N = ceil(Int, rₘₐₓ/ρ + 1/2)
R=RadialDifferences(N, ρ, Z)

csf = CSF(c"1s2", [IntermediateTerm(T"1S", 0)], [T"1S"])
Atom(R, [csf], nucleus)

the last line triggers an infinite recursion in subtype.c, which breaks at some point, and then the code continues as nothing happened. On second run in the same Julia instance, the infinite recursion does not occur.

Internal error: encountered unexpected error in runtime:
StackOverflowError()
intersect at /buildworker/worker/package_linux64/build/src/subtype.c:1991
intersect_union at /buildworker/worker/package_linux64/build/src/subtype.c:1348
intersect at /buildworker/worker/package_linux64/build/src/subtype.c:2091
intersect_all at /buildworker/worker/package_linux64/build/src/subtype.c:2217
intersect_aside at /buildworker/worker/package_linux64/build/src/subtype.c:1326 [inlined]
intersect_var at /buildworker/worker/package_linux64/build/src/subtype.c:1464
intersect at /buildworker/worker/package_linux64/build/src/subtype.c:2075
intersect_union at /buildworker/worker/package_linux64/build/src/subtype.c:1348
intersect at /buildworker/worker/package_linux64/build/src/subtype.c:2091
intersect_all at /buildworker/worker/package_linux64/build/src/subtype.c:2232
intersect_aside at /buildworker/worker/package_linux64/build/src/subtype.c:1326 [inlined]
...
intersect_unionall at /buildworker/worker/package_linux64/build/src/subtype.c:1724
intersect at /buildworker/worker/package_linux64/build/src/subtype.c:2127
intersect_all at /buildworker/worker/package_linux64/build/src/subtype.c:2217
jl_type_intersection_env_s at /buildworker/worker/package_linux64/build/src/subtype.c:2385
jl_typemap_intersection_node_visitor at /buildworker/worker/package_linux64/build/src/typemap.c:479
ml_matches at /buildworker/worker/package_linux64/build/src/gf.c:2612
jl_matching_methods at /buildworker/worker/package_linux64/build/src/gf.c:1815
_methods_by_ftype at ./reflection.jl:790 [inlined]
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:49
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1127
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_eval_call at ./compiler/abstractinterpretation.jl:809
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_eval_call at ./compiler/abstractinterpretation.jl:809
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_edge at ./compiler/typeinfer.jl:497
abstract_call_method at ./compiler/abstractinterpretation.jl:345
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:85
abstract_call at ./compiler/abstractinterpretation.jl:782
abstract_eval_call at ./compiler/abstractinterpretation.jl:811
abstract_eval at ./compiler/abstractinterpretation.jl:896
typeinf_local at ./compiler/abstractinterpretation.jl:1141
typeinf_nocycle at ./compiler/abstractinterpretation.jl:1197
typeinf at ./compiler/typeinfer.jl:14
typeinf_ext at ./compiler/typeinfer.jl:576
typeinf_ext at ./compiler/typeinfer.jl:613
jfptr_typeinf_ext_1.clone_1 at /home/jagot/prog/julia-ec807bc01c/lib/julia/sys.so (unknown line)
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1577 [inlined]
jl_type_infer at /buildworker/worker/package_linux64/build/src/gf.c:277
jl_compile_method_internal at /buildworker/worker/package_linux64/build/src/gf.c:1869 [inlined]
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1913
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
Type at /home/jagot/.julia/packages/Atoms/nXxKC/src/atom_types.jl:92
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
#Atom#8 at /home/jagot/.julia/packages/Atoms/nXxKC/src/atom_types.jl:102
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
Type at /home/jagot/.julia/packages/Atoms/nXxKC/src/atom_types.jl:102
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
#Atom#10 at /home/jagot/.julia/packages/Atoms/nXxKC/src/atom_types.jl:107
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
Type at /home/jagot/.julia/packages/Atoms/nXxKC/src/atom_types.jl:107
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
Interpreter frame (ip: 1)
Core.CodeInfo(code=Array{Any, (3,)}[
  Expr(:call, Base.vect, :csf),
  Expr(:call, :Atom, :R, SSAValue(1), :nucleus),
  Expr(:return, SSAValue(2))], codelocs=Array{Int32, (3,)}[1, 1, 1], method_for_inference_limit_heuristics=nothing, ssavaluetypes=3, linetable=Array{Any, (1,)}[Core.LineInfoNode(mod=Main, method=Symbol("top-level scope"), file=Symbol("/tmp/intersect-bug/atom-intersect-bug.jl"), line=28, inlined_at=0)], ssaflags=Array{UInt8, (0,)}[], slotflags=Array{UInt8, (0,)}[], slotnames=Array{Any, (0,)}[], inferred=false, inlineable=false, propagate_inbounds=false, pure=false)jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:770
jl_parse_eval_all at /buildworker/worker/package_linux64/build/src/ast.c:869
jl_load at /buildworker/worker/package_linux64/build/src/toplevel.c:832
include at ./boot.jl:326 [inlined]
include_relative at ./loading.jl:1038
include at ./sysimg.jl:29
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
include at ./client.jl:418
jl_fptr_trampoline at /buildworker/worker/package_linux64/build/src/gf.c:1914
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
do_call at /buildworker/worker/package_linux64/build/src/interpreter.c:323
eval_value at /buildworker/worker/package_linux64/build/src/interpreter.c:411
eval_stmt_value at /buildworker/worker/package_linux64/build/src/interpreter.c:362 [inlined]
eval_body at /buildworker/worker/package_linux64/build/src/interpreter.c:773
jl_interpret_toplevel_thunk_callback at /buildworker/worker/package_linux64/build/src/interpreter.c:885
Interpreter frame (ip: 0)
Core.CodeInfo(code=Array{Any, (2,)}[
  Expr(:call, :include, "atom-intersect-bug.jl"),
  Expr(:return, SSAValue(1))], codelocs=Array{Int32, (2,)}[1, 1], method_for_inference_limit_heuristics=nothing, ssavaluetypes=2, linetable=Array{Any, (1,)}[Core.LineInfoNode(mod=Main, method=Symbol("top-level scope"), file=Symbol("REPL[1]"), line=1, inlined_at=0)], ssaflags=Array{UInt8, (0,)}[], slotflags=Array{UInt8, (0,)}[], slotnames=Array{Any, (0,)}[], inferred=false, inlineable=false, propagate_inbounds=false, pure=false)jl_interpret_toplevel_thunk at /buildworker/worker/package_linux64/build/src/interpreter.c:894
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:770
jl_toplevel_eval_flex at /buildworker/worker/package_linux64/build/src/toplevel.c:719
jl_toplevel_eval_in at /buildworker/worker/package_linux64/build/src/toplevel.c:799
eval at ./boot.jl:328
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
eval_user_input at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:85
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.2/REPL/src/REPL.jl:117 [inlined]
#26 at ./task.jl:259
jl_apply_generic at /buildworker/worker/package_linux64/build/src/gf.c:2269
jl_apply at /buildworker/worker/package_linux64/build/src/julia.h:1577 [inlined]
start_task at /buildworker/worker/package_linux64/build/src/task.c:572
unknown function (ip: 0xffffffffffffffff)
Atom{Float64,RadialDifferences{Float64,Int64}}(Z = 2 [He]; 2 e⁻ ⇒ Q = 0) with 1 CSF: 1s²(₀¹S|¹S)+

Similar symptoms, not sure if related: #21696, #24254, #24942.

I will try to do a bisect.

@jagot
Copy link
Contributor Author

jagot commented Jan 19, 2019

I've done the bisect and ended up with the following result:

4f8a7b965a98c307f48820c35ca98f9d754096a9 is the first bad commit
commit 4f8a7b965a98c307f48820c35ca98f9d754096a9
Author: Jeff Bezanson <jeff.bezanson@gmail.com>
Date:   Tue Nov 27 18:21:45 2018 -0500

    fix #29269, type intersection bug in union parameters with typevars (#29406)

    also fixes #25752

:040000 040000 b1f832d69f1956ace21c80b16a9454018d3ecf64 c4f75022d23f370cfe74ea53804947127d5910dd M	base
:040000 040000 e4235c035d61fea94acad9c1e6bd11786ad2318d 64be2bc2b925b0bb46358fc374cc9cb9266ae039 M	src
:040000 040000 793ecef8f8408b9c4c6293485ab1e030ea4a3ef1 c19fe4c1fee628c6d3c95caf7896f4bb3cddde26 M	stdlib
:040000 040000 eb31bcb1c2f477be892ae5cc3a13374d34c2b754 50b3d4ad8b2ec576201f58973efb5f927bdda5d5 M	test

@jagot
Copy link
Contributor Author

jagot commented Feb 2, 2019

I am still unable to produce a MWE, but I've managed to track down which line in my code that triggers the bug: https://github.com/JuliaAtoms/Atoms.jl/blob/02061421e7596b7e6c0aacc799835adb3d02408c/src/hydrogenic.jl#L97
Commenting out that line and the following one, avoids the bug altogether.

@grahamas
Copy link
Contributor

grahamas commented Feb 13, 2019

I have what I think is a MWE for this error:

fn(a::T, b::T, c::T) where T = "hello"
fn(a::AbstractArray{T}, b::T, c::T) where T = "hello"
fn(a::T, b::AbstractArray{T}, c::T) where T = "hello"

Fewer than 3 arguments in the function fails to produce the error. Any abstract type parameterized by T seems to produce the error. I can provide my backtrace if it's useful for comparison, but it's just lots and lots of calls to intersect[_something].

edit: This error does appear in v1.0.3 (through current master), so it's probably a different bug? Just the same symptoms of infinite recursion in type intersection.

e̶d̶i̶t̶ ̶e̶d̶i̶t̶:̶ ̶I̶n̶ ̶t̶r̶y̶i̶n̶g̶ ̶t̶o̶ ̶s̶n̶e̶a̶k̶ ̶a̶r̶o̶u̶n̶d̶ ̶t̶h̶i̶s̶ ̶e̶r̶r̶o̶r̶,̶ ̶I̶'̶v̶e̶ ̶f̶o̶u̶n̶d̶ ̶t̶h̶a̶t̶ ̶i̶t̶ ̶o̶c̶c̶u̶r̶s̶ ̶p̶r̶e̶c̶i̶s̶e̶l̶y̶ ̶w̶h̶e̶n̶ ̶b̶o̶t̶h̶ ̶̶f̶n̶(̶a̶:̶:̶A̶b̶s̶t̶r̶a̶c̶t̶A̶r̶r̶a̶y̶{̶T̶}̶,̶ ̶b̶:̶:̶T̶,̶ ̶c̶:̶:̶T̶)̶̶ ̶a̶n̶d̶ ̶̶f̶n̶(̶a̶:̶:̶T̶,̶ ̶b̶:̶:̶A̶b̶s̶t̶r̶a̶c̶t̶A̶r̶r̶a̶y̶{̶T̶}̶,̶ ̶c̶:̶:̶T̶)̶̶ ̶a̶r̶e̶ ̶d̶e̶f̶i̶n̶e̶d̶.̶ ̶ ̶C̶r̶i̶t̶i̶c̶a̶l̶l̶y̶ ̶t̶h̶e̶ ̶o̶n̶l̶y̶ ̶a̶b̶s̶t̶r̶a̶c̶t̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶i̶s̶ ̶e̶i̶t̶h̶e̶r̶ ̶t̶h̶e̶ ̶f̶i̶r̶s̶t̶ ̶o̶r̶ ̶s̶e̶c̶o̶n̶d̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶,̶ ̶a̶n̶d̶ ̶t̶h̶e̶ ̶e̶r̶r̶o̶r̶ ̶o̶c̶c̶u̶r̶s̶ ̶w̶h̶e̶n̶ ̶b̶o̶t̶h̶ ̶p̶o̶s̶s̶i̶b̶i̶l̶i̶t̶i̶e̶s̶ ̶(̶o̶n̶l̶y̶ ̶a̶b̶s̶t̶r̶a̶c̶t̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶i̶s̶ ̶f̶i̶r̶s̶t̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶,̶ ̶s̶u̶b̶s̶e̶q̶u̶e̶n̶t̶l̶y̶ ̶o̶n̶l̶y̶ ̶a̶b̶s̶t̶r̶a̶c̶t̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶i̶s̶ ̶s̶e̶c̶o̶n̶d̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶)̶ ̶h̶a̶v̶e̶ ̶b̶e̶e̶n̶ ̶d̶e̶f̶i̶n̶e̶d̶,̶ ̶i̶n̶ ̶e̶i̶t̶h̶e̶r̶ ̶o̶r̶d̶e̶r̶.̶ ̶ ̶A̶l̶l̶ ̶o̶t̶h̶e̶r̶ ̶p̶e̶r̶m̶u̶t̶a̶t̶i̶o̶n̶s̶ ̶o̶f̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶t̶y̶p̶e̶s̶ ̶t̶h̶a̶t̶ ̶I̶ ̶h̶a̶v̶e̶ ̶t̶r̶i̶e̶d̶ ̶d̶o̶ ̶n̶o̶t̶ ̶p̶r̶o̶d̶u̶c̶e̶ ̶t̶h̶e̶ ̶e̶r̶r̶o̶r̶,̶ ̶n̶o̶r̶ ̶d̶o̶ ̶t̶h̶e̶y̶ ̶p̶r̶e̶v̶e̶n̶t̶ ̶t̶h̶e̶ ̶e̶r̶r̶o̶r̶ ̶f̶r̶o̶m̶ ̶h̶a̶p̶p̶e̶n̶i̶n̶g̶ ̶w̶h̶e̶n̶ ̶b̶o̶t̶h̶ ̶o̶f̶ ̶t̶h̶e̶ ̶n̶e̶c̶e̶s̶s̶a̶r̶y̶ ̶m̶e̶t̶h̶o̶d̶s̶ ̶a̶r̶e̶ ̶f̶i̶n̶a̶l̶l̶y̶ ̶d̶e̶f̶i̶n̶e̶d̶.̶

e̶d̶i̶t̶ ̶3̶:̶ ̶i̶t̶'̶s̶ ̶m̶o̶r̶e̶ ̶c̶o̶m̶p̶l̶i̶c̶a̶t̶e̶d̶ ̶t̶h̶a̶n̶ ̶t̶h̶a̶t̶.̶ ̶ ̶M̶y̶ ̶n̶e̶w̶e̶r̶ ̶t̶e̶n̶t̶a̶t̶i̶v̶e̶ ̶h̶y̶p̶o̶t̶h̶e̶s̶i̶s̶ ̶i̶s̶ ̶t̶h̶a̶t̶ ̶a̶ ̶m̶e̶t̶h̶o̶d̶ ̶d̶e̶f̶i̶n̶i̶t̶i̶o̶n̶ ̶w̶h̶e̶r̶e̶ ̶t̶h̶e̶ ̶f̶i̶n̶a̶l̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶ ̶i̶s̶ ̶a̶b̶s̶t̶r̶a̶c̶t̶ ̶w̶i̶l̶l̶ ̶n̶o̶t̶ ̶p̶r̶o̶d̶u̶c̶e̶ ̶t̶h̶e̶ ̶e̶r̶r̶o̶r̶.̶ ̶(̶I̶ ̶n̶e̶e̶d̶e̶d̶ ̶t̶o̶ ̶g̶o̶ ̶u̶p̶ ̶t̶o̶ ̶4̶ ̶a̶r̶g̶u̶m̶e̶n̶t̶s̶ ̶t̶o̶ ̶n̶o̶t̶i̶c̶e̶ ̶t̶h̶i̶s̶ ̶p̶a̶t̶t̶e̶r̶n̶.̶)̶

final edit: I have no idea what the rule is to make the method definition error.

@JeffBezanson JeffBezanson self-assigned this Feb 13, 2019
@JeffBezanson JeffBezanson added the domain:types and dispatch Types, subtyping and method dispatch label Feb 15, 2019
@jagot
Copy link
Contributor Author

jagot commented Feb 22, 2019

FYI, I've simplified my types so I no longer hit this problem in Atoms.jl. It's easy enough, however, to go back in time an create a Manifest.toml that will recreate the whole situation. Last failed build (for this reason) was https://travis-ci.org/JuliaAtoms/Atoms.jl/builds/487851549 Now I have new exciting failures!: #31115

@JeffBezanson
Copy link
Sponsor Member

The MWE above (with the 3 method fn) causes a stack overflow in 0.6 as well, so the implicated commit couldn't have caused it. So I think it's a separate issue.

@jagot
Copy link
Contributor Author

jagot commented Feb 24, 2019

I've created a gist that you can instantiate to reproduce the error consistently; tested on my Mac laptop and Linux desktop, both running Julia v1.1.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:types and dispatch Types, subtyping and method dispatch
Projects
None yet
Development

No branches or pull requests

3 participants