Pluto.jl: Segmentation faults on Julia 1.7 M1
Edit from @fonsp
If you are also experiencing segmentation faults with Pluto on Julia 1.7, please post it here! Be sure to provide the following info:
- a notebook file (the smaller, the better)
- what did you do to produce the error? Is it consistent?
- the output of running
versioninfo() - the full output of your terminal, including the segmentation fault
- Run the notebook as a julia script without Pluto, i.e.
julia my_notebook.jl. Does it still error?
Original issue
The notebook MLJ-Ex6.jl.zip causes a segmentation fault (see full output and error message in ‘Details’) when using Pluto on Julia 1.7 (macOS Monterey 12.0.1, Apple M1).
The statement, where the error occurs after loading, is marked in the notebook.
It runs without problems on:
- Julia 1.6.1 & Pluto
- Julia 1.6.1 & REPL
- Julia 1.7 & REPL
This may indicate that it is a Pluto problem. But as we have already seen in #1658 (and MLJ.jl#865) it might be also a problem of MLJ which is used in the notebook.
`
From worker 9: [ Info: For silent loading, specify `verbosity=0`.
From worker 9: import MLJLinearModels ✔
From worker 9:
From worker 9: signal (11): Segmentation fault: 11
From worker 9: in expression starting at none:1
From worker 9: ntuple at ./ntuple.jl:0
From worker 9: unknown function (ip: 0x1182de6cf)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: getindex at ./range.jl:373 [inlined]
From worker 9: check_supervised at /Users/roland/.julia/packages/MLJBase/QXObv/src/machines.jl:128
From worker 9: #check#92 at /Users/roland/.julia/packages/MLJBase/QXObv/src/machines.jl:185 [inlined]
From worker 9: check##kw at /Users/roland/.julia/packages/MLJBase/QXObv/src/machines.jl:185 [inlined]
From worker 9: #machine#100 at /Users/roland/.julia/packages/MLJBase/QXObv/src/machines.jl:311 [inlined]
From worker 9: machine at /Users/roland/.julia/packages/MLJBase/QXObv/src/machines.jl:310 [inlined]
From worker 9: ##function_wrapped_cell#333 at /Users/roland/Desktop/MLJ-Ex6.jl#==#0798b952-eb9f-401e-8247-85326f72cfa7:1 [inlined]
From worker 9: ##function_wrapped_cell#333 at ./none:0
From worker 9: unknown function (ip: 0x1182db60b)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: jl_f__call_latest at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: #invokelatest#2 at ./essentials.jl:716
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: invokelatest at ./essentials.jl:714
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: compute at /Users/roland/.julia/packages/Pluto/7TMtD/src/runner/PlutoRunner.jl:380
From worker 9: #27 at /Users/roland/.julia/packages/Pluto/7TMtD/src/runner/PlutoRunner.jl:535
From worker 9: run_inside_trycatch at /Users/roland/.julia/packages/Pluto/7TMtD/src/runner/PlutoRunner.jl:420
From worker 9: #run_expression#25 at /Users/roland/.julia/packages/Pluto/7TMtD/src/runner/PlutoRunner.jl:535
From worker 9: run_expression##kw at /Users/roland/.julia/packages/Pluto/7TMtD/src/runner/PlutoRunner.jl:450
From worker 9: unknown function (ip: 0x11810fa97)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: do_call at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: eval_body at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: jl_interpret_toplevel_thunk at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: jl_toplevel_eval_in at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: eval at ./boot.jl:373
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: #103 at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:274
From worker 9: run_work_thunk at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63
From worker 9: unknown function (ip: 0x11802c89b)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: run_work_thunk at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:72
From worker 9: #96 at ./task.jl:423
From worker 9: unknown function (ip: 0x11802c27f)
From worker 9: jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: start_task at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
From worker 9: Allocations: 159110384 (Pool: 159057943; Big: 52441); GC: 104
Worker 9 terminated.
Unhandled Task ERROR: IOError: read: connection reset by peer (ECONNRESET)
Stacktrace:
[1] wait_readnb(x::Sockets.TCPSocket, nb::Int64)
@ Base ./stream.jl:408
[2] (::Base.var"#wait_locked#645")(s::Sockets.TCPSocket, buf::IOBuffer, nb::Int64)
@ Base ./stream.jl:894
[3] unsafe_read(s::Sockets.TCPSocket, p::Ptr{UInt8}, nb::UInt64)
@ Base ./stream.jl:900
[4] unsafe_read
@ ./io.jl:724 [inlined]
[5] unsafe_read(s::Sockets.TCPSocket, p::Base.RefValue{NTuple{4, Int64}}, n::Int64)
@ Base ./io.jl:723
[6] read!
@ ./io.jl:725 [inlined]
[7] deserialize_hdr_raw
@ /Applications/Julia- 1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Distributed/src/messages.jl:167 [inlined]
[8] message_handler_loop(r_stream::Sockets.TCPSocket, w_stream::Sockets.TCPSocket, incoming::Bool)
@ Distributed /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:165
[9] process_tcp_streams(r_stream::Sockets.TCPSocket, w_stream::Sockets.TCPSocket, incoming::Bool)
@ Distributed /Applications/Julia-1.7.app/Contents/Resources/julia/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:126
[10] (::Distributed.var"#99#100"{Sockets.TCPSocket, Sockets.TCPSocket, Bool})()
@ Distributed ./task.jl:423
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 15 (5 by maintainers)
Commits related to this issue
- Merge tag 'v0.18.0' into what-if-distrubuted2 > Try this release in your browser! _(Available 30 minutes after the release)_ > > <a href="https://binder.plutojl.org/v0.18.0/"><img alt="Binder logo" s... — committed to fonsp/Pluto.jl by pankgeorg 2 years ago
- Merge tag 'v0.18.0' into pluto-events-interface-0.18 > Try this release in your browser! _(Available 30 minutes after the release)_ > > <a href="https://binder.plutojl.org/v0.18.0/"><img alt="Binder ... — committed to fonsp/Pluto.jl by pankgeorg 2 years ago
Awesome! In that case, it looks like this will be fixed by Julia 1.8, which will be released in a couple of months. Until then, we recommend using Julia x86! The M1 build is still too experimental.
Thanks for opening the issue and for the useful testing!! Let us know if something comes up again!
About the new issue, always open a new issue! (And check for existing ones)
I think our goal is to try to create a MWE to send to the Julia developers. The main differences between running the notebook in Pluto and running it as a standalone script with
julia notebook.jlare:MainYou can emulate this environment without Pluto like so:
The notebook 02-worldmap-AoG.jl.zip, which doesn’t use MLJ at all, causes the segmentation fault mentioned above too. So the problem isn’t related to MLJ.
The notebook reads
Shapefiles, describing the outline of all countries, and plots them usingMakie/AlgebraOfGraphics. The segmentation fault occurs on the last cell, when the plot is rendered (usingdraw).The circumstances when the problem occurs are a bit strange again. In a first version of the notebook I used
CairoMakieinstead ofGLMakie(–>usingstatement in the first cell). That version worked without problems. After changingCairoMakietoGLMakiethe segmentation fault occurred. But it remained even after changing back toCairoMakie.Further observations:
It seems to me that the whole issue is related to https://github.com/JuliaLang/julia/issues/41440.
Versioninfo:
Julia Version 1.7.0 Commit 3bf9d17731 (2021-11-30 12:12 UTC) Platform Info: OS: macOS (arm64-apple-darwin21.1.0) CPU: Apple M1 Pro WORD_SIZE: 64 LIBM: libopenlibm LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)
Complete error message: