-
-
Notifications
You must be signed in to change notification settings - Fork 198
Description
I am trying to compile a sysimage using PackageCompiler but have been unable to successfully complete the process. Everything appears to work correctly until I reach "PackageCompiler: compiling incremental system image", at which point it spins forever. I left it overnight and had it running at least 11 hours before killing the process.
When I kill the process, it always gives me the following stacktrace, which appears to show the process stuck in a spinlock.
Stacktrace:
[1] try_yieldto(undo::typeof(Base.ensure_rescheduled))
@ Base ./task.jl:920
[2] wait()
@ Base ./task.jl:984
[3] wait(c::Base.GenericCondition{Base.Threads.SpinLock}; first::Bool)
@ Base ./condition.jl:130
[4] wait
@ ./condition.jl:125 [inlined]
[5] wait(x::Base.Process)
@ Base ./process.jl:661
[6] success
@ ./process.jl:523 [inlined]
[7] run(::Cmd; wait::Bool)
@ Base ./process.jl:480
[8] run
@ ./process.jl:477 [inlined]
[9] #20
@ ~/.julia/packages/PackageCompiler/b2smD/ext/TerminalSpinners.jl:157 [inlined]
[10] spin(f::PackageCompiler.var"#20#22"{Cmd}, s::PackageCompiler.TerminalSpinners.Spinner{Base.TTY})
@ PackageCompiler.TerminalSpinners ~/.julia/packages/PackageCompiler/b2smD/ext/TerminalSpinners.jl:164
[11] macro expansion
@ ~/.julia/packages/PackageCompiler/b2smD/ext/TerminalSpinners.jl:157 [inlined]
[12] create_sysimg_object_file(object_file::String, packages::Vector{String}, packages_sysimg::Set{Base.PkgId}; project::String, base_sysimage::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, extra_precompiles::String, incremental::Bool)
@ PackageCompiler ~/.julia/packages/PackageCompiler/b2smD/src/PackageCompiler.jl:128
[13] create_sysimg_object_file
@ ~/.julia/packages/PackageCompiler/b2smD/src/PackageCompiler.jl:290 [inlined]
[14] create_sysimage(packages::Vector{String}; sysimage_path::String, project::String, precompile_execution_file::Vector{String}, precompile_statements_file::Vector{String}, incremental::Bool, filter_stdlibs::Bool, cpu_target::String, script::Nothing, sysimage_build_args::Cmd, include_transitive_dependencies::Bool, base_sysimage::Nothing, julia_init_c_file::Nothing, version::Nothing, soname::Nothing, compat_level::String, extra_precompiles::String)
@ PackageCompiler ~/.julia/packages/PackageCompiler/b2smD/src/PackageCompiler.jl:586
[15] top-level scope
@ REPL[8]:1
Julia Info
Julia Version 1.9.1
Commit 147bdf428cd (2023-06-07 08:27 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: 2 × AMD EPYC 7B12
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-14.0.6 (ORCJIT, znver2)
Threads: 1 on 2 virtual cores
Environment:
JULIA_IMAGE_THREADS = 1
PackageCompiler v2.1.7
Steps to reproduce
I have reproduced this error on multiple machines. The steps are as follows:
- Download a fresh install of Julia 1.9
- Open the REPL
- Open Pkg
- add StockFlow
- add PackageCompiler
- Close pkg
- using PackageCompiler
- create_sysimage(["StockFlow"]; sysimage_path="./image.so")
The infinite loop happens inside create_sysimage. This happens with both incremental and non-incremental builds.