Skip to content
This repository has been archived by the owner on Feb 13, 2024. It is now read-only.

ERROR: error compiling rec_backtrace_hook #176

Open
josefsachsconning opened this issue Nov 16, 2016 · 1 comment
Open

ERROR: error compiling rec_backtrace_hook #176

josefsachsconning opened this issue Nov 16, 2016 · 1 comment

Comments

@josefsachsconning
Copy link
Collaborator

In Julia 0.5.1-pre+27

AWS-Sachs-Ubuntu$ cat /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl
function myfunction1(x)
    return "monadic"
end

function myfunction1(x, y)
    text = "alpha"
    z = myfunction2(x + y)
    return z
end

function myfunction2(a)
    r = a * 10
end
AWS-Sachs-Ubuntu$ ~/src/julia-release-0.5/usr/bin/julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.1-pre+27 (2016-11-04 08:41 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 25f7066 (12 days old release-0.5)
|__/                   |  x86_64-linux-gnu

julia> using Gallium
INFO: Recompiling stale cache file /home/sachs/.julia/lib/v0.5/Gallium.ji for module Gallium.
WARNING: could not import StructIO.pack into COFF

julia> include("/home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl") myfunction2 (generic function with 1 method)

julia> bp = Gallium.breakpoint(myfunction1, Tuple{Int64,Int64})                 Locations (+: active, -: inactive, *: source):
 + myfunction1(x::Int64, y::Int64) at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:6


julia> myfunction1(2,3)                                                         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 /home/sachs/src/julia-release-0.5/src/stackwalk.c:84
record_backtrace at /home/sachs/src/julia-release-0.5/src/task.c:232
jl_throw at /home/sachs/src/julia-release-0.5/src/task.c:550
abstract_eval at ./inference.jl:1186
unknown function (ip: 0x7fcb6ab6be96)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
typeinf_frame at ./inference.jl:1781
typeinf_loop at ./inference.jl:1672
unknown function (ip: 0x7fcb6ab69eeb)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
typeinf_edge at ./inference.jl:1592
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
typeinf_ext at ./inference.jl:1616
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
jl_apply at /home/sachs/src/julia-release-0.5/src/julia.h:1392 [inlined]
jl_type_infer at /home/sachs/src/julia-release-0.5/src/gf.c:210
emit_invoke at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2681 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3162
emit_assignment at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2923 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3185
emit_stmtpos at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3064
emit_function at /home/sachs/src/julia-release-0.5/src/codegen.cpp:4727
jl_compile_linfo at /home/sachs/src/julia-release-0.5/src/codegen.cpp:809
emit_invoke at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2684 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3162
emit_function at /home/sachs/src/julia-release-0.5/src/codegen.cpp:4691
jl_compile_linfo at /home/sachs/src/julia-release-0.5/src/codegen.cpp:809
emit_invoke at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2684 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3162
emit_assignment at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2923 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3185
emit_stmtpos at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3064
emit_function at /home/sachs/src/julia-release-0.5/src/codegen.cpp:4727
jl_compile_linfo at /home/sachs/src/julia-release-0.5/src/codegen.cpp:809
emit_invoke at /home/sachs/src/julia-release-0.5/src/codegen.cpp:2684 [inlined]
emit_expr at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3162
emit_stmtpos at /home/sachs/src/julia-release-0.5/src/codegen.cpp:3064
emit_function at /home/sachs/src/julia-release-0.5/src/codegen.cpp:4727
jl_compile_linfo at /home/sachs/src/julia-release-0.5/src/codegen.cpp:809
jl_compile_for_dispatch at /home/sachs/src/julia-release-0.5/src/gf.c:1310
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:184 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
#stackwalk#61 at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:584
unknown function (ip: 0x7fc95f43cc8f)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
#stackwalk at ./<missing>:0
unknown function (ip: 0x7fc95f43c75d)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
breakpoint_hit at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:652
unknown function (ip: 0x7fc95f4393b6)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
_callback at /home/sachs/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:289
callback at /home/sachs/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:326
unknown function (ip: 0x7fc95f40487f)
myfunction2 at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:12 [inlined]
myfunction1 at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:7
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
do_call at /home/sachs/src/julia-release-0.5/src/interpreter.c:66
eval at /home/sachs/src/julia-release-0.5/src/interpreter.c:190
jl_toplevel_eval_flex at /home/sachs/src/julia-release-0.5/src/toplevel.c:558 [inlined]
jl_toplevel_eval at /home/sachs/src/julia-release-0.5/src/toplevel.c:580
jl_toplevel_eval_in_warn at /home/sachs/src/julia-release-0.5/src/builtins.c:590
eval at ./boot.jl:234
unknown function (ip: 0x7fcb6ac87b8f)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
eval_user_input at ./REPL.jl:64
unknown function (ip: 0x7fc95f3f5546)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
macro expansion at ./REPL.jl:95 [inlined]
#3 at ./event.jl:68
unknown function (ip: 0x7fc95f3edeaf)
jl_call_method_internal at /home/sachs/src/julia-release-0.5/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/sachs/src/julia-release-0.5/src/gf.c:1942
jl_apply at /home/sachs/src/julia-release-0.5/src/julia.h:1392 [inlined]
start_task at /home/sachs/src/julia-release-0.5/src/task.c:253
unknown function (ip: 0xffffffffffffffff)
ERROR: error compiling rec_backtrace_hook: error compiling step_first!: error compiling get_dwarf: error compiling get_dwarf: type inference data-flow error: tried to double infer a function
 in #stackwalk#61(::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Gallium.X86_64.ExtendedRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void,intptrT},Any}}) at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:584
 in (::Gallium.#kw##stackwalk)(::Array{Any,1}, ::Gallium.#stackwalk, ::Gallium.X86_64.ExtendedRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void,intptrT},Any}}) at ./<missing>:0
 in breakpoint_hit(::Gallium.Hooking.Hook, ::Gallium.X86_64.ExtendedRegs) at /home/sachs/.julia/v0.5/Gallium/src/Gallium.jl:652
 in _callback(::Ptr{Void}) at /home/sachs/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:289
 in callback(::Ptr{Void}) at /home/sachs/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:326
 in myfunction2 at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:12 [inlined]
 in myfunction1(::Int64, ::Int64) at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:7

Worked ok in 0.5.0

AWS-Sachs-Ubuntu$ /opt/julia-0.5.0-no-GPL/bin/julia
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0 (2016-09-19 18:14 UTC)
 _/ |\__'_|_|_|\__'_|  |
|__/                   |  x86_64-linux-gnu

julia> using Gallium

julia> include("/home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl") myfunction2 (generic function with 1 method)

julia> bp = Gallium.breakpoint(myfunction1, Tuple{Int64,Int64})                 Locations (+: active, -: inactive, *: source):
 + myfunction1(x::Int64, y::Int64) at /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:6


julia> myfunction1(2,3)
In /home/sachs/lib/julia/GalliumExample.jl/src/GalliumExample.jl:6
5 function myfunction1(x, y)
6     text = "alpha"
7     z = myfunction2(x + y)
8     return z

About to run: text = "alpha"
1|debug > finish
In boot.jl:234
233   eval(e::ANY) = eval(Main, e)
234   eval(m::Module, e::ANY) = ccall(:jl_toplevel_eval_in, Any, (Any, Any), m, e)
235
236   kwfunc(f::ANY) = ccall(:jl_get_keyword_sorter, Any, (Any,), f)

50

julia>
@Pbellive
Copy link

Pbellive commented Dec 1, 2016

I'm seeing the same error in trying to debug some of my own code. In my case I have multiple methods of a function with the same number of arguments but different argument types. Also I'm using the breakpoint(filename,lineNumber) syntax to set the bp. My version info is

Julia Version 0.5.1-pre+27
Commit 25f7066 (2016-11-04 08:41 UTC)
Platform Info:
  System: Linux (x86_64-linux-gnu)
  CPU: Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

Here's a reduced test case:

$ cat tst.jl
f(x::Float64,y::Float64) = x*y
function f(x::Float64,y::Float32) 
  a = x*convert(Float64,y)
  return a
end

$ juliav5
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.1-pre+27 (2016-11-04 08:41 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 25f7066 (26 days old release-0.5)
|__/                   |  x86_64-linux-gnu

julia> include("tst.jl")
f (generic function with 2 methods)

julia> using Gallium

julia> breakpoint("tst.jl",3)
Locations (+: active, -: inactive, *: source):
 * Any method reaching tst.jl:3
 * Any matching specialization of f(x, y) at /home/patrick/.julia/v0.5/MaxwellIP/test/tst.jl:3


julia> f(3.5,3f0)
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 /home/patrick/Julia/v0.5/julia/src/stackwalk.c:84
record_backtrace at /home/patrick/Julia/v0.5/julia/src/task.c:232
jl_throw at /home/patrick/Julia/v0.5/julia/src/task.c:550
abstract_eval at ./inference.jl:1186
unknown function (ip: 0x7f1d9feae196)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
typeinf_frame at ./inference.jl:1781
typeinf_loop at ./inference.jl:1672
unknown function (ip: 0x7f1d9feac23b)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
typeinf_edge at ./inference.jl:1592
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
typeinf_ext at ./inference.jl:1616
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
jl_apply at /home/patrick/Julia/v0.5/julia/src/julia.h:1392 [inlined]
jl_type_infer at /home/patrick/Julia/v0.5/julia/src/gf.c:210
emit_invoke at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2681 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3162
emit_assignment at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2923 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3185
emit_stmtpos at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3064
emit_function at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:4727
jl_compile_linfo at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:809
emit_invoke at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2684 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3162
emit_function at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:4691
jl_compile_linfo at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:809
emit_invoke at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2684 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3162
emit_assignment at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2923 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3185
emit_stmtpos at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3064
emit_function at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:4727
jl_compile_linfo at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:809
emit_invoke at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:2684 [inlined]
emit_expr at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3162
emit_stmtpos at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:3064
emit_function at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:4727
jl_compile_linfo at /home/patrick/Julia/v0.5/julia/src/codegen.cpp:809
jl_compile_for_dispatch at /home/patrick/Julia/v0.5/julia/src/gf.c:1310
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:184 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
#stackwalk#61 at /home/patrick/.julia/v0.5/Gallium/src/Gallium.jl:584
unknown function (ip: 0x7f1b869945ef)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
#stackwalk at ./<missing>:0
unknown function (ip: 0x7f1b8699410d)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
breakpoint_hit at /home/patrick/.julia/v0.5/Gallium/src/Gallium.jl:652
unknown function (ip: 0x7f1b86990fb6)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
_callback at /home/patrick/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:289
callback at /home/patrick/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:326
unknown function (ip: 0x7f1b869571ff)
f at /home/patrick/.julia/v0.5/MaxwellIP/test/tst.jl:4
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
do_call at /home/patrick/Julia/v0.5/julia/src/interpreter.c:66
eval at /home/patrick/Julia/v0.5/julia/src/interpreter.c:190
jl_toplevel_eval_flex at /home/patrick/Julia/v0.5/julia/src/toplevel.c:558 [inlined]
jl_toplevel_eval at /home/patrick/Julia/v0.5/julia/src/toplevel.c:580
jl_toplevel_eval_in_warn at /home/patrick/Julia/v0.5/julia/src/builtins.c:590
eval at ./boot.jl:234
unknown function (ip: 0x7f1d9ffc3a4f)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
eval_user_input at ./REPL.jl:64
unknown function (ip: 0x7f1b8694d5b6)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
macro expansion at ./REPL.jl:95 [inlined]
#3 at ./event.jl:68
unknown function (ip: 0x7f1b86944ecf)
jl_call_method_internal at /home/patrick/Julia/v0.5/julia/src/julia_internal.h:189 [inlined]
jl_apply_generic at /home/patrick/Julia/v0.5/julia/src/gf.c:1942
jl_apply at /home/patrick/Julia/v0.5/julia/src/julia.h:1392 [inlined]
start_task at /home/patrick/Julia/v0.5/julia/src/task.c:253
unknown function (ip: 0xffffffffffffffff)
ERROR: error compiling rec_backtrace_hook: error compiling step_first!: error compiling get_dwarf: error compiling get_dwarf: type inference data-flow error: tried to double infer a function
 in #stackwalk#61(::Bool, ::Bool, ::Bool, ::Bool, ::Function, ::Gallium.X86_64.ExtendedRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void,intptrT},Any}}) at /home/patrick/.julia/v0.5/Gallium/src/Gallium.jl:584
 in (::Gallium.#kw##stackwalk)(::Array{Any,1}, ::Gallium.#stackwalk, ::Gallium.X86_64.ExtendedRegs, ::Gallium.LocalSession, ::Gallium.LazyJITModules{Dict{Gallium.RemotePtr{Void,intptrT},Any}}) at ./<missing>:0
 in breakpoint_hit(::Gallium.Hooking.Hook, ::Gallium.X86_64.ExtendedRegs) at /home/patrick/.julia/v0.5/Gallium/src/Gallium.jl:652
 in _callback(::Ptr{Void}) at /home/patrick/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:289
 in callback(::Ptr{Void}) at /home/patrick/.julia/v0.5/Gallium/src/Hooking/Hooking.jl:326
 in f(::Float64, ::Float32) at /home/patrick/.julia/v0.5/MaxwellIP/test/tst.jl:4

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

No branches or pull requests

2 participants