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

Precompilation on nightly sometimes fails due to llvmcall deprecation #3888

Closed
lgoettgens opened this issue Jun 26, 2024 · 4 comments · Fixed by #3897
Closed

Precompilation on nightly sometimes fails due to llvmcall deprecation #3888

lgoettgens opened this issue Jun 26, 2024 · 4 comments · Fixed by #3897
Labels
bug Something isn't working nightly error with julia nightly or pre-releases

Comments

@lgoettgens
Copy link
Member

I didn't observe it yet in the Oscar CI tests, but in some code that uses Oscar as an dependency.
This has just been reported upstream in JuliaSIMD/ThreadingUtilities.jl#51, but I was asked to open this here as well for being able to point to some issue if this occurs here as well.

Some part from the corresponding CI log:

Failed to precompile PBWDeformations [5e7992ee-18b2-4301-9ba0-4f17696dc75a] to "/home/runner/.julia/compiled/v1.12/PBWDeformations/jl_EtJgyo".
Internal error: encountered unexpected error during compilation of foreach:
ErrorException("llvmcall with integer pointers is deprecated, use an actual pointer type instead.")
ijl_error at /cache/build/builder-amdci4-0/julialang/julia-master/src/rtutils.c:41
emit_llvmcall at /cache/build/builder-amdci4-0/julialang/julia-master/src/ccall.cpp:997
emit_intrinsic at /cache/build/builder-amdci4-0/julialang/julia-master/src/intrinsics.cpp:1297
emit_call at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:5361
emit_expr at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:6366
emit_ssaval_assign at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:5904
emit_stmtpos at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:6182
emit_function at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:9430
jl_emit_code at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:9763
jl_emit_codeinst at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:9847
jl_compile_workqueue at /cache/build/builder-amdci4-0/julialang/julia-master/src/codegen.cpp:9961
jl_create_native_impl at /cache/build/builder-amdci4-0/julialang/julia-master/src/aotcompile.cpp:413
jl_precompile_ at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:265
jl_precompile_worklist at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:320 [inlined]
ijl_create_system_image at /cache/build/builder-amdci4-0/julialang/julia-master/src/staticdata.c:2982
ijl_write_compiler_output at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile.c:144
ijl_atexit_hook at /cache/build/builder-amdci4-0/julialang/julia-master/src/init.c:281
jl_repl_entrypoint at /cache/build/builder-amdci4-0/julialang/julia-master/src/jlapi.c:1060
main at /cache/build/builder-amdci4-0/julialang/julia-master/cli/loader_exe.c:58
unknown function (ip: 0x7fa9b8a29d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)

[3748] signal 11 (1): Segmentation fault
in expression starting at none:0
_ZN4llvm4Type10getInt64TyERNS_11LLVMContextE at /opt/hostedtoolcache/julia/nightly/x64/bin/../lib/julia/libLLVM-17jl.so (unknown line)
jl_precompile_ at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:265
jl_precompile_worklist at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:320 [inlined]
ijl_create_system_image at /cache/build/builder-amdci4-0/julialang/julia-master/src/staticdata.c:2982
ijl_write_compiler_output at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile.c:144
ijl_atexit_hook at /cache/build/builder-amdci4-0/julialang/julia-master/src/init.c:281
jl_repl_entrypoint at /cache/build/builder-amdci4-0/julialang/julia-master/src/jlapi.c:1060
main at /cache/build/builder-amdci4-0/julialang/julia-master/cli/loader_exe.c:58
unknown function (ip: 0x7fa9b8a29d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 482055 (Pool: 482045; Big: 10); GC: 4

[3748] signal 11 (1): Segmentation fault
in expression starting at none:0
_ZN4llvm4Type10getInt64TyERNS_11LLVMContextE at /opt/hostedtoolcache/julia/nightly/x64/bin/../lib/julia/libLLVM-17jl.so (unknown line)
jl_precompile_ at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:265
jl_precompile_worklist at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile_utils.c:320 [inlined]
ijl_create_system_image at /cache/build/builder-amdci4-0/julialang/julia-master/src/staticdata.c:2982
ijl_write_compiler_output at /cache/build/builder-amdci4-0/julialang/julia-master/src/precompile.c:144
ijl_atexit_hook at /cache/build/builder-amdci4-0/julialang/julia-master/src/init.c:281
jl_repl_entrypoint at /cache/build/builder-amdci4-0/julialang/julia-master/src/jlapi.c:1060
main at /cache/build/builder-amdci4-0/julialang/julia-master/cli/loader_exe.c:58
unknown function (ip: 0x7fa9b8a29d8f)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 482055 (Pool: 482045; Big: 10); GC: 4
ERROR: LoadError: Failed to precompile ThreadingUtilities [8290d209-cae3-49c0-8002-c8c24d57dab5] to "/home/runner/.julia/compiled/v1.12/ThreadingUtilities/jl_R7S7Cx".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:44
  [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool; flags::Cmd, cacheflags::Base.CacheFlags, reasons::Dict{String, Int64})
    @ Base ./loading.jl:3034
  [3] (::Base.var"#1100#1101"{Base.PkgId})()
    @ Base ./loading.jl:2436
  [4] mkpidlock(f::Base.var"#1100#1101"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:93
  [5] #mkpidlock#6
    @ /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:88 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile /opt/hostedtoolcache/julia/nightly/x64/share/julia/stdlib/v1.12/FileWatching/src/pidfile.jl:114
  [7] #invokelatest#2
    @ ./essentials.jl:1047 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1042 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1100#1101"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:[360](https://github.com/lgoettgens/PBWDeformations.jl/actions/runs/9612061915/job/26511953865#step:6:363)4
 [10] maybe_cachefile_lock
    @ ./loading.jl:3601 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2432
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2265
 [13] #invoke_in_world#3
    @ ./essentials.jl:1079 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1076 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2256
 [16] macro expansion
    @ ./loading.jl:2195 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2152
 [19] #invoke_in_world#3
    @ ./essentials.jl:1079 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1076 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2145
 [22] include
    @ ./Base.jl:560 [inlined]
 [23] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::String)
    @ Base ./loading.jl:2769
 [24] top-level scope
    @ stdin:4
 [25] eval
    @ ./boot.jl:438 [inlined]
 [26] include_string(mapexpr::typeof(identity), mod::Module, code::String, filename::String)
    @ Base ./loading.jl:2591
 [27] include_string
    @ ./loading.jl:2601 [inlined]
 [28] exec_options(opts::Base.JLOptions)
    @ Base ./client.jl:322
 [29] _start()
    @ Base ./client.jl:532

If you ask yourself why we depend on ThreadingUtilities, this is why:

(Oscar) pkg> why ThreadingUtilities
  AlgebraicSolving  LoopVectorization  PolyesterWeave  ThreadingUtilities
  AlgebraicSolving  LoopVectorization  ThreadingUtilities
@lgoettgens lgoettgens added bug Something isn't working nightly error with julia nightly or pre-releases labels Jun 26, 2024
@thofma
Copy link
Collaborator

thofma commented Jun 26, 2024

One should just remove LoopVectorization since it is a noop (adds no value) on julia >= 1.11, see https://github.com/JuliaSIMD/LoopVectorization.jl. CC: @ederc

@ederc
Copy link
Member

ederc commented Jun 26, 2024

@RafaelDavidMohr Could you have a look at this?

@thofma
Copy link
Collaborator

thofma commented Jun 26, 2024

Sorry, I was a bit imprecise. LoopVectorization surely makes things faster in AlgebraicSolving.jl for julia version <= 1.10, but it is deprecated/unmaintained for >= 1.11. Not sure how to best make the transition.

@ederc
Copy link
Member

ederc commented Jun 27, 2024

Thanks to @RafaelDavidMohr this should be fixed. I am preparing a new release of AlgebraicSolving.jl (waiting also for new msolve_jll), will hopefully all be done soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working nightly error with julia nightly or pre-releases
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants