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

concrete evaluation should never happen for uncompileable callsite #49050

Closed
timholy opened this issue Mar 18, 2023 · 0 comments · Fixed by #49074
Closed

concrete evaluation should never happen for uncompileable callsite #49050

timholy opened this issue Mar 18, 2023 · 0 comments · Fixed by #49074
Assignees
Milestone

Comments

@timholy
Copy link
Sponsor Member

timholy commented Mar 18, 2023

Running the tests for ColorTypes (v0.11.4) on nightly (with #49048, which should be inconsequential for this issue), I get

     Testing Running tests...
Skipping Base.active_repl
Skipping Base.active_repl_backend
[ Info: SetupBuildDirectory: setting up build directory.
[ Info: Doctest: running doctests.
[ Info: Skipped ExpandTemplates step (doctest only).
[ Info: Skipped CrossReferences step (doctest only).
[ Info: Skipped CheckDocument step (doctest only).
[ Info: Skipped Populate step (doctest only).
[ Info: Skipped RenderDocument step (doctest only).
Test Summary:        | Pass  Total   Time
Doctests: ColorTypes |    1      1  14.1s
Test Summary: | Pass  Total  Time
error_hints   |   27     27  4.4s
Test Summary: | Pass  Broken  Total   Time
conversions   | 1261      16   1277  16.2s
Test Summary: | Pass  Broken  Total   Time
operations    |  728      12    740  16.4s
Test Summary: | Pass  Broken  Total  Time
show          |   45       4     49  2.0s
Internal error: encountered unexpected error in runtime:
AssertionError(msg="concrete evaluation should never happen for uncompileable callsite")
#concrete_result_item#461 at ./compiler/ssair/inlining.jl:1510
concrete_result_item at ./compiler/ssair/inlining.jl:1504 [inlined]
handle_concrete_result! at ./compiler/ssair/inlining.jl:1496 [inlined]
#handle_any_const_result!#453 at ./compiler/ssair/inlining.jl:1298
handle_any_const_result! at ./compiler/ssair/inlining.jl:1293 [inlined]
compute_inlining_cases at ./compiler/ssair/inlining.jl:1385
handle_call! at ./compiler/ssair/inlining.jl:1431 [inlined]
assemble_inline_todo! at ./compiler/ssair/inlining.jl:1680
ssa_inlining_pass! at ./compiler/ssair/inlining.jl:79 [inlined]
run_passes at ./compiler/optimize.jl:499
run_passes at ./compiler/optimize.jl:514 [inlined]
optimize at ./compiler/optimize.jl:463 [inlined]
_typeinf at ./compiler/typeinfer.jl:269
typeinf at ./compiler/typeinfer.jl:215
typeinf_edge at ./compiler/typeinfer.jl:918
abstract_call_method at ./compiler/abstractinterpretation.jl:655
abstract_call_gf_by_type at ./compiler/abstractinterpretation.jl:149
abstract_call_known at ./compiler/abstractinterpretation.jl:2017
abstract_call at ./compiler/abstractinterpretation.jl:2093
abstract_call at ./compiler/abstractinterpretation.jl:2067
abstract_eval_statement_expr at ./compiler/abstractinterpretation.jl:2254
abstract_eval_statement at ./compiler/abstractinterpretation.jl:2509
abstract_eval_basic_statement at ./compiler/abstractinterpretation.jl:2800
typeinf_local at ./compiler/abstractinterpretation.jl:2985
typeinf_nocycle at ./compiler/abstractinterpretation.jl:3073
_typeinf at ./compiler/typeinfer.jl:244
typeinf at ./compiler/typeinfer.jl:215
typeinf_ext at ./compiler/typeinfer.jl:1041
typeinf_ext_toplevel at ./compiler/typeinfer.jl:1074
typeinf_ext_toplevel at ./compiler/typeinfer.jl:1070
jfptr_typeinf_ext_toplevel_20437 at /home/tim/src/juliaw/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
jl_apply at /home/tim/src/juliaw/src/julia.h:1878 [inlined]
jl_type_infer at /home/tim/src/juliaw/src/gf.c:320
jl_generate_fptr_impl at /home/tim/src/juliaw/src/jitlayers.cpp:447
jl_compile_method_internal at /home/tim/src/juliaw/src/gf.c:2349 [inlined]
jl_compile_method_internal at /home/tim/src/juliaw/src/gf.c:2238
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2750 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
jl_apply at /home/tim/src/juliaw/src/julia.h:1878 [inlined]
do_call at /home/tim/src/juliaw/src/interpreter.c:125
eval_value at /home/tim/src/juliaw/src/interpreter.c:222
eval_stmt_value at /home/tim/src/juliaw/src/interpreter.c:173 [inlined]
eval_body at /home/tim/src/juliaw/src/interpreter.c:620
eval_body at /home/tim/src/juliaw/src/interpreter.c:529
eval_body at /home/tim/src/juliaw/src/interpreter.c:529
eval_body at /home/tim/src/juliaw/src/interpreter.c:529
jl_interpret_toplevel_thunk at /home/tim/src/juliaw/src/interpreter.c:758
macro expansion at /home/tim/.julia/dev/ColorTypes/test/traits.jl:176 [inlined]
macro expansion at /home/tim/src/juliaw/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1504 [inlined]
top-level scope at /home/tim/.julia/dev/ColorTypes/test/traits.jl:172
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:910
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:853
ijl_toplevel_eval_in at /home/tim/src/juliaw/src/toplevel.c:969
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1896
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
_include at ./loading.jl:1956
include at ./client.jl:478
unknown function (ip: 0x7f8b87b85082)
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
jl_apply at /home/tim/src/juliaw/src/julia.h:1878 [inlined]
do_call at /home/tim/src/juliaw/src/interpreter.c:125
eval_value at /home/tim/src/juliaw/src/interpreter.c:222
eval_stmt_value at /home/tim/src/juliaw/src/interpreter.c:173 [inlined]
eval_body at /home/tim/src/juliaw/src/interpreter.c:620
eval_body at /home/tim/src/juliaw/src/interpreter.c:529
eval_body at /home/tim/src/juliaw/src/interpreter.c:529
jl_interpret_toplevel_thunk at /home/tim/src/juliaw/src/interpreter.c:758
macro expansion at /home/tim/.julia/dev/ColorTypes/test/runtests.jl:36 [inlined]
macro expansion at /home/tim/src/juliaw/usr/share/julia/stdlib/v1.10/Test/src/Test.jl:1504 [inlined]
top-level scope at /home/tim/.julia/dev/ColorTypes/test/runtests.jl:36
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:910
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:853
ijl_toplevel_eval_in at /home/tim/src/juliaw/src/toplevel.c:969
eval at ./boot.jl:370 [inlined]
include_string at ./loading.jl:1896
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
_include at ./loading.jl:1956
include at ./client.jl:478
unknown function (ip: 0x7f8b87b85082)
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
jl_apply at /home/tim/src/juliaw/src/julia.h:1878 [inlined]
do_call at /home/tim/src/juliaw/src/interpreter.c:125
eval_value at /home/tim/src/juliaw/src/interpreter.c:222
eval_stmt_value at /home/tim/src/juliaw/src/interpreter.c:173 [inlined]
eval_body at /home/tim/src/juliaw/src/interpreter.c:620
jl_interpret_toplevel_thunk at /home/tim/src/juliaw/src/interpreter.c:758
top-level scope at none:6
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:910
jl_toplevel_eval_flex at /home/tim/src/juliaw/src/toplevel.c:853
ijl_toplevel_eval_in at /home/tim/src/juliaw/src/toplevel.c:969
eval at ./boot.jl:370 [inlined]
exec_options at ./client.jl:280
_start at ./client.jl:541
jfptr__start_56374 at /home/tim/src/juliaw/usr/lib/julia/sys.so (unknown line)
_jl_invoke at /home/tim/src/juliaw/src/gf.c:2758 [inlined]
ijl_apply_generic at /home/tim/src/juliaw/src/gf.c:2940
jl_apply at /home/tim/src/juliaw/src/julia.h:1878 [inlined]
true_main at /home/tim/src/juliaw/src/jlapi.c:573
jl_repl_entrypoint at /home/tim/src/juliaw/src/jlapi.c:717
main at /home/tim/src/juliaw/cli/loader_exe.c:58
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
_start at /home/tim/src/juliaw/usr/bin/julia (unknown line)
┌ Warning: one(Gray{Float32}) will soon switch to returning 1; you might need to switch to `oneunit`
│   caller = macro expansion at traits.jl:647 [inlined]
└ @ Core ~/.julia/dev/ColorTypes/test/traits.jl:647
Test Summary: | Pass  Broken  Total  Time
traits        |  535       7    542  4.6s
Test Summary: | Pass  Broken  Total   Time
types         | 2122      98   2220  29.1s
Test Summary: | Pass  Total  Time
misc.         |    3      3  0.2s
Test Summary: | Pass  Total  Time
type-centric  |  814    814  5.0s
     Testing ColorTypes tests passed
@KristofferC KristofferC added this to the 1.10 milestone Mar 19, 2023
@aviatesk aviatesk self-assigned this Mar 21, 2023
aviatesk added a commit that referenced this issue Mar 21, 2023
In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes #49050
aviatesk added a commit that referenced this issue Mar 21, 2023
In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes #49050
aviatesk added a commit that referenced this issue Mar 21, 2023
In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes #49050
Keno pushed a commit that referenced this issue Mar 21, 2023
…#49074)

* inlining: allow non-compileable result when handling `ConcreteResult`

In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes #49050

* Update test/compiler/inline.jl

Co-authored-by: Jameson Nash <vtjnash@gmail.com>

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Xnartharax pushed a commit to Xnartharax/julia that referenced this issue Apr 19, 2023
…JuliaLang#49074)

* inlining: allow non-compileable result when handling `ConcreteResult`

In rare cases, the system might decide to widen the signature of a call
that is determined to throw by concrete-evaluation.
We should remove this unnecessary assertion here.

closes JuliaLang#49050

* Update test/compiler/inline.jl

Co-authored-by: Jameson Nash <vtjnash@gmail.com>

---------

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
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

Successfully merging a pull request may close this issue.

3 participants