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

Segmentation faults on Julia 1.7 M1 #1722

Closed
roland-KA opened this issue Dec 2, 2021 · 15 comments
Closed

Segmentation faults on Julia 1.7 M1 #1722

roland-KA opened this issue Dec 2, 2021 · 15 comments
Labels
display & PlutoRunner & AbstractPlutoDingetjes.jl other packages Integration with other Julia packages

Comments

@roland-KA
Copy link

roland-KA commented Dec 2, 2021

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
@roland-KA
Copy link
Author

The notebook MLJ-Ex8.jl.zip does basically the same as the notebook MLJ-Ex6.jl mentioned above:

  • It loads some data from a repository
  • loads a MLJ model
  • binds the data to the model using the function machine ... and crashes on Julia 1.7 & Pluto (but runs in the three other environments mentioned above).

So the issue is reproducible independent of the data and the model used. It crashes on using machine.

@fonsp
Copy link
Owner

fonsp commented Dec 4, 2021

Thanks! It would be really helpful if you can narrow down on which part of the notebook causes the segfault. This means removing more and more code, making the notebook as small as possible, while still producing the segfault. This will really help us, and the developers of MLJ to fix it!

@fonsp fonsp added other packages Integration with other Julia packages display & PlutoRunner & AbstractPlutoDingetjes.jl labels Dec 4, 2021
@roland-KA
Copy link
Author

The notebook MinimalExample.jl.zip ist the most minimal example I could create to reproduce the segmentation fault. I've also tried to replace the second cell, where data is loaded from an external repository by just creating some artificial data locally. But then the error didn't occur any more.

And things are starting to get a bit weird, because the error doesn't occur in all runs of this notebook, but in most runs (> 70% of about 30 runs). So the thing isn't deterministic 🙄. The same seems to be true for the notebook MLJ-Ex6.jl which I uploaded before, whereas MLJ-Ex8.jl seems to crash on each run.

It seems that the error is reproducible when I wait a few seconds between each run, whereas restarting the notebook directly after shutting down the notebook process of the last run results mostly in a correct execution. This would also fit to the observation that the error occurs when data is loaded externally, which takes just more time than creating it locally. ... but all of this is just an impression, I don't have hard evidence.

I know that this seems more like voodoo than computer science. But it's the situation, I've experienced 🤷‍♂️.

@roland-KA
Copy link
Author

The machine on which I did the tests is relatively new (about 2 weeks). So the environment is quite clean. But before installing Julia 1.7, I had a 1.7RC2-version installed for trying a few things.

When I installed 1.7, I removed everything from 1.7RC7 to obtain a clean Julia installation. I deleted the the 1.7RC application as well as the .julia directory. But in the meantime I've noticed that Julia (cacheing compiled code?) or Pluto (for temporary environments?) stores also data in the directory /private/var/folders/_c/77t52xx165q7y8c2mcccm3000000gn/T on a Mac.

I assume that all files and directories with the prefix jl_ in that place are Julia-related. But I'm not sure. If anyone could tell me, which data I have to delete in order to get a really clean installation of Julia, I would do that and repeat the tests with the erroneous notebooks mentioned above.

@roland-KA
Copy link
Author

Using the new Pluto 0.17.3 version, I did some additional tests:

  • Out of 20 runs of MinimalExample.jl

    • 6 crashed with the segmentation fault (on executing the machine function)
    • 14 run without problems
  • On running MLJ-Ex8.j

    • the first run crashed with the segmentation fault (on executing the statement tuned_mach = machine(tuned_model, XHouse, yHouse)
    • the second run executed this statement but got stuck on the following cell (fit!(tuned_mach)), which didn't terminate any more. Using the REPL this statement takes about 2 minutes to execute. I stopped the execution on this run in the Pluto notebook after about 30 minutes (btw: cpu usage is quite low while this statement runs without terminating). So this seems to be more like the issue described in pluto takes forever to run notebook.... #1657 .

@roland-KA
Copy link
Author

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 using Makie/AlgebraOfGraphics. The segmentation fault occurs on the last cell, when the plot is rendered (using draw).

The circumstances when the problem occurs are a bit strange again. In a first version of the notebook I used CairoMakie instead of GLMakie (--> using statement in the first cell). That version worked without problems. After changing CairoMakie to GLMakie the segmentation fault occurred. But it remained even after changing back to CairoMakie.

Further observations:

  • The notebook runs without problems using the REPL.
  • The notebook crashes when running within the REPL using VSCode (the REPL-window disappears so fast that I cannot see the error message).

It seems to me that the whole issue is related to JuliaLang/julia#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:
    From worker 3:	signal (11): Segmentation fault: 11
      From worker 3:	in expression starting at none:1
      From worker 3:	ntuple at ./ntuple.jl:0 [inlined]
      From worker 3:	argument_names at 

/Users/roland/.julia/packages/MakieCore/S8PkO/src/recipes.jl:49
      From worker 3:	getindex at /Users/roland/.julia/packages/MakieCore/S8PkO/src/attributes.jl:189
      From worker 3:	getproperty at /Users/roland/.julia/packages/MakieCore/S8PkO/src/attributes.jl:83 [inlined]
      From worker 3:	plot! at /Users/roland/.julia/packages/Makie/gQOQF/src/basic_recipes/poly.jl:116
      From worker 3:	plot! at /Users/roland/.julia/packages/Makie/gQOQF/src/interfaces.jl:428
      From worker 3:	unknown function (ip: 0x10c161713)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	#plot!#159 at /Users/roland/.julia/packages/Makie/gQOQF/src/interfaces.jl:339
      From worker 3:	unknown function (ip: 0x10c15cd3b)
      From worker 3:	plot! at /Users/roland/.julia/packages/Makie/gQOQF/src/interfaces.jl:308
      From worker 3:	unknown function (ip: 0x10c15c54f)
      From worker 3:	#plot!#331 at /Users/roland/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:658
      From worker 3:	plot! at /Users/roland/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:653 [inlined]
      From worker 3:	#plot!#332 at /Users/roland/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:670 [inlined]
      From worker 3:	plot!##kw at /Users/roland/.julia/packages/Makie/gQOQF/src/makielayout/layoutables/axis.jl:669
      From worker 3:	unknown function (ip: 0x10c15890f)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	plot! at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/entries.jl:117
      From worker 3:	foreach at ./abstractarray.jl:2694
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	#plot!#112 at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:151
      From worker 3:	plot!##kw at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:150 [inlined]
      From worker 3:	#plot#113 at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:158
      From worker 3:	plot##kw at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:157 [inlined]
      From worker 3:	#draw#114 at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:174
      From worker 3:	draw##kw at /Users/roland/.julia/packages/AlgebraOfGraphics/uTcZk/src/algebra/layers.jl:174
      From worker 3:	unknown function (ip: 0x10bfa8837)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	##function_wrapped_cell#289 at /Users/roland/OneDrive - adviion GmbH/__Projekte/Julia/PlutoNB/CompThinkFa20/02-worldmap-AoG.jl#==#daa9d82d-9847-40ae-b9c9-c787afbcfcd8:1 [inlined]
      From worker 3:	##function_wrapped_cell#289 at ./none:0
      From worker 3:	unknown function (ip: 0x10bf843df)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	jl_f__call_latest at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	#invokelatest#2 at ./essentials.jl:716
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	invokelatest at ./essentials.jl:714
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	compute at /Users/roland/.julia/packages/Pluto/auhyB/src/runner/PlutoRunner.jl:380
      From worker 3:	#27 at /Users/roland/.julia/packages/Pluto/auhyB/src/runner/PlutoRunner.jl:535
      From worker 3:	run_inside_trycatch at /Users/roland/.julia/packages/Pluto/auhyB/src/runner/PlutoRunner.jl:420
      From worker 3:	#run_expression#25 at /Users/roland/.julia/packages/Pluto/auhyB/src/runner/PlutoRunner.jl:535
      From worker 3:	run_expression##kw at /Users/roland/.julia/packages/Pluto/auhyB/src/runner/PlutoRunner.jl:450
      From worker 3:	unknown function (ip: 0x10bf32a57)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_call at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	eval_body at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	jl_interpret_toplevel_thunk at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	jl_toplevel_eval_flex at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	jl_toplevel_eval_in at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	eval at ./boot.jl:373
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	do_apply at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	#103 at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:274
      From worker 3:	run_work_thunk at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:63
      From worker 3:	unknown function (ip: 0x10beb88ab)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	run_work_thunk at /Users/administrator/src/julia/usr/share/julia/stdlib/v1.7/Distributed/src/process_messages.jl:72
      From worker 3:	#96 at ./task.jl:423
      From worker 3:	unknown function (ip: 0x10beb828f)
      From worker 3:	jl_apply_generic at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	start_task at /Applications/Julia-1.7.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.7.dylib (unknown line)
      From worker 3:	Allocations: 205624910 (Pool: 205580436; Big: 44474); GC: 119
Worker 3 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

@fonsp fonsp changed the title Segmentation fault on Julia 1.7 Segmentation fault with MLJ on Julia 1.7 Dec 12, 2021
@fonsp fonsp changed the title Segmentation fault with MLJ on Julia 1.7 Segmentation faults on Julia 1.7 Dec 12, 2021
@fonsp fonsp changed the title Segmentation faults on Julia 1.7 Segmentation faults on Julia 1.7 M1 Dec 12, 2021
@fonsp
Copy link
Owner

fonsp commented Dec 12, 2021

Thanks again for the information! I have also been experiencing segfaults in Julia 1.7 M1, also in Pkg.jl. Can you verify that the segfaults only happen on Julia 1.7 M1? Try running the notebook with Julia 1.7 x86, running through Rosetta.

@fonsp
Copy link
Owner

fonsp commented Dec 12, 2021

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.jl are:

  • We evaluate code on a Distributed process
  • We evaluate code inside a module, not inside Main

You can emulate this environment without Pluto like so:

using Distributed
ps = Distributed.addprocs(1)

Distributed.remotecall_eval(Main, ps, quote
module Test
include("mynotebook.jl")
end
end)

@roland-KA
Copy link
Author

Hi @fonsp I've tested today all the notebooks I mentioned above on a 'real' x86 System:

  • MLJ-Ex6.jl (2 runs)
  • MLJ-Ex8.jl (2 runs)
  • MinimalExample.jl (2 runs)
  • 02-worldmap-AoG.jl (2 runs with GLMakie, 2 runs with CairoMakie)

All runs executed without problems. Switching back and forth on the last notebook between GLMakie and CairoMakie, didn't cause any problems either.

So the issue seems to be limited to the M1 platform.

Versioninfo:
Julia Version 1.7.0
Commit 3bf9d17731 (2021-11-30 12:12 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, skylake)
Environment:
JULIA_REVISE_WORKER_ONLY = 1

@roland-KA
Copy link
Author

As there is a new Julia version (1.7.1), I've tested the above mentioned notebooks again with the following results:

Notebook 1st run after restart
MinimalExample.jl ok
MLJ-Ex6.jl segmentation fault segmentation fault
MLJ-Ex8.jl segmentation fault segmentation fault
02-worldmap-AoG.jl segmentation fault ok

So there is no improvement up to now.

Versioninfo

Julia Version 1.7.1
Commit ac5cc99908 (2021-12-22 19:35 UTC)
Platform Info:
OS: macOS (arm64-apple-darwin21.2.0)
CPU: Apple M1
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-12.0.1 (ORCJIT, cyclone)

@roland-KA
Copy link
Author

You can emulate this environment without Pluto like so:

using Distributed
ps = Distributed.addprocs(1)

Distributed.remotecall_eval(Main, ps, quote
module Test
include("mynotebook.jl")
end
end)

@fonsp when I try to emulate a notebook in this way, I get an error message after the Distributed.remotecall_eval ... statement as follows:

ERROR: On worker 2: syntax: "module" expression not at top level

What am I doing wrong?

@fonsp
Copy link
Owner

fonsp commented Jan 24, 2022

This might be fixed by JuliaLang/julia#43664 . Can you try building Julia from master and seeing if that fixes it?

@roland-KA
Copy link
Author

I've built Julia from master and tested the above mentioned examples again.

Versioninfo
Julia Version 1.8.0-DEV.1390
Commit de21be7f7b (2022-01-25 18:18 UTC)
Platform Info:
  OS: macOS (arm64-apple-darwin21.1.0)
  CPU: Apple M1
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.0 (ORCJIT, cyclone)

Before doing these tests, I've run the Julia test suite (make testall) with the following results (perhaps some folks working on JuliaLang/julia#43664 may be interested):

make testall --> test summary
Test Summary:                       |     Pass  Fail  Error  Broken     Total       Time
  Overall                           | 40060544     5      3  352652  40413204  614m49.2s
    LinearAlgebra/qr                |     4700                           4700    1m22.6s
    LinearAlgebra/schur             |      496                            496    1m55.5s
    LinearAlgebra/matmul            |     1106                           1106    3m19.7s
    LinearAlgebra/dense             |     8475                           8475    4m14.3s
    LinearAlgebra/eigen             |      512                            512      59.6s
    LinearAlgebra/bunchkaufman      |     5688                           5688      28.7s
    LinearAlgebra/special           |     2911                           2911    1m56.0s
    LinearAlgebra/lapack            |      803                            803      40.8s
    LinearAlgebra/svd               |      566                            566    1m08.4s
    LinearAlgebra/tridiag           |     1541                           1541    1m10.0s
    LinearAlgebra/cholesky          |     2476                           2476    1m23.7s
    LinearAlgebra/bidiag            |     3768                           3768    3m13.2s
    LinearAlgebra/lu                |     1367                           1367    1m25.9s
    LinearAlgebra/triangular        |    37870                          37870    9m24.3s
    LinearAlgebra/generic           |      585                            585      58.4s
    LinearAlgebra/uniformscaling    |      446                            446    1m16.3s
    LinearAlgebra/lq                |     2938                           2938    4m04.3s
    LinearAlgebra/blas              |      756                            756    4m16.4s
    LinearAlgebra/diagonal          |     2768                           2768   13m10.0s
    LinearAlgebra/symmetric         |     2823                           2823   10m14.5s
    LinearAlgebra/hessenberg        |      604                   11       615    8m14.4s
    LinearAlgebra/givens            |     1847                           1847      28.3s
    LinearAlgebra/pinv              |      292                            292    1m20.5s
    LinearAlgebra/ldlt              |        8                              8      12.6s
    LinearAlgebra/factorization     |       80                   16        96      44.1s
    ambiguous                       |      107                    2       109      27.0s
    LinearAlgebra/adjtrans          |      347                            347    3m46.5s
    compiler/validation             |       28                             28       6.0s
    compiler/ssair                  |       40                             40      32.3s
    compiler/irpasses               |      107                    2       109      30.7s
    compiler/inference              |     1177                    2      1179    2m19.6s
    compiler/inline                 |      108                            108      17.5s
    LinearAlgebra/structuredbroadcast |      670                            670    5m40.2s
    compiler/contextual             |       12                             12      44.6s
    strings/basic                   |    87676                          87676    1m17.1s
    strings/search                  |      876                            876      22.5s
    compiler/codegen                |      169                            169    3m10.0s
    strings/util                    |     1147                           1147      45.3s
    strings/io                      |    12764                          12764      32.9s
    unicode/utf8                    |       19                             19       1.2s
    strings/types                   |  2302691                        2302691      21.9s
    worlds                          |       88                             88      16.8s
    atomics                         |     3448                           3448      45.0s
    keywordargs                     |      151                            151      11.3s
    numbers                         |  1578758                    2   1578760   10m58.2s
    subtype                         |   337674                   19    337693    2m13.6s
    char                            |     1628                           1628      47.7s
    triplequote                     |       29                             29       1.8s
    intrinsics                      |      301                            301      43.8s
    dict                            |   144420                         144420    9m01.4s
    hashing                         |    12519                          12519    3m22.5s
    iobuffer                        |      209                            209      11.3s
    staged                          |       64                             64      25.3s
    offsetarray                     |      487                    3       490   12m38.1s
    core                            |  8445918                    3   8445921   47m26.4s
    tuple                           |      631                            631    3m19.1s
    reduce                          |     8588                           8588    8m39.1s
    subarray                        |   318316                         318316   63m05.7s
    LinearAlgebra/addmul            |     6552                           6552   84m59.5s
    arrayops                        |     2023                    2      2025   37m31.0s
    intfuncs                        |   227924                         227924    3m13.6s
    simdloop                        |      240                            240      52.7s
    reducedim                       |     1089                    6      1095   23m29.6s
    vecelement                      |      678                            678    2m46.3s
    copy                            |      533                            533    1m08.2s
    rational                        |    98639                    1     98640    7m23.0s
    fastmath                        |      946                            946    2m08.1s
    functional                      |       98                             98    6m07.3s
    math                            |  1722140                        1722140   13m14.7s
    abstractarray                   |    55406                24795     80201   39m27.5s
    operators                       |    13040                          13040    7m05.4s
    ordering                        |       37                             37    5m36.7s
    path                            |      373                   12       385    1m43.2s
    parse                           |    16098                          16098    5m56.6s
    ccall                           |   165113                    1    165114    9m58.3s
    gmp                             |     2357                           2357    4m05.6s
    loading                         |   147489                         147489    9m40.9s
    spawn                           |      248                    4       252    5m45.7s
    backtrace                       |       38                    1        39    1m23.8s
    exceptions                      |       70                             70    1m43.9s
    file                            |     1073                           1073    4m13.3s
    read                            |     3872                           3872   10m38.0s
    version                         |     2452                           2452      53.8s
    namedtuple                      |      215                            215    2m13.4s
    mpfr                            |     1135                    1      1136    4m06.0s
    iterators                       |    10164                          10164   74m19.8s
    complex                         |     8432                    5      8437    5m59.0s
    floatapprox                     |       49                             49      26.8s
    reflection                      |      415                            415    3m05.3s
    regex                           |      130                            130    1m00.8s
    float16                         |   762093                         762093    3m03.8s
    combinatorics                   |      170                            170    1m22.6s
    sysinfo                         |        4                              4       3.9s
    env                             |       71                             71       9.4s
    rounding                        |   112720                         112720    6m10.5s
    bitarray                        |   913902                         913902  109m17.2s
    mod2pi                          |       80                             80      30.3s
    euler                           |       12                             12    1m55.1s
    sorting                         |    16098                    9     16107   79m09.8s
    client                          |        5                              5    1m26.3s
    errorshow                       |      237                            237    5m35.2s
    broadcast                       |      511                            511   67m23.8s
    goto                            |       19                             19       2.6s
    llvmcall                        |       19                             19    1m29.9s
    llvmcall2                       |        7                              7       1.0s
    ryu                             |    31215                          31215      47.6s
    some                            |       72                             72    1m01.5s
    meta                            |       69                             69    1m37.1s
    show                            |   128881                    8    128889   32m56.0s
    stacktraces                     |       48                             48    2m28.6s
    sets                            |     3594                    1      3595   24m39.4s
    docs                            |      238                            238    4m41.7s
    binaryplatforms                 |      341                            341    4m51.8s
    ranges                          | 12110666               327682  12438348   44m13.0s
    atexit                          |       40                             40    4m36.5s
    enums                           |       99                             99    1m52.4s
    interpreter                     |        3                              3      29.5s
    checked                         |     1239                           1239    1m51.9s
    int                             |   524698                         524698    3m59.1s
    bitset                          |      195                            195    1m47.8s
    boundscheck                     |                                    None      24.6s
    error                           |       31                             31    1m07.5s
    misc                            |  1282243                        1282243   17m00.8s
    osutils                         |       43                             43       8.2s
    cartesian                       |      343                    3       346    7m38.7s
    iostream                        |       50                             50      56.1s
    secretbuffer                    |       27                             27    3m51.4s
    specificity                     |      175                            175       4.2s
    channels                        |      258                            258   11m13.6s
    floatfuncs                      |      232                            232   17m54.0s
    corelogging                     |      231                            231    1m58.1s
    syntax                          |     1560                    1      1561    5m50.4s
    cmdlineargs                     |      270                    3       273   29m36.7s
    smallarrayshrink                |       36                             36       7.7s
    reinterpretarray                |      317                            317   10m36.1s
    opaque_closure                  |       42                    1        43      23.9s
    download                        |                                    None      20.0s
    filesystem                      |        6                              6    1m34.0s
    asyncmap                        |      307                            307    6m52.6s
    missing                         |      574                    1       575   15m11.5s
    LibGit2/online                  |       10                             10      58.8s
    LibGit2/libgit2                 |      754                            754   20m17.1s
    Dates/accessors                 |  7723858                        7723858   10m08.5s
    Dates/adjusters                 |     3149                           3149    5m37.3s
    Dates/query                     |     1004                           1004      48.1s
    Dates/periods                   |      953                            953   26m16.5s
    Dates/ranges                    |   350637                         350637   18m59.1s
    Dates/rounding                  |      315                            315    3m16.7s
    Dates/types                     |      232                            232    1m13.7s
    Dates/io                        |      331                            331   14m37.2s
    Dates/arithmetic                |      385                            385   13m46.4s
    Dates/conversions               |      161                            161      28.7s
    ArgTools                        |      180                            180    7m27.5s
    Artifacts                       |     1452                           1452    3m50.5s
    Base64                          |     2022                           2022    4m32.5s
    CRC32c                          |      664                            664    1m00.4s
    CompilerSupportLibraries_jll    |        4                              4      34.6s
    DelimitedFiles                  |       89                             89    6m13.7s
    SparseArrays/higherorderfns     |     7145                    1      7146  156m14.9s
    Downloads                       |      238                            238   14m07.4s
    Future                          |                                    None       0.5s
    GMP_jll                         |        1                              1      16.4s
    FileWatching                    |      515                            515   18m17.6s
    LLVMLibUnwind_jll               |        7                              7      12.3s
    LazyArtifacts                   |        4                              4    2m06.1s
    LibCURL                         |        6                              6      37.6s
    LibCURL_jll                     |        1                              1       7.0s
    LibGit2_jll                     |        2                              2      51.9s
    LibSSH2_jll                     |                                    None       0.8s
    LibUV_jll                       |        1                              1      26.5s
    LibUnwind_jll                   |                                    None       9.5s
    Libdl                           |       76                    1        77      52.4s
    Logging                         |       40                             40    3m37.0s
    MPFR_jll                        |        1                              1      22.7s
    InteractiveUtils                |      279                            279   25m13.8s
    MbedTLS_jll                     |        1                              1       3.5s
    Markdown                        |      257                            257    7m28.3s
    MozillaCACerts_jll              |        1                              1       0.2s
    NetworkOptions                  |     3518                           3518    1m33.2s
    OpenBLAS_jll                    |        1                              1      13.1s
    OpenLibm_jll                    |        1                              1       6.2s
    PCRE2_jll                       |        2                              2       6.0s
    SparseArrays/sparsevector       |    10348                    4     10352  244m13.9s
    Printf                          |     1014                           1014   16m21.7s
    Mmap                            |      139     1                      140   85m20.9s
    Profile                         |      107                            107   11m42.3s
    Random                          |   204291                         204291    1m22.6s
    SHA                             |      107                            107    1m16.5s
    Serialization                   |      126                    1       127      26.2s
    Sockets                         |      172                            172      21.1s
    Statistics                      |      801                            801    3m44.5s
    SuiteSparse                     |     1285                           1285    9m06.0s
    SuiteSparse_jll                 |        1                              1      16.2s
    REPL                            |     1346                    4      1350   18m22.9s
    TOML                            |      415                    8       423    1m50.5s
    Test                            |      453                   17       470    6m51.8s
    UUIDs                           |     1029                           1029      17.0s
    Unicode                         |      776                            776      37.5s
    Zlib_jll                        |        1                              1       6.7s
    dSFMT_jll                       |        1                              1       5.8s
    libLLVM_jll                     |        1                              1       3.7s
    libblastrampoline_jll           |        1                              1       3.3s
    nghttp2_jll                     |        1                              1       1.7s
    p7zip_jll                       |        1                              1       0.1s
    Tar                             |     3014                   11      3025   14m50.8s
    Pkg                             |     2359     4      2       2      2367  125m35.1s
    SparseArrays/sparse             |     4299                           4299  320m00.0s
    precompile                      |      133                    6       139      25.8s
    SharedArrays                    |      114                            114      16.7s
    threads                         |       30            1                31   10m51.2s
    Distributed                     |       12                             12    1m35.8s
    stress                          |      118                            118       9.2s
    FAILURE

The global RNG seed was 0xf8b74eb8ea4aa8f6f66b257ba061cc8a.
make testall --> error messages
Error in testset Mmap:
Test Failed at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Mmap/test/runtests.jl:293
  Expression: m[1] === 0x0a
   Evaluated: 0x00 === 0x0a
Error in testset Pkg:
Test Failed at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1048
  Expression: pkg.source == joinpath(#= /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1048 =# @__DIR__(), "test_packages", "A", "dev", "C")
   Evaluated: "/Users/roland/julia/stdlib/Pkg-66482586effc01a5c82b107e4e8f8a688407acdc/test/test_packages/A/dev/C" == "/Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/test_packages/A/dev/C"
Error in testset Pkg:
Test Failed at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1051
  Expression: pkg.source == joinpath(#= /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1051 =# @__DIR__(), "test_packages", "A", "dev", "B")
   Evaluated: "/Users/roland/julia/stdlib/Pkg-66482586effc01a5c82b107e4e8f8a688407acdc/test/test_packages/A/dev/B" == "/Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/test_packages/A/dev/B"
Error in testset Pkg:
Test Failed at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1054
  Expression: pkg.source == joinpath(#= /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:1054 =# @__DIR__(), "test_packages", "A", "dev", "D")
   Evaluated: "/Users/roland/julia/stdlib/Pkg-66482586effc01a5c82b107e4e8f8a688407acdc/test/test_packages/A/dev/D" == "/Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/test_packages/A/dev/D"
Error in testset Pkg:
Test Failed at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:2804
  Expression: meta !== nothing
   Evaluated: nothing !== nothing
Error in testset Pkg:
Error During Test at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:2767
  Got exception outside of a @test
  MethodError: no method matching getindex(::Nothing, ::String)
  Stacktrace:
    [1] (::Main.Test69Main_Pkg.PkgTests.NewTests.var"#714#719"{Main.Test69Main_Pkg.PkgTests.NewTests.var"#get_manifest_block#718", String, String})()
      @ Main.Test69Main_Pkg.PkgTests.NewTests ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:2806
    [2] (::Main.Test69Main_Pkg.PkgTests.Utils.var"#6#7"{Bool, Main.Test69Main_Pkg.PkgTests.NewTests.var"#714#719"{Main.Test69Main_Pkg.PkgTests.NewTests.var"#get_manifest_block#718", String, String}})()
      @ Main.Test69Main_Pkg.PkgTests.Utils ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/utils.jl:79
    [3] withenv(::Main.Test69Main_Pkg.PkgTests.Utils.var"#6#7"{Bool, Main.Test69Main_Pkg.PkgTests.NewTests.var"#714#719"{Main.Test69Main_Pkg.PkgTests.NewTests.var"#get_manifest_block#718", String, String}}, ::Pair{String, Nothing}, ::Vararg{Pair{String, Nothing}})
      @ Base ./env.jl:172
    [4] isolate(fn::Main.Test69Main_Pkg.PkgTests.NewTests.var"#714#719"{Main.Test69Main_Pkg.PkgTests.NewTests.var"#get_manifest_block#718", String, String}; loaded_depot::Bool, linked_reg::Bool)
      @ Main.Test69Main_Pkg.PkgTests.Utils ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/utils.jl:70
    [5] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:2783 [inlined]
    [6] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
    [7] top-level scope
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/new.jl:2769
    [8] include(mod::Module, _path::String)
      @ Base ./Base.jl:421
    [9] include
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:3 [inlined]
   [10] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:51 [inlined]
   [11] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1432 [inlined]
   [12] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:33 [inlined]
   [13] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
   [14] (::Main.Test69Main_Pkg.PkgTests.var"#1#2")()
      @ Main.Test69Main_Pkg.PkgTests ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:33
   [15] with_logstate(f::Function, logstate::Any)
      @ Base.CoreLogging ./logging.jl:511
   [16] with_logger(f::Function, logger::Base.CoreLogging.NullLogger)
      @ Base.CoreLogging ./logging.jl:623
   [17] top-level scope
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:31
   [18] include
      @ ./Base.jl:421 [inlined]
   [19] macro expansion
      @ ~/julia/test/testdefs.jl:24 [inlined]
   [20] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
   [21] macro expansion
      @ ~/julia/test/testdefs.jl:23 [inlined]
   [22] macro expansion
      @ ./timing.jl:439 [inlined]
   [23] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main ~/julia/test/testdefs.jl:21
   [24] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
      @ Base ./essentials.jl:733
   [25] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285
   [26] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:70
   [27] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285 [inlined]
   [28] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:476
Error in testset Pkg:
Error During Test at /Users/roland/julia/usr/share/julia/stdlib/v1.8/Pkg/test/artifacts.jl:313
  Got exception outside of a @test
  Package ArtifactInstallation errored during testing
  Stacktrace:
    [1] pkgerror(msg::String)
      @ Pkg.Types ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/Types.jl:67
    [2] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, julia_args::Cmd, test_args::Cmd, test_fn::Nothing, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool)
      @ Pkg.Operations ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1736
    [3] test(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; coverage::Bool, test_fn::Nothing, julia_args::Cmd, test_args::Cmd, force_latest_compatible_version::Bool, allow_earlier_backwards_compatible_versions::Bool, allow_reresolve::Bool, kwargs::Base.Pairs{Symbol, Base.BufferStream, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.BufferStream}}})
      @ Pkg.API ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:431
    [4] test(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.BufferStream, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
      @ Pkg.API ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
    [5] test(pkgs::Vector{Pkg.Types.PackageSpec})
      @ Pkg.API ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:146
    [6] #test#87
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
    [7] test
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:144 [inlined]
    [8] #test#86
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
    [9] test
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/src/API.jl:143 [inlined]
   [10] (::Main.Test69Main_Pkg.PkgTests.ArtifactTests.var"#78#88"{String})()
      @ Main.Test69Main_Pkg.PkgTests.ArtifactTests ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/artifacts.jl:328
   [11] with_pkg_env(fn::Main.Test69Main_Pkg.PkgTests.ArtifactTests.var"#78#88"{String}, path::String; change_dir::Bool)
      @ Main.Test69Main_Pkg.PkgTests.Utils ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/utils.jl:230
   [12] with_pkg_env
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/utils.jl:224 [inlined]
   [13] #77
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/artifacts.jl:318 [inlined]
   [14] mktempdir(fn::Main.Test69Main_Pkg.PkgTests.ArtifactTests.var"#77#87", parent::String; prefix::String)
      @ Base.Filesystem ./file.jl:763
   [15] mktempdir(fn::Function, parent::String) (repeats 2 times)
      @ Base.Filesystem ./file.jl:761
   [16] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/artifacts.jl:317 [inlined]
   [17] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
   [18] top-level scope
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/artifacts.jl:317
   [19] include(mod::Module, _path::String)
      @ Base ./Base.jl:421
   [20] include
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:3 [inlined]
   [21] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:51 [inlined]
   [22] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1432 [inlined]
   [23] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:33 [inlined]
   [24] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
   [25] (::Main.Test69Main_Pkg.PkgTests.var"#1#2")()
      @ Main.Test69Main_Pkg.PkgTests ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:33
   [26] with_logstate(f::Function, logstate::Any)
      @ Base.CoreLogging ./logging.jl:511
   [27] with_logger(f::Function, logger::Base.CoreLogging.NullLogger)
      @ Base.CoreLogging ./logging.jl:623
   [28] top-level scope
      @ ~/julia/usr/share/julia/stdlib/v1.8/Pkg/test/runtests.jl:31
   [29] include
      @ ./Base.jl:421 [inlined]
   [30] macro expansion
      @ ~/julia/test/testdefs.jl:24 [inlined]
   [31] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
   [32] macro expansion
      @ ~/julia/test/testdefs.jl:23 [inlined]
   [33] macro expansion
      @ ./timing.jl:439 [inlined]
   [34] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main ~/julia/test/testdefs.jl:21
   [35] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
      @ Base ./essentials.jl:733
   [36] (::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}})()
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285
   [37] run_work_thunk(thunk::Distributed.var"#106#108"{Distributed.CallMsg{:call_fetch}}, print_error::Bool)
      @ Distributed ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:70
   [38] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Distributed/src/process_messages.jl:285 [inlined]
   [39] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch}, Distributed.MsgHeader, Sockets.TCPSocket})()
      @ Distributed ./task.jl:476
Error in testset threads:
Error During Test at /Users/roland/julia/test/testdefs.jl:21
  Got exception outside of a @test
  LoadError: failed process: Process(setenv(`/Users/roland/julia/usr/bin/julia -Cnative -J/Users/roland/julia/usr/lib/julia/sys.dylib --depwarn=error --check-bounds=yes -g1 --startup-file=no --depwarn=error --rr-detach --startup-file=no threads_exec.jl`,["MFLAGS=-s", "XPC_FLAGS=0x0", "PATH=/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Julia-1.6.app/Contents/Resources/julia/bin/", "MAKELEVEL=2", "PWD=/Users/roland/julia/test", "XPC_SERVICE_NAME=0", "TERM_PROGRAM=Apple_Terminal", "BUILDROOT=/Users/roland/julia", "MAKEFLAGS=s -- JULIA_BUILD_MODE=release", "MAKEOVERRIDES=\${-*-command-variables-*-}", "PKG_CONFIG_LIBDIR=/Users/roland/julia/usr/lib/pkgconfig", "SHELL=/bin/zsh", "HOMEBREW_PREFIX=/opt/homebrew", "MACOSX_DEPLOYMENT_TARGET=11.0", "__CF_USER_TEXT_ENCODING=0x1F5:0x0:0x3", "LC_ALL=C", "__CFBundleIdentifier=com.apple.Terminal", "JULIA_BUILD_MODE=release", "TMPDIR=/var/folders/hk/86ms_fd52rq6z3bbrsdln45r0000gn/T/", "MANPATH=/opt/homebrew/share/man::", "HOMEBREW_CELLAR=/opt/homebrew/Cellar", "HOMEBREW_SHELLENV_PREFIX=/opt/homebrew", "LANG=C", "SHLVL=2", "LOGNAME=roland", "LaunchInstanceID=B3C96C63-487E-453D-A100-E9C18C39D398", "TERM_SESSION_ID=D577AEC9-156C-42ED-95F9-EA3DDB68D682", "OLDPWD=/Users/roland/julia/test", "SSH_AUTH_SOCK=/private/tmp/com.apple.launchd.BjgSzn6nbm/Listeners", "PKG_CONFIG_PATH=/Users/roland/julia/usr/lib/pkgconfig", "INFOPATH=/opt/homebrew/share/info:", "_=/Users/roland/julia/usr/bin/julia", "HOMEBREW_REPOSITORY=/opt/homebrew", "USER=roland", "SECURITYSESSIONID=186b4", "TERM=xterm-256color", "HOME=/Users/roland", "TERM_PROGRAM_VERSION=443", "JULIA_NUM_THREADS=4"]), ProcessExited(143)) [143]
  
  Stacktrace:
    [1] pipeline_error
      @ ./process.jl:542 [inlined]
    [2] run(::Base.CmdRedirect; wait::Bool)
      @ Base ./process.jl:457
    [3] run(::Base.CmdRedirect)
      @ Base ./process.jl:455
    [4] top-level scope
      @ ~/julia/test/threads.jl:76
    [5] include
      @ ./Base.jl:421 [inlined]
    [6] macro expansion
      @ ~/julia/test/testdefs.jl:24 [inlined]
    [7] macro expansion
      @ ~/julia/usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1356 [inlined]
    [8] macro expansion
      @ ~/julia/test/testdefs.jl:23 [inlined]
    [9] macro expansion
      @ ./timing.jl:439 [inlined]
   [10] runtests(name::String, path::String, isolate::Bool; seed::UInt128)
      @ Main ~/julia/test/testdefs.jl:21
   [11] invokelatest(::Any, ::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, UInt128, Tuple{Symbol}, NamedTuple{(:seed,), Tuple{UInt128}}})
      @ Base ./essentials.jl:733
   [12] (::var"#35#45")()
      @ Main ~/julia/test/runtests.jl:311
   [13] cd(f::var"#35#45", dir::String)
      @ Base.Filesystem ./file.jl:112
   [14] top-level scope
      @ ~/julia/test/runtests.jl:93
   [15] include(mod::Module, _path::String)
      @ Base ./Base.jl:421
   [16] exec_options(opts::Base.JLOptions)
      @ Base ./client.jl:306
   [17] _start()
      @ Base ./client.jl:509
  in expression starting at /Users/roland/julia/test/threads.jl:72
ERROR: LoadError: Test run finished with errors
in expression starting at /Users/roland/julia/test/runtests.jl:93
make[1]: *** [all] Error 1
make: *** [testall] Error 2

The results of running (using now the most recent version 0.17.1 of MLJ)

  • MLJ-Ex6.jl (2 runs)
  • MLJ-Ex8.jl (2 runs)
  • MinimalExample.jl (2 runs)

are very promising. They executed without any problems on both test runs. 🤗

There is perhaps one observation worth mentioning: The last statement in MLJ-Ex8.jl (a call to evaluate) took on the same machine using Julia 1.6.1 Intel/Rosetta (using MLJ 0.16.x) about 30 min (repeatable). In this new environment it took on the first run 1 h 12 min and on the second run only 19 min.

@roland-KA

This comment has been minimized.

@fonsp
Copy link
Owner

fonsp commented Jan 28, 2022

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)

@fonsp fonsp closed this as completed Jan 28, 2022
pankgeorg added a commit that referenced this issue Feb 8, 2022
> 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" src="https://mybinder.org/badge_logo.svg"></a>

**Generate your own binder links using [pluto-on-binder.glitch.me](https://pluto-on-binder.glitch.me/)!**

[Diff since v0.17.7](v0.17.7...v0.18.0)

**Merged pull requests:**
- Make document currentscript work (#1765) (@dralletje)
- don't count logs messages multiple times for pluto-logs width (#1843) (@Pangoraw)
- Pattern matching system for lezer code (#1849) (@dralletje)
- minor fix: Tables integration caused method ambiguation for Union{}[] (#1851) (@16bitmood)
- Fix #1852, relocatable changes for sysimage usage. (#1853) (@MichaelHatherly)
- Re-enable parseMixed (#1855) (@pankgeorg)
- DOI in REAMDE for citation (#1864) (@rikhuijzer)
- Use pkgdir instead of pathof (#1867) (@rikhuijzer)
- Hide banner in CI (#1868) (@rikhuijzer)
- Server-side events as configuration (#1871) (@ctrekker)
- fix is_stdlib() for nightly and enable nightly tests (#1874) (@Pangoraw)
- Awesome! Line wrapping! (#1876) (@dralletje)
- respect maxlog keyword for logs, fixes #1858 (#1877) (@Pangoraw)
- allow .. as an identifier, fixes #1875 (#1878) (@Pangoraw)
- Server start event (#1882) (@ctrekker)
- Julia 1.6 minimum (#1885) (@fonsp)
- New heuristic to skip intermediate bond values (#1892) (@fonsp)
- Send queued bond changes when last script finishes (#1898) (@fonsp)

**Closed issues:**
- Pkg.jl will corrupt itself on Windows (#671)
- Failure creating JuMP DenseAxisArray (#806)
- Frontend tests fail too often (#1234)
- Open multiple notebooks at start and without browser (#1278)
- Segmentation faults on Julia 1.7 M1 (#1722)
- Table of content overlaps text in static HTML (#1770)
- Pluto hangs when cell contains `(md" ", md"$t")` (#1800)
- Cell drag drop broken in Linux Chrome v97 (#1809)
- Tables integration causes method ambiguities for `pluto_showable` (#1815)
- Segfault with CSV, SQLite, tables (M1) (#1842)
- Use RelocatableFolders.jl instead of project_relative_dir to allow sysimages (#1852)
- Logging doesn't respect `maxlog` (#1858)
- TOC in dark mode is still light when aside (#1860)
- ProgressLogging: suppressed logging in Turing.jl (#1862)
- Cannot update to version 0.17.7 (#1869)
- Stdlib packages marked as not found (#1872)
- EllipsisNotation.jl (`randn((10,10))[1, ..]`) does not work (#1875)
- Too many intermediate bond values (#1891)
pankgeorg added a commit that referenced this issue Feb 8, 2022
> 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" src="https://mybinder.org/badge_logo.svg"></a>

**Generate your own binder links using [pluto-on-binder.glitch.me](https://pluto-on-binder.glitch.me/)!**

[Diff since v0.17.7](v0.17.7...v0.18.0)

**Merged pull requests:**
- Make document currentscript work (#1765) (@dralletje)
- don't count logs messages multiple times for pluto-logs width (#1843) (@Pangoraw)
- Pattern matching system for lezer code (#1849) (@dralletje)
- minor fix: Tables integration caused method ambiguation for Union{}[] (#1851) (@16bitmood)
- Fix #1852, relocatable changes for sysimage usage. (#1853) (@MichaelHatherly)
- Re-enable parseMixed (#1855) (@pankgeorg)
- DOI in REAMDE for citation (#1864) (@rikhuijzer)
- Use pkgdir instead of pathof (#1867) (@rikhuijzer)
- Hide banner in CI (#1868) (@rikhuijzer)
- Server-side events as configuration (#1871) (@ctrekker)
- fix is_stdlib() for nightly and enable nightly tests (#1874) (@Pangoraw)
- Awesome! Line wrapping! (#1876) (@dralletje)
- respect maxlog keyword for logs, fixes #1858 (#1877) (@Pangoraw)
- allow .. as an identifier, fixes #1875 (#1878) (@Pangoraw)
- Server start event (#1882) (@ctrekker)
- Julia 1.6 minimum (#1885) (@fonsp)
- New heuristic to skip intermediate bond values (#1892) (@fonsp)
- Send queued bond changes when last script finishes (#1898) (@fonsp)

**Closed issues:**
- Pkg.jl will corrupt itself on Windows (#671)
- Failure creating JuMP DenseAxisArray (#806)
- Frontend tests fail too often (#1234)
- Open multiple notebooks at start and without browser (#1278)
- Segmentation faults on Julia 1.7 M1 (#1722)
- Table of content overlaps text in static HTML (#1770)
- Pluto hangs when cell contains `(md" ", md"$t")` (#1800)
- Cell drag drop broken in Linux Chrome v97 (#1809)
- Tables integration causes method ambiguities for `pluto_showable` (#1815)
- Segfault with CSV, SQLite, tables (M1) (#1842)
- Use RelocatableFolders.jl instead of project_relative_dir to allow sysimages (#1852)
- Logging doesn't respect `maxlog` (#1858)
- TOC in dark mode is still light when aside (#1860)
- ProgressLogging: suppressed logging in Turing.jl (#1862)
- Cannot update to version 0.17.7 (#1869)
- Stdlib packages marked as not found (#1872)
- EllipsisNotation.jl (`randn((10,10))[1, ..]`) does not work (#1875)
- Too many intermediate bond values (#1891)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
display & PlutoRunner & AbstractPlutoDingetjes.jl other packages Integration with other Julia packages
Projects
None yet
Development

No branches or pull requests

2 participants