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

[BUG] Segfault triggered in IJuliaExt when running Pkg.update() #5041

Closed
ajinkya-k opened this issue Jan 20, 2025 · 12 comments
Closed

[BUG] Segfault triggered in IJuliaExt when running Pkg.update() #5041

ajinkya-k opened this issue Jan 20, 2025 · 12 comments
Labels

Comments

@ajinkya-k
Copy link

I am getting a segfault when I ran Pkg.update() and it tried to precompile Plots.jl

Precompiling project...
  ✗ Plots
  ✗ Plots → FileIOExt
  ✗ Plots → IJuliaExt
  ✗ Plots → GeometryBasicsExt
  ✗ Plots → UnitfulExt
  83 dependencies successfully precompiled in 168 seconds. 361 already precompiled.
  5 dependencies errored.
  For a report of the errors see `julia> err`. To retry use `pkg> precompile`

julia> err
PkgPrecompileError: The following 5 direct dependencies failed to precompile:

IJuliaExt

Failed to precompile IJuliaExt [2f4121a4-3b3a-5ce6-9c5e-1f2673ce168a] to "/Users/ajinkya/.julia/compiled/v1.11/IJuliaExt/jl_A6c0Fe".
[41155] signal 11 (2): Segmentation fault: 11
in expression starting at none:0
gks_exit_handler at /Users/ajinkya/.julia/artifacts/3eeeb2e4ac7317a5dd5d1cbbf5fa2cf244e8833b/lib/libGR.dylib (unknown line)
__cxa_finalize_ranges at /usr/lib/system/libsystem_c.dylib (unknown line)
Allocations: 115729633 (Pool: 115725874; Big: 3759); GC: 45
ERROR: LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/Users/ajinkya/.julia/compiled/v1.11/Plots/jl_KLCerz".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [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}, loadable_exts::Nothing)
    @ Base ./loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [5] #mkpidlock#6
    @ ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [7] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [10] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [13] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [16] macro expansion
    @ ./loading.jl:2314 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [19] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [22] include
    @ ./Base.jl:557 [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::Nothing)
    @ Base ./loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at /Users/ajinkya/.julia/packages/Plots/Ec1L1/ext/IJuliaExt.jl:1
in expression starting at stdin:6
FileIOExt

Failed to precompile FileIOExt [f5f51d8f-5827-5d2e-939b-192fcd6ec70c] to "/Users/ajinkya/.julia/compiled/v1.11/FileIOExt/jl_vk4NEl".
[41199] signal 11 (2): Segmentation fault: 11
in expression starting at none:0
gks_exit_handler at /Users/ajinkya/.julia/artifacts/3eeeb2e4ac7317a5dd5d1cbbf5fa2cf244e8833b/lib/libGR.dylib (unknown line)
__cxa_finalize_ranges at /usr/lib/system/libsystem_c.dylib (unknown line)
Allocations: 115728449 (Pool: 115724687; Big: 3762); GC: 46
ERROR: LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/Users/ajinkya/.julia/compiled/v1.11/Plots/jl_P1XWl4".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [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}, loadable_exts::Nothing)
    @ Base ./loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [5] #mkpidlock#6
    @ ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [7] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [10] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [13] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [16] macro expansion
    @ ./loading.jl:2314 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [19] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [22] include
    @ ./Base.jl:557 [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::Nothing)
    @ Base ./loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at /Users/ajinkya/.julia/packages/Plots/Ec1L1/ext/FileIOExt.jl:1
in expression starting at stdin:6
@ajinkya-k ajinkya-k added the bug label Jan 20, 2025
@VictorVanthilt
Copy link

When installing Plots in an empty (new) project I also get this error.

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/REDACTED/.julia/compiled/v1.11/Plots/jl_uUKrFo".
[1693062] signal 11 (1): Segmentation fault
in expression starting at none:0
gks_exit_handler at /REDACTED/.julia/artifacts/f528001ccfd4e85b331e6d0150d1aff89a7eab65/lib/libGR.so (unknown line)
unknown function (ip: 0x730157e47a65)
exit at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/cli/loader_exe.c:61
unknown function (ip: 0x730157e2a1c9)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 115787482 (Pool: 115783648; Big: 3834); GC: 42

[1693062] signal 11 (1): Segmentation fault
in expression starting at none:0
gks_exit_handler at /REDACTED/.julia/artifacts/f528001ccfd4e85b331e6d0150d1aff89a7eab65/lib/libGR.so (unknown line)
unknown function (ip: 0x730157e47a65)
exit at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
main at /cache/build/tester-amdci5-12/julialang/julia-release-1-dot-11/cli/loader_exe.c:61
unknown function (ip: 0x730157e2a1c9)
__libc_start_main at /lib/x86_64-linux-gnu/libc.so.6 (unknown line)
unknown function (ip: 0x4010b8)
Allocations: 115787482 (Pool: 115783648; Big: 3834); GC: 42

@hurak
Copy link

hurak commented Jan 20, 2025

Pretty much the same here:

julia> versioninfo()
Julia Version 1.11.2
Commit 5e9a32e7af2 (2024-12-01 20:02 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin24.0.0)
  CPU: 8 × Apple M2
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, apple-m2)
Threads: 1 default, 0 interactive, 1 GC (on 4 virtual cores)
Environment:
  DYLD_LIBRARY_PATH = /Library/knitro/lib
(tmp_plots) pkg> st
Status `~/Documents/julia/tmp_plots/Project.toml`
  [91a5bcdd] Plots v1.40.9
julia> err
PkgPrecompileError: The following 2 direct dependencies failed to precompile:

UnitfulExt 

Failed to precompile UnitfulExt [0e51ec96-f580-5f12-a625-1297083d7970] to "/Users/hurak/.julia/compiled/v1.11/UnitfulExt/jl_zNQXSv".
[2330] signal 11 (2): Segmentation fault: 11
in expression starting at none:0
gks_exit_handler at /Users/hurak/.julia/artifacts/3eeeb2e4ac7317a5dd5d1cbbf5fa2cf244e8833b/lib/libGR.dylib (unknown line)
__cxa_finalize_ranges at /usr/lib/system/libsystem_c.dylib (unknown line)
Allocations: 115810254 (Pool: 115806467; Big: 3787); GC: 45
ERROR: LoadError: Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/Users/hurak/.julia/compiled/v1.11/Plots/jl_nXUSOR".
Stacktrace:
  [1] error(s::String)
    @ Base ./error.jl:35
  [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}, loadable_exts::Nothing)
    @ Base ./loading.jl:3174
  [3] (::Base.var"#1110#1111"{Base.PkgId})()
    @ Base ./loading.jl:2579
  [4] mkpidlock(f::Base.var"#1110#1111"{Base.PkgId}, at::String, pid::Int32; kwopts::@Kwargs{stale_age::Int64, wait::Bool})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:95
  [5] #mkpidlock#6
    @ ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:90 [inlined]
  [6] trymkpidlock(::Function, ::Vararg{Any}; kwargs::@Kwargs{stale_age::Int64})
    @ FileWatching.Pidfile ~/.julia/juliaup/julia-1.11.2+0.aarch64.apple.darwin14/share/julia/stdlib/v1.11/FileWatching/src/pidfile.jl:116
  [7] #invokelatest#2
    @ ./essentials.jl:1057 [inlined]
  [8] invokelatest
    @ ./essentials.jl:1052 [inlined]
  [9] maybe_cachefile_lock(f::Base.var"#1110#1111"{Base.PkgId}, pkg::Base.PkgId, srcpath::String; stale_age::Int64)
    @ Base ./loading.jl:3698
 [10] maybe_cachefile_lock
    @ ./loading.jl:3695 [inlined]
 [11] _require(pkg::Base.PkgId, env::String)
    @ Base ./loading.jl:2565
 [12] __require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2388
 [13] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [14] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [15] _require_prelocked(uuidkey::Base.PkgId, env::String)
    @ Base ./loading.jl:2375
 [16] macro expansion
    @ ./loading.jl:2314 [inlined]
 [17] macro expansion
    @ ./lock.jl:273 [inlined]
 [18] __require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2271
 [19] #invoke_in_world#3
    @ ./essentials.jl:1089 [inlined]
 [20] invoke_in_world
    @ ./essentials.jl:1086 [inlined]
 [21] require(into::Module, mod::Symbol)
    @ Base ./loading.jl:2260
 [22] include
    @ ./Base.jl:557 [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::Nothing)
    @ Base ./loading.jl:2881
 [24] top-level scope
    @ stdin:6
in expression starting at /Users/hurak/.julia/packages/Plots/Ec1L1/ext/UnitfulExt.jl:4
in expression starting at stdin:6
Plots 

Failed to precompile Plots [91a5bcdd-55d7-5caf-9e0b-520d859cae80] to "/Users/hurak/.julia/compiled/v1.11/Plots/jl_xR7aXc".
[2327] signal 11 (2): Segmentation fault: 11
in expression starting at none:0
gks_exit_handler at /Users/hurak/.julia/artifacts/3eeeb2e4ac7317a5dd5d1cbbf5fa2cf244e8833b/lib/libGR.dylib (unknown line)
__cxa_finalize_ranges at /usr/lib/system/libsystem_c.dylib (unknown line)
Allocations: 115795466 (Pool: 115791680; Big: 3786); GC: 45

@MasonProtter
Copy link

I'm also hitting this

@fhagemann
Copy link
Contributor

+1, failing some GitHub Actions that require Plots for the documentation build

@oameye
Copy link

oameye commented Jan 20, 2025

if I downgrade to [email protected], it works again.

@fhagemann
Copy link
Contributor

Yes, it seems to be related to [email protected]
jheinen/GR.jl#556

@ajinkya-k
Copy link
Author

Downgrading to [email protected] worked for me as well

@dgomezcastro
Copy link

+1 on macOS. Downgrading seems to fix it

@Azendae-Popo
Copy link

Downgrading to [email protected] worked for me as well

Downgrading to [email protected] didn't work for me 😞

@AronT-TLV
Copy link

AronT-TLV commented Jan 20, 2025

+1 on MacOSx. Downgrading GR solved the problem

@sprague252
Copy link

sprague252 commented Jan 20, 2025

If I use juliaup to install and run Julia v1.10.7, Plots builds successfully in an empty project (on Mac OS X).

@ajinkya-k
Copy link
Author

I guess we can close this now that GR release v0.73.12 is available. See resolution here: jheinen/GR.jl#556

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants