Skip to content

ForwardDiff asserts while precompiling #22164

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

Closed
Keno opened this issue May 31, 2017 · 9 comments
Closed

ForwardDiff asserts while precompiling #22164

Keno opened this issue May 31, 2017 · 9 comments
Assignees
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@Keno
Copy link
Member

Keno commented May 31, 2017

julia> using ForwardDiff

julia-debug: /home/keno/julia/src/gf.c:1122: check_ambiguous_visitor: Assertion `!jl_subtype((jl_value_t*)sig, (jl_value_t*)type)' failed.

signal (6): Aborted
while loading /home/keno/.julia/v0.7/ForwardDiff/src/dual.jl, in expression starting on line 195
gsignal at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
abort at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x7fbe6dc73bb6)
__assert_fail at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
check_ambiguous_visitor at /home/keno/julia/src/gf.c:1122
jl_typemap_intersection_node_visitor at /home/keno/julia/src/typemap.c:488
jl_typemap_intersection_visitor at /home/keno/julia/src/typemap.c:545
jl_typemap_intersection_visitor at /home/keno/julia/src/typemap.c:536
check_ambiguous_matches at /home/keno/julia/src/gf.c:1209
jl_method_table_insert at /home/keno/julia/src/gf.c:1395
jl_method_def at /home/keno/julia/src/method.c:737
eval at /home/keno/julia/src/interpreter.c:303
eval_body at /home/keno/julia/src/interpreter.c:608
jl_interpret_toplevel_thunk at /home/keno/julia/src/interpreter.c:692
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:590
jl_parse_eval_all at /home/keno/julia/src/ast.c:907
jl_load at /home/keno/julia/src/toplevel.c:614
jl_load_ at /home/keno/julia/src/toplevel.c:621
include_from_node1 at ./loading.jl:551
unknown function (ip: 0x7fbe34c7069d)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
include at ./sysimg.jl:14
unknown function (ip: 0x7fbe67acda99)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
do_call at /home/keno/julia/src/interpreter.c:75
eval at /home/keno/julia/src/interpreter.c:242
jl_interpret_toplevel_expr at /home/keno/julia/src/interpreter.c:34
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:575
jl_eval_module_expr at /home/keno/julia/src/toplevel.c:203
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:478
jl_parse_eval_all at /home/keno/julia/src/ast.c:907
jl_load at /home/keno/julia/src/toplevel.c:614
jl_load_ at /home/keno/julia/src/toplevel.c:621
include_from_node1 at ./loading.jl:551
unknown function (ip: 0x7fbe67d287e9)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
include at ./sysimg.jl:14
unknown function (ip: 0x7fbe67acda99)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
do_call at /home/keno/julia/src/interpreter.c:75
eval at /home/keno/julia/src/interpreter.c:242
jl_interpret_toplevel_expr at /home/keno/julia/src/interpreter.c:34
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:575
jl_toplevel_eval at /home/keno/julia/src/toplevel.c:598
jl_toplevel_eval_in at /home/keno/julia/src/builtins.c:496
anonymous at ./<missing>:2
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_toplevel_eval_flex at /home/keno/julia/src/toplevel.c:587
jl_toplevel_eval at /home/keno/julia/src/toplevel.c:598
jl_toplevel_eval_in at /home/keno/julia/src/builtins.c:496
eval at ./boot.jl:236
unknown function (ip: 0x7fbe67cbec2d)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
process_options at ./client.jl:288
_start at ./client.jl:373
unknown function (ip: 0x7fbe67d3bd31)
jl_call_fptr_internal at /home/keno/julia/src/julia_internal.h:353
jl_call_method_internal at /home/keno/julia/src/julia_internal.h:372
jl_apply_generic at /home/keno/julia/src/gf.c:1923
jl_apply at /home/keno/julia/ui/../src/julia.h:1424
true_main at /home/keno/julia/ui/repl.c:127
main at /home/keno/julia/ui/repl.c:264

Happens at with ForwardDiff 0.4.2 as well as with 0.5.0.

(rr) p jl_(sig)
Tuple{typeof(Base.convert), Type{ForwardDiff.Dual{N, T} where T<:Real where N}, ForwardDiff.Dual{N, T} where T<:Real where N}
$1 = void
(rr) p jl_(type)
Tuple{typeof(Base.convert), Type{D}, D} where D<:(ForwardDiff.Dual{N, T} where T<:Real where N)
$2 = void
@Keno Keno added the bug Indicates an unexpected problem or unintended behavior label May 31, 2017
@JeffBezanson
Copy link
Member

I'm instead running into something that looks similar to #22158 here.

@JeffBezanson
Copy link
Member

What branch/commit of julia is this?

@Keno
Copy link
Member Author

Keno commented Jun 1, 2017

88c21f4

@JeffBezanson
Copy link
Member

I'm having trouble reproducing this. Is there anything else loaded in your session? Are there local modifications to anything?

@Keno
Copy link
Member Author

Keno commented Jun 1, 2017

No and no. Are you running with assertions?

@JeffBezanson
Copy link
Member

Yes; I got that world age assertion. When I commented that out, I got nothing. Do you have any packages on master? What version of DiffBase? ForwardDiff allows 0.2.0 and 0.3.0, but for some reason I can only install 0.2.0.

@tkelman
Copy link
Contributor

tkelman commented Jun 1, 2017

Try in a clean JULIA_PKGDIR if you've got other packages holding things back

@JeffBezanson
Copy link
Member

Ok, reproduced with these package versions:

3 required packages:
 - Compat                        0.25.0             pinned.e628eb0c.tmp
 - ForwardDiff                   0.4.2              pinned.82dcd989.tmp
 - NaNMath                       0.2.4              pinned.cbd6063e.tmp

@JeffBezanson
Copy link
Member

I have a fix for this in #22162 now. Fixing it will involve changing specificity anyway, so if we're ok with that we can eventually backport #22162 to 0.6. If we're not ok with that we can maybe just leave this alone since newer versions of the packages don't seem to exhibit the problem.

tkelman pushed a commit that referenced this issue Jun 5, 2017
fix #22164, specificity issue in ForwardDiff

(cherry picked from commit e92eb58)
partial backport of #22162
tkelman added a commit that referenced this issue Jun 5, 2017
[release-0.6] fix #22164 and #22002, method sorting problems
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

3 participants