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

"type inference data-flow error" on 0.5 #19272

Closed
iamed2 opened this issue Nov 8, 2016 · 6 comments
Closed

"type inference data-flow error" on 0.5 #19272

iamed2 opened this issue Nov 8, 2016 · 6 comments
Milestone

Comments

@iamed2
Copy link
Contributor

iamed2 commented Nov 8, 2016

This appears to have been caused by #18869

Before:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.1-pre+19 (2016-11-04 07:28 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 1866a0e (4 days old release-0.5)
|__/                   |  x86_64-apple-darwin16.1.0

julia> Pkg.build("Atom")
INFO: Building HttpParser
INFO: Building Homebrew
Already up-to-date.
INFO: Building MbedTLS

julia> using Atom
INFO: Precompiling module Atom.

julia>

After:

               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.1-pre+25 (2016-11-04 07:58 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 8da61fe (4 days old release-0.5)
|__/                   |  x86_64-apple-darwin16.1.0

julia> Pkg.build("Atom")
INFO: Building HttpParser
INFO: Building Homebrew
Already up-to-date.
INFO: Building MbedTLS

julia> using Atom
INFO: Recompiling stale cache file /Users/ericdavies/.julia/lib/v0.5/Atom.ji for module Atom.
WARNING: An error occurred during inference. Type inference is now partially disabled.
ErrorException("type inference data-flow error: tried to double infer a function")
rec_backtrace at /Users/ericdavies/repos/julia0p5/src/stackwalk.c:84
record_backtrace at /Users/ericdavies/repos/julia0p5/src/task.c:232 [inlined]
jl_throw at /Users/ericdavies/repos/julia0p5/src/task.c:550
abstract_eval at ./inference.jl:1186
jlcall_abstract_eval_536 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
abstract_interpret at ./inference.jl:1238
jlcall_abstract_interpret_531 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
typeinf_frame at ./inference.jl:1726
typeinf_loop at ./inference.jl:1672
jlcall_typeinf_loop_235 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
typeinf_edge at ./inference.jl:1592
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
typeinf_ext at ./inference.jl:1616
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
jl_apply at /Users/ericdavies/repos/julia0p5/src/./julia.h:1392 [inlined]
jl_type_infer at /Users/ericdavies/repos/julia0p5/src/gf.c:210
emit_invoke at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:2681 [inlined]
emit_expr at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:3162
emit_condition at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:3029
emit_expr at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:3157
emit_stmtpos at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:3064
emit_function at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:4727
jl_compile_linfo at /Users/ericdavies/repos/julia0p5/src/codegen.cpp:809
jl_compile_for_dispatch at /Users/ericdavies/repos/julia0p5/src/gf.c:1310
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:184 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
mapfoldl_impl at ./reduce.jl:49
unknown function (ip: 0x1104fa64f)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
thread at /Users/ericdavies/.julia/v0.5/Lazy/src/macros.jl:116
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
jl_apply_2va at /Users/ericdavies/repos/julia0p5/src/builtins.c:430
@>> at /Users/ericdavies/.julia/v0.5/Lazy/src/macros.jl:118
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
fl_invoke_julia_macro at /Users/ericdavies/repos/julia0p5/src/ast.c:161
apply_cl at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:1227
_applyn at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:678
fl_map1 at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:2220
apply_cl at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:1177
_applyn at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:678
fl_map1 at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:2220
apply_cl at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:1177
do_trycatch at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:899
apply_cl at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:1807
_applyn at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:678
fl_applyn at /Users/ericdavies/repos/julia0p5/src/flisp/flisp.c:723
jl_parse_eval_all at /Users/ericdavies/repos/julia0p5/src/ast.c:702
jl_load at /Users/ericdavies/repos/julia0p5/src/toplevel.c:596 [inlined]
jl_load_ at /Users/ericdavies/repos/julia0p5/src/toplevel.c:605
include_from_node1 at ./loading.jl:488
jlcall_include_from_node1_20112 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
do_call at /Users/ericdavies/repos/julia0p5/src/interpreter.c:66
eval at /Users/ericdavies/repos/julia0p5/src/interpreter.c:190
jl_toplevel_eval_flex at /Users/ericdavies/repos/julia0p5/src/toplevel.c:558
jl_eval_module_expr at /Users/ericdavies/repos/julia0p5/src/toplevel.c:196
jl_toplevel_eval_flex at /Users/ericdavies/repos/julia0p5/src/toplevel.c:465
jl_parse_eval_all at /Users/ericdavies/repos/julia0p5/src/ast.c:717
jl_load at /Users/ericdavies/repos/julia0p5/src/toplevel.c:596 [inlined]
jl_load_ at /Users/ericdavies/repos/julia0p5/src/toplevel.c:605
include_from_node1 at ./loading.jl:488
jlcall_include_from_node1_20112 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
do_call at /Users/ericdavies/repos/julia0p5/src/interpreter.c:66
eval at /Users/ericdavies/repos/julia0p5/src/interpreter.c:190
jl_toplevel_eval_flex at /Users/ericdavies/repos/julia0p5/src/toplevel.c:558
jl_toplevel_eval_in_warn at /Users/ericdavies/repos/julia0p5/src/builtins.c:590
macro expansion; at ./none:2 [inlined]
anonymous at ./<missing> (unknown line)
unknown function (ip: 0x1104a26b1)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_toplevel_eval_flex at /Users/ericdavies/repos/julia0p5/src/toplevel.c:569
jl_toplevel_eval_in_warn at /Users/ericdavies/repos/julia0p5/src/builtins.c:590
eval at ./boot.jl:234
jlcall_eval_19739 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
process_options at ./client.jl:239
_start at ./client.jl:318
jlcall__start_21459 at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib (unknown line)
jl_call_method_internal at /Users/ericdavies/repos/julia0p5/src/./julia_internal.h:189 [inlined]
jl_apply_generic at /Users/ericdavies/repos/julia0p5/src/gf.c:1942
true_main at /Users/ericdavies/repos/julia0p5/usr/bin/julia (unknown line)
main at /Users/ericdavies/repos/julia0p5/usr/bin/julia (unknown line)
ERROR: LoadError: LoadError: AssertionError: frame.inferred
 in typeinf_ext(::LambdaInfo) at ./inference.jl:1645
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval(::Module, ::Any) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318
 in _start() at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
while loading /Users/ericdavies/.julia/v0.5/CodeTools/src/completions.jl, in expression starting on line 54
while loading /Users/ericdavies/.julia/v0.5/CodeTools/src/CodeTools.jl, in expression starting on line 11
ERROR: LoadError: LoadError: Failed to precompile CodeTools to /Users/ericdavies/.julia/lib/v0.5/CodeTools.ji.
 in compilecache(::String) at ./loading.jl:593
 in require(::Symbol) at ./loading.jl:393
 in require(::Symbol) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in macro expansion; at ./none:2 [inlined]
 in anonymous at ./<missing>:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval(::Module, ::Any) at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
 in process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318
 in _start() at /Users/ericdavies/repos/julia0p5/usr/lib/julia/sys.dylib:?
while loading /Users/ericdavies/.julia/v0.5/Atom/src/eval.jl, in expression starting on line 1
while loading /Users/ericdavies/.julia/v0.5/Atom/src/Atom.jl, in expression starting on line 11
------ ErrorException ------------------ Stacktrace (most recent call last)

 [1] — require(::Symbol) at sys.dylib:?

 [2] — require(::Symbol) at loading.jl:393

 [3] — compilecache(::String) at loading.jl:593

Failed to precompile Atom to /Users/ericdavies/.julia/lib/v0.5/Atom.ji.

This currently prevents Juno from functioning on the release-0.5 branch.

@tkelman
Copy link
Contributor

tkelman commented Nov 9, 2016

Thanks for the report. I bisected this to ed7002e, which did not have a test case and fixed a hypothetical bug in exchange for causing a real one here. Unless there's a different commit from master that gets Atom working again when backported to release-0.5 (I'll check whether it's working on the branch I'm about to post) then I'll likely revert that.

@tkelman tkelman added this to the 0.5.x milestone Nov 9, 2016
@vtjnash
Copy link
Member

vtjnash commented Nov 9, 2016

Unrelated to this bug, although it causes other issues, Atom is declaring __precompile__, but it uses CodeTools which does not. Our early detection of this package bug is still currently very poor :(

@aviks
Copy link
Member

aviks commented Nov 9, 2016

@MikeInnes you may want to address this ^^

@MikeInnes
Copy link
Member

MikeInnes commented Nov 9, 2016

The __precompile__ thing is a useful tip – hopefully that's what was causing the intermittent Juno.jl pre compilation failures.

@fredrikekre
Copy link
Member

This seems to be fixed?

@KristofferC
Copy link
Member

KristofferC commented May 24, 2017

Yeah, please comment if you feel it should be reopened.

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

7 participants