Double-inference error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Double-inference error

Andy Ferris
Hi,

I'm getting a strange "double inference" error from StaticArrays.jl. I have some `@pure` functions which are doing some funky things with types (tracing parameters of T.name.primary up the type tree and back down again for a function called `similar_type()`). When I make them normal functions or generated functions, there is no error, but if I make the two functions `@pure` then *sometimes* I get the error message below (though I think the code is working, somehow). By sometimes, I mean I can't reproduce it at the REPL but some of my tests cause this error (but not others, which follow eventually exactly the same code path!).

My question is: I can't create a minimal reproducible example, so should I create an issue anyway? Or can anyway shed some light on what might be going on?

Thanks,
Andy



WARNING: An error occured during inference. Type inference is now partially disabled.rec_backtrace at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\stackwalk.c:84
record_backtrace at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\task.c:232
jl_throw at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\task.c:529
abstract_eval at .\inference.jl:1149
unknown function (ip: 0000000061B188AC)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
abstract_interpret at .\inference.jl:1201
unknown function (ip: 0000000061B164BC)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
typeinf_frame at .\inference.jl:1680
typeinf_loop at .\inference.jl:1623
unknown function (ip: 0000000061B15DE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
typeinf_ext at .\inference.jl:1594
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia.h:1394
jl_toplevel_eval_flex at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:569
jl_parse_eval_all at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\ast.c:708
jl_load at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:598
include_from_node1 at .\loading.jl:426
unknown function (ip: 0000000061C5EBE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
macro expansion; at C:\Users\Andy\.julia\v0.5\StaticArrays\test\runtests.jl:18
unknown function (ip: 0000000013C047E3)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_parse_eval_all at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\ast.c:708
jl_load at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:598
include_from_node1 at .\loading.jl:426
unknown function (ip: 0000000061C5EBE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
process_options at .\client.jl:266
_start at .\client.jl:322
unknown function (ip: 0000000061C884CE)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x64/build/ui/../src\julia.h:1394
wmain at /home/Administrator/buildbot/slave/package_win6_2-x64/build/ui\repl.c:232
__tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.6-1/crt\crtexe.c:329
mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.6-1/crt\crtexe.c:212
unknown function (ip: 00007FFF55158101)
unknown function (ip: 00007FFF5553C5B3)

ErrorException("type inference data-flow error: tried to double infer a function")
Reply | Threaded
Open this post in threaded view
|

Re: Double-inference error

Jameson Nash
Looks like a bug, since the system really isn't supposed to do that, even if  your `@pure` function is broken (which it sounds like may be the case from your description, since `similar_type` doesn't sound like a generally valid operation to me). Please file a issue.

On Mon, Jul 18, 2016 at 7:26 AM Andy Ferris <[hidden email]> wrote:
Hi,

I'm getting a strange "double inference" error from StaticArrays.jl. I have some `@pure` functions which are doing some funky things with types (tracing parameters of T.name.primary up the type tree and back down again for a function called `similar_type()`). When I make them normal functions or generated functions, there is no error, but if I make the two functions `@pure` then *sometimes* I get the error message below (though I think the code is working, somehow). By sometimes, I mean I can't reproduce it at the REPL but some of my tests cause this error (but not others, which follow eventually exactly the same code path!).

My question is: I can't create a minimal reproducible example, so should I create an issue anyway? Or can anyway shed some light on what might be going on?

Thanks,
Andy



WARNING: An error occured during inference. Type inference is now partially disabled.rec_backtrace at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\stackwalk.c:84
record_backtrace at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\task.c:232
jl_throw at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\task.c:529
abstract_eval at .\inference.jl:1149
unknown function (ip: 0000000061B188AC)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
abstract_interpret at .\inference.jl:1201
unknown function (ip: 0000000061B164BC)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
typeinf_frame at .\inference.jl:1680
typeinf_loop at .\inference.jl:1623
unknown function (ip: 0000000061B15DE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
typeinf_ext at .\inference.jl:1594
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia.h:1394
jl_toplevel_eval_flex at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:569
jl_parse_eval_all at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\ast.c:708
jl_load at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:598
include_from_node1 at .\loading.jl:426
unknown function (ip: 0000000061C5EBE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
macro expansion; at C:\Users\Andy\.julia\v0.5\StaticArrays\test\runtests.jl:18
unknown function (ip: 0000000013C047E3)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_parse_eval_all at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\ast.c:708
jl_load at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\toplevel.c:598
include_from_node1 at .\loading.jl:426
unknown function (ip: 0000000061C5EBE1)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
process_options at .\client.jl:266
_start at .\client.jl:322
unknown function (ip: 0000000061C884CE)
jl_call_method_internal at /home/Administrator/buildbot/slave/package_win6_2-x64/build/src/home/Administrator/buildbot/slave/package_win6_2-x64/build/src\julia_internal.h:175
jl_apply at /home/Administrator/buildbot/slave/package_win6_2-x64/build/ui/../src\julia.h:1394
wmain at /home/Administrator/buildbot/slave/package_win6_2-x64/build/ui\repl.c:232
__tmainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.6-1/crt\crtexe.c:329
mainCRTStartup at /usr/src/debug/mingw64-x86_64-runtime-4.0.6-1/crt\crtexe.c:212
unknown function (ip: 00007FFF55158101)
unknown function (ip: 00007FFF5553C5B3)

ErrorException("type inference data-flow error: tried to double infer a function")