Skip to content

LLVM issues on windows #159

Open
Open
@baggepinnen

Description

@SimonDanisch is experiencing lots of issues running on windows

The robot example is failing during rendering with

julia> Multibody.render(robot, sol; y=2, lookat=[0,1,0], filename = "robot.mp4")
ERROR: Internal error: encountered unexpected error in runtime:
ReadOnlyMemoryError()
jl_gc_pool_alloc_inner at C:/workdir/src\gc.c:1315 [inlined]
jl_gc_pool_alloc_noinline at C:/workdir/src\gc.c:1357
jl_gc_alloc_ at C:/workdir/src\julia_internal.h:478 [inlined]
jl_exprn at C:/workdir/src\builtins.c:1420
jl_decode_value_expr at C:/workdir/src\ircode.c:555 [inlined]
jl_decode_value at C:/workdir/src\ircode.c:685
jl_decode_value_array at C:/workdir/src\ircode.c:501
ijl_uncompress_ir at C:/workdir/src\ircode.c:902
retrieve_ir_for_inlining at .\compiler/ssair\inlining.jl:985 [inlined]
#resolve_todo#457 at .\compiler/ssair\inlining.jl:908
resolve_todo at .\compiler/ssair\inlining.jl:871 [inlined]
#analyze_method!#458 at .\compiler/ssair\inlining.jl:981
analyze_method! at .\compiler/ssair\inlining.jl:950 [inlined]
#handle_match!#462 at .\compiler/ssair\inlining.jl:1467
handle_match! at .\compiler/ssair\inlining.jl:1457 [inlined]
#handle_any_const_result!#459 at .\compiler/ssair\inlining.jl:1329
handle_any_const_result! at .\compiler/ssair\inlining.jl:1312 [inlined]
compute_inlining_cases at .\compiler/ssair\inlining.jl:1404
handle_call! at .\compiler/ssair\inlining.jl:1450 [inlined]
assemble_inline_todo! at .\compiler/ssair\inlining.jl:1698
ssa_inlining_pass! at .\compiler/ssair\inlining.jl:78 [inlined]
run_passes at .\compiler\optimize.jl:489
run_passes at .\compiler\optimize.jl:504 [inlined]
optimize at .\compiler\optimize.jl:453 [inlined]
_typeinf at .\compiler\typeinfer.jl:272
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_edge at .\compiler\typeinfer.jl:930
abstract_call_method at .\compiler\abstractinterpretation.jl:629
abstract_call_gf_by_type at .\compiler\abstractinterpretation.jl:95
abstract_call_known at .\compiler\abstractinterpretation.jl:2087
abstract_call at .\compiler\abstractinterpretation.jl:2169
abstract_call at .\compiler\abstractinterpretation.jl:2162
abstract_call at .\compiler\abstractinterpretation.jl:2354
abstract_eval_call at .\compiler\abstractinterpretation.jl:2370
abstract_eval_statement_expr at .\compiler\abstractinterpretation.jl:2380
abstract_eval_statement at .\compiler\abstractinterpretation.jl:2624
abstract_eval_basic_statement at .\compiler\abstractinterpretation.jl:2913
typeinf_local at .\compiler\abstractinterpretation.jl:3098
typeinf_nocycle at .\compiler\abstractinterpretation.jl:3186
_typeinf at .\compiler\typeinfer.jl:247
typeinf at .\compiler\typeinfer.jl:216
typeinf_ext at .\compiler\typeinfer.jl:1051
typeinf_ext_toplevel at .\compiler\typeinfer.jl:1082
typeinf_ext_toplevel at .\compiler\typeinfer.jl:1078
jfptr_typeinf_ext_toplevel_39006.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
_jl_invoke at C:/workdir/src\gf.c:2895 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:3077 [inlined]
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_type_infer at C:/workdir/src\gf.c:394
jl_generate_fptr_impl at C:/workdir/src\jitlayers.cpp:504
jl_compile_method_internal at C:/workdir/src\gf.c:2481
jl_compile_method_internal at C:/workdir/src\gf.c:2372 [inlined]
_jl_invoke at C:/workdir/src\gf.c:2887 [inlined]
ijl_apply_generic at C:/workdir/src\gf.c:3077
show_exception_stack at .\errorshow.jl:975
display_error at .\client.jl:111
jfptr_display_error_86461.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889 [inlined]
repl_display_error at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:293
print_response at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:310
#57 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:284
jfptr_YY.57_95850.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
with_repl_linfo at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:569
jfptr_with_repl_linfo_95925.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
print_response at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:282
do_respond at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:911
jfptr_do_respond_95999.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889 [inlined]
run_interface at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\LineEdit.jl:2656
jfptr_run_interface_94754.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
run_frontend at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:1312
#62 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:386
jfptr_YY.62_95901.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
start_task at C:/workdir/src\task.c:1238
DimensionMismatch: arrays could not be broadcast to a common size; got a dimension with lengths 3702 and 401
Stacktrace:
  [1] _bcs1
    @ .\broadcast.jl:555 [inlined]
  [2] _bcs
    @ .\broadcast.jl:549 [inlined]
  [3] broadcast_shape
    @ .\broadcast.jl:543 [inlined]
  [4] combine_axes
    @ .\broadcast.jl:524 [inlined]
  [5] instantiate
    @ .\broadcast.jl:306 [inlined]
  [6] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, Type{Pair}, Tuple{Vector{…}, Vector{…}}})
    @ Base.Broadcast .\broadcast.jl:903
  [7] Render.CacheSol(model::ODESystem, sol::ODESolution{…})
    @ Render C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:87
  [8] render(model::ODESystem, sol::ODESolution{…}, timevec::Nothing; filename::String, framerate::Int64, x::Int64, y::Int64, z::Int64, lookat::Vector{…}, up::Vec{…}, show_axis::Bool, timescale::Float64, traces::Nothing, display::Bool, loop::Int64, cache::Bool, kwargs::@Kwargs{})
    @ Render C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:285
  [9] render
    @ C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:263 [inlined]
 [10] top-level scope
    @ REPL[14]:1
Some type information was truncated. Use `show(err)` to see complete types.

and with cache=false he instead gets

julia> Multibody.render(robot, sol; y=2, lookat=[0,1,0], filename = "robot.mp4", cache=false)

Please submit a bug report with steps to reproduce this fault, and any error messages that follow (in their entirety). Thanks.
Exception: EXCEPTION_ACCESS_VIOLATION at 0x189ff553996 -- <= at .\int.jl:514 [inlined]
Point at C:\Users\sdani\.julia\packages\GeometryBasics\ebXl0\src\fixed_arrays.jl:42 [inlined]
#35 at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:462 [inlined]
#map#13 at C:\Users\sdani\.julia\packages\Observables\YdEbO\src\Observables.jl:570
in expression starting at REPL[13]:1
<= at .\int.jl:514 [inlined]
Point at C:\Users\sdani\.julia\packages\GeometryBasics\ebXl0\src\fixed_arrays.jl:42 [inlined]
#35 at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:462 [inlined]
#map#13 at C:\Users\sdani\.julia\packages\Observables\YdEbO\src\Observables.jl:570
unknown function (ip: 00000189ff554010)
map at C:\Users\sdani\.julia\packages\Observables\YdEbO\src\Observables.jl:568 [inlined]
render! at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:461
unknown function (ip: 00000189c820c217)
recursive_render! at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:409
unknown function (ip: 00000189c820a4a7)
recursive_render! at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:411
unknown function (ip: 00000189c820a4a7)
#render#20 at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:294
render at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:263 [inlined]
render at C:\Users\sdani\.julia\packages\Multibody\xhSwA\ext\Render.jl:263
unknown function (ip: 00000189c81d07f3)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
do_call at C:/workdir/src\interpreter.c:126
eval_value at C:/workdir/src\interpreter.c:223
eval_stmt_value at C:/workdir/src\interpreter.c:174 [inlined]
eval_body at C:/workdir/src\interpreter.c:635
jl_interpret_toplevel_thunk at C:/workdir/src\interpreter.c:775
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:934
jl_toplevel_eval_flex at C:/workdir/src\toplevel.c:877
ijl_toplevel_eval at C:/workdir/src\toplevel.c:943 [inlined]
ijl_toplevel_eval_in at C:/workdir/src\toplevel.c:985
eval at .\boot.jl:385 [inlined]
eval_user_input at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:150
repl_backend_loop at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:246
#start_repl_backend#46 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:231
start_repl_backend at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:228
#run_repl#59 at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:389
run_repl at C:\workdir\usr\share\julia\stdlib\v1.10\REPL\src\REPL.jl:375
jfptr_run_repl_95862.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
#1013 at .\client.jl:432
jfptr_YY.1013_86638.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
jl_f__call_latest at C:/workdir/src\builtins.c:812
#invokelatest#2 at .\essentials.jl:892 [inlined]
invokelatest at .\essentials.jl:889 [inlined]
run_main_repl at .\client.jl:416
exec_options at .\client.jl:333
_start at .\client.jl:552
jfptr__start_86663.1 at C:\Users\sdani\.julia\juliaup\julia-1.10.5+0.x64.w64.mingw32\lib\julia\sys.dll (unknown line)
jl_apply at C:/workdir/src\julia.h:1982 [inlined]
true_main at C:/workdir/src\jlapi.c:582
jl_repl_entrypoint at C:/workdir/src\jlapi.c:731
mainCRTStartup at C:/workdir/cli\loader_exe.c:58
BaseThreadInitThunk at C:\WINDOWS\System32\KERNEL32.DLL (unknown line)
RtlUserThreadStart at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
Allocations: 167030101 (Pool: 166884019; Big: 146082); GC: 117

It looks like the issue stems from calling a function generated by JSCompiler with the LLVM backend.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions