fonsp / Pluto.jl

🎈 Simple reactive notebooks for Julia
https://plutojl.org/
MIT License
4.94k stars 285 forks source link

Pluto ignores stop signals #228

Open diegozea opened 4 years ago

diegozea commented 4 years ago

Hi!

First, thanks for Pluto! :)

I've just run into this problem using Julia 1.4.2 and Pluto v0.11.0 in Ubuntu and Chrome.

Error deserializing a remote exception from worker 2
Remote(original) exception of type MethodError
Remote stacktrace : 
convert at ./missing.jl:69
convert at ./essentials.jl:310 (repeats 4 times)
Tuple at ./namedtuple.jl:110
convert at ./namedtuple.jl:105
fetch_formatted_result at /home/elin/.julia/packages/Pluto/zIhY2/src/runner/PlutoRunner.jl:34
top-level scope at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/WorkspaceManager.jl:0
eval at ./boot.jl:331
#104 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:294
run_work_thunk at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:79
macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/process_messages.jl:294 [inlined]
#103 at ./task.jl:358
Stacktrace:
 [1] remotecall_fetch(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:390
 [2] remotecall_fetch(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:382
 [3] #remotecall_fetch#144 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:417 [inlined]
 [4] remotecall_fetch at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/remotecall.jl:417 [inlined]
 [5] remotecall_eval at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Distributed/src/macros.jl:240 [inlined]
 [6] eval_fetch_in_workspace(::Pluto.WorkspaceManager.Workspace, ::Expr, ::Base.UUID, ::Bool) at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/WorkspaceManager.jl:153
 [7] eval_fetch_in_workspace at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/WorkspaceManager.jl:119 [inlined]
 [8] run_single!(::Notebook, ::Cell) at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/Run.jl:81
 [9] run_reactive!(::Pluto.ServerSession, ::Notebook, ::Pluto.NotebookTopology, ::Pluto.NotebookTopology, ::Array{Cell,1}; deletion_hook::Function) at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/Run.jl:67
 [10] run_reactive! at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/Run.jl:24 [inlined]
 [11] macro expansion at /home/elin/.julia/packages/Pluto/zIhY2/src/evaluation/Run.jl:11 [inlined]
 [12] (::Pluto.var"#68#69"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},Pluto.ServerSession,Notebook,Array{Cell,1},Pluto.NotebookTopology,Pluto.NotebookTopology})() at ./task.jl:358[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.

Thanks

fonsp commented 4 years ago

I've seen this too one time - it happens when the worker process gets out of sync somehow.

It would be really useful if you could find a MWE to reproduce this error!

If you can't reproduce it, but you find it again, please report it again! And it would help if you:

diegozea commented 4 years ago

I will tell you if I found that again. It happened to me after the erroneous definition of one variable two times in different cells. Then I see this when trying to stop a series of Plots from finishing (they were probably precompiling) as they were possibly corrupted by the error that I have been attempting to fix while making another mistake (choosing an incorrect variable for the plot). I'm pretty sure that I clicked the stop button multiple times.

fonsp commented 4 years ago

It would be really helpful if people could post notebooks that don't behave well with the stopping function!

jtschneider commented 3 years ago

Hello @fonsp,

I am loving the reactive Pluto notebook environment and I would like to adopt it into my professional academic workflow!

Here is an example how to reproduce the segmentation fault and the frozen Pluto worker: When trying to plot something on a machine were PyPlot.jl and MKL.jl are installed and both Julia binaries and Numpy via PyPlot are built agains Intel's MKL. This is of course not an issue with Pluto, however it produces a consistent reproducible segmentation fault :

Warning: both Julia and NumPy are linked with MKL, which may cause conflicts and crashes (#433).
β”” @ PyCall ~/.julia/packages/PyCall/BcTLp/src/numpy.jl:73
      From worker 2:
      From worker 2:    signal (11): Segmentation fault
      From worker 2:    in expression starting at none:1
      From worker 2:    LSteps_Any_Loop4gas_1 at ~/.julia/artifacts/ebc509c4504f29e9138fc092addde563485a036d/lib/libmkl_mc3.so (unknown line)
      From worker 2:    dcopy_ at ~/.julia/artifacts/ebc509c4504f29e9138fc092addde563485a036d/lib/libmkl_intel_ilp64.so (unknown line)
      From worker 2:    unknown function (ip: 0x9fffffffd)
      From worker 2:    Allocations: 97692833 (Pool: 97653787; Big: 39046); GC: 110
Worker 2 terminated.Distributed
.ProcessExitedException(2)Distributed.ProcessExitedException(2)
[...]
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.
[ Info: Tried to stop idle workspace - ignoring.

I am not sure if this might be helpful to isolate any segfault and prevent it from corrupting the entire notebook πŸ€·β€β™‚οΈ

danvinci commented 3 years ago

Running into the same problem very frequently.

In my case, I was just getting started and installing packages:

begin
    import Pkg
    Pkg.activate(mktempdir())

    packages = ["WGLMakie", "PlutoUI", "Plotly", "AbstractPlotting"]

    Pkg.add(packages)
    using Plots
    using AbstractPlotting, Plotly, WGLMakie
    using PlutoUI 

end

The cell has been running for 10+ mins now, I'm restarting Pluto. It's not my internet connection.

I'm including error messages from previous (multiple) runs of the same notebook:

β”Œ Warning: Error requiring `Mux` from `WebIO`
β”‚   exception =
β”‚    LoadError: InterruptException:
β”‚    Stacktrace:
β”‚     [1] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1088
β”‚     [2] include_string(::Module, ::String, ::String) at ./loading.jl:1096
β”‚     [3] top-level scope at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:104
β”‚     [4] eval at ./boot.jl:331 [inlined]
β”‚     [5] eval at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:1 [inlined]
β”‚     [6] (::WebIO.var"#71#83")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:94
β”‚     [7] err(::Any, ::Module, ::String) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:42
β”‚     [8] (::WebIO.var"#70#82")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:93
β”‚     [9] withpath(::Any, ::String) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:32
β”‚     [10] (::WebIO.var"#69#81")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:92
β”‚     [11] listenpkg(::Any, ::Base.PkgId) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:15
β”‚     [12] macro expansion at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:90 [inlined]
β”‚     [13] __init__() at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:103
β”‚     [14] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
β”‚     [15] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:782
β”‚     [16] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at ./loading.jl:712
β”‚     [17] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:771
β”‚     [18] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at ./loading.jl:712
β”‚     [19] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:771
β”‚     [20] _require(::Base.PkgId) at ./loading.jl:1007
β”‚     [21] require(::Base.PkgId) at ./loading.jl:928
β”‚     [22] require(::Module, ::Symbol) at ./loading.jl:923
β”‚     [23] top-level scope at /Users/Daniele/Documents/Pluto_Notebooks/test_new.jl#==#3d1a5246-5460-11eb-3888-936e470959be:9
β”‚     [24] eval at ./boot.jl:331 [inlined]
β”‚     [25] run_inside_trycatch(::Expr, ::Base.UUID, ::Main.PlutoRunner.ReturnProof) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/runner/PlutoRunner.jl:167
β”‚     [26] run_expression(::Expr, ::Base.UUID, ::Nothing) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/runner/PlutoRunner.jl:197
β”‚     [27] top-level scope at none:1
β”‚     [28] eval(::Module, ::Any) at ./boot.jl:331
β”‚     [29] (::Distributed.var"#103#104"{Distributed.CallMsg{:call}})() at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:290
β”‚     [30] run_work_thunk(::Distributed.var"#103#104"{Distributed.CallMsg{:call}}, ::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:79
β”‚     [31] run_work_thunk(::Distributed.RemoteValue, ::Function) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:88
β”‚     [32] (::Distributed.var"#96#98"{Distributed.RemoteValue,Distributed.var"#103#104"{Distributed.CallMsg{:call}}})() at ./task.jl:356
β”‚    in expression starting at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/providers/mux.jl:7
β”” @ Requires ~/.julia/packages/Requires/035xH/src/require.jl:44
Still running... starting sequence
 πŸ”₯  πŸ”₯  πŸ”₯  πŸ”₯  πŸ”₯ β”Œ Warning: Error requiring `WebSockets` from `WebIO`
β”‚   exception =
β”‚    LoadError: InterruptException:
β”‚    Stacktrace:
β”‚     [1] parse(::IOStream; dicttype::Type{T} where T, inttype::Type{Int64}, allownan::Bool, null::Nothing) at /Users/Daniele/.julia/packages/JSON/3rsiS/src/Parser.jl:491
β”‚     [2] parse at /Users/Daniele/.julia/packages/JSON/3rsiS/src/Parser.jl:489 [inlined]
β”‚     [3] (::AssetRegistry.var"#3#5"{String,String,String})() at /Users/Daniele/.julia/packages/AssetRegistry/4TyKv/src/AssetRegistry.jl:53
β”‚     [4] withlock at /Users/Daniele/.julia/packages/AssetRegistry/4TyKv/src/AssetRegistry.jl:10 [inlined]
β”‚     [5] register(::String; registry_file::String) at /Users/Daniele/.julia/packages/AssetRegistry/4TyKv/src/AssetRegistry.jl:49
β”‚     [6] register(::String) at /Users/Daniele/.julia/packages/AssetRegistry/4TyKv/src/AssetRegistry.jl:29
β”‚     [7] top-level scope at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/providers/generic_http.jl:21
β”‚     [8] include_string(::Function, ::Module, ::String, ::String) at ./loading.jl:1088
β”‚     [9] include_string(::Module, ::String, ::String) at ./loading.jl:1096
β”‚     [10] top-level scope at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:122
β”‚     [11] eval at ./boot.jl:331 [inlined]
β”‚     [12] eval at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:1 [inlined]
β”‚     [13] (::WebIO.var"#80#92")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:94
β”‚     [14] err(::Any, ::Module, ::String) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:42
β”‚     [15] (::WebIO.var"#79#91")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:93
β”‚     [16] withpath(::Any, ::String) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:32
β”‚     [17] (::WebIO.var"#78#90")() at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:92
β”‚     [18] listenpkg(::Any, ::Base.PkgId) at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:15
β”‚     [19] macro expansion at /Users/Daniele/.julia/packages/Requires/035xH/src/require.jl:90 [inlined]
β”‚     [20] __init__() at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/WebIO.jl:121
β”‚     [21] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:697
β”‚     [22] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:782
β”‚     [23] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at ./loading.jl:712
β”‚     [24] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:771
β”‚     [25] _tryrequire_from_serialized(::Base.PkgId, ::UInt64, ::String) at ./loading.jl:712
β”‚     [26] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:771
β”‚     [27] _require(::Base.PkgId) at ./loading.jl:1007
β”‚     [28] require(::Base.PkgId) at ./loading.jl:928
β”‚     [29] require(::Module, ::Symbol) at ./loading.jl:923
β”‚     [30] top-level scope at /Users/Daniele/Documents/Pluto_Notebooks/test_new.jl#==#3d1a5246-5460-11eb-3888-936e470959be:9
β”‚     [31] eval at ./boot.jl:331 [inlined]
β”‚     [32] run_inside_trycatch(::Expr, ::Base.UUID, ::Main.PlutoRunner.ReturnProof) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/runner/PlutoRunner.jl:167
β”‚     [33] run_expression(::Expr, ::Base.UUID, ::Nothing) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/runner/PlutoRunner.jl:197
β”‚     [34] top-level scope at none:1
β”‚     [35] eval(::Module, ::Any) at ./boot.jl:331
β”‚     [36] (::Distributed.var"#103#104"{Distributed.CallMsg{:call}})() at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:290
β”‚     [37] run_work_thunk(::Distributed.var"#103#104"{Distributed.CallMsg{:call}}, ::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:79
β”‚     [38] run_work_thunk(::Distributed.RemoteValue, ::Function) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:88
β”‚     [39] (::Distributed.var"#96#98"{Distributed.RemoteValue,Distributed.var"#103#104"{Distributed.CallMsg{:call}}})() at ./task.jl:356
β”‚    in expression starting at /Users/Daniele/.julia/packages/WebIO/Fy9h1/src/providers/generic_http.jl:21
β”” @ Requires ~/.julia/packages/Requires/035xH/src/require.jl:44
 πŸ”₯  πŸ”₯  πŸ”₯  πŸ”₯ On worker 3:
InterruptException:
top-level scope at none:1
eval at ./boot.jl:331
#106 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:294
run_work_thunk at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:79
macro expansion at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:294 [inlined]
#105 at ./task.jl:356 πŸ”₯ 
Stacktrace:
 [1]       From worker 3:   fatal: error thrown and no exception handler available.remotecall_fetch
β”Œ Warning: temp cleanup
β”‚   exception =
β”‚    schedule: Task not runnable
β”‚    Stacktrace:
β”‚     [1] error(::String) at ./error.jl:33
β”‚     [2] enq_work(::Task) at ./task.jl:526
β”‚     [3] yield at ./task.jl:626 [inlined]
β”‚     [4] yield at ./task.jl:625 [inlined]
β”‚     [5] Channel{Any}(::Base.Filesystem.var"#_it#24"{Bool,Bool,typeof(throw),String,Array{String,1},Array{String,1}}, ::Int64; taskref::Nothing, spawn::Bool) at ./channels.jl:135
β”‚     [6] #Channel#488 at ./channels.jl:157 [inlined]
β”‚     [7] Channel at ./channels.jl:150 [inlined]
β”‚     [8] walkdir(::String; topdown::Bool, follow_symlinks::Bool, onerror::typeof(throw)) at ./file.jl:913
β”‚     [9] walkdir at ./file.jl:872 [inlined]
β”‚     [10] prepare_for_deletion(::String) at ./file.jl:478
β”‚     [11] temp_cleanup_purge(::Bool) at ./file.jl:513
β”‚     [12] temp_cleanup_purge() at ./file.jl:507
β”‚     [13] _atexit() at ./initdefs.jl:316
β”” @ Base.Filesystem file.jl:518
(      From worker 3:   InterruptException()β”Œ Error: Fatal error on process 3
β”‚   exception =
β”‚    schedule: Task not runnable
β”‚    Stacktrace:
β”‚     [1] error(::String) at ./error.jl:33
β”‚     [2] schedule(::Task, ::Any; error::Bool) at ./task.jl:586
β”‚     [3] schedule at ./task.jl:586 [inlined]
β”‚     [4] uv_writecb_task(::Ptr{Nothing}, ::Int32) at ./stream.jl:1051
β”‚     [5] poptask(::Base.InvasiveLinkedListSynchronized{Task}) at ./task.jl:704
β”‚     [6] wait at ./task.jl:712 [inlined]
β”‚     [7] uv_write(::Sockets.TCPSocket, ::Ptr{UInt8}, ::UInt64) at ./stream.jl:933
β”‚     [8] uv_write at ./stream.jl:918 [inlined]
β”‚     [9] flush(::Sockets.TCPSocket) at ./stream.jl:1014
β”‚     [10] send_msg_(::Distributed.Worker, ::Distributed.MsgHeader, ::Distributed.ResultMsg, ::Bool) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/messages.jl:191
β”‚     [11] send_msg_now at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/messages.jl:130 [inlined]
β”‚     [12] send_msg_now(::Sockets.TCPSocket, ::Distributed.MsgHeader, ::Distributed.ResultMsg) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/messages.jl:125
β”‚     [13] deliver_result(::Sockets.TCPSocket, ::Symbol, ::Distributed.RRID, ::NamedTuple{(:level, :msg, :group, :file, :line, :kwargs),Tuple{String,String,Symbol,String,Int64,Dict{Symbol,String}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:111
β”‚     [14] macro expansion at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:302 [inlined]
β”‚     [15] (::Distributed.var"#105#107"{Distributed.CallMsg{:call_fetch},Distributed.MsgHeader,Sockets.TCPSocket})() at ./task.jl:356
β”” @ Distributed /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/process_messages.jl:115
::
Function      From worker 3:    jl_mutex_unlock at /Users/julia/buildbot/worker/package_macos64/build/src/./locks.h:144 [inlined], 
Worker 3 terminated.      From worker 3:    jl_task_get_next at /Users/julia/buildbot/worker/package_macos64/build/src/partr.c:476

      From worker 3:    poptask at ./task.jl:704::
Distributed      From worker 3: wait at ./task.jl:712 [inlined].
Worker      From worker 3:  task_done_hook at ./task.jl:442, 
::      From worker 3:  jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]Module
,       From worker 3:  jl_finish_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:196::
Vararg      From worker 3:  start_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:715{
Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/remotecall.jl:394
 [2] remotecall_fetch(::Function, ::Distributed.Worker, ::Module, ::Vararg{Any,N} where N) at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/remotecall.jl:386
 [3] #remotecall_fetch#146 at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/remotecall.jl:421 [inlined]
 [4] remotecall_fetch at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/remotecall.jl:421 [inlined]
 [5] remotecall_eval at /Users/julia/buildbot/worker/package_macos64/build/usr/share/julia/stdlib/v1.5/Distributed/src/macros.jl:241 [inlined]
 [6] (::Pluto.WorkspaceManager.var"#12#13"{Base.UUID,Bool,Nothing,Pluto.WorkspaceManager.Workspace})() at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/WorkspaceManager.jl:260
 [7] withtoken(::Pluto.WorkspaceManager.var"#12#13"{Base.UUID,Bool,Nothing,Pluto.WorkspaceManager.Workspace}, ::Pluto.Token) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/Tokens.jl:18
 [8] format_fetch_in_workspace at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/WorkspaceManager.jl:259 [inlined]
 [9] format_fetch_in_workspace at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/WorkspaceManager.jl:256 [inlined]
 [10] eval_format_fetch_in_workspace(::Tuple{Pluto.ServerSession,Pluto.Notebook}, ::Expr, ::Base.UUID, ::Bool, ::Nothing) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/WorkspaceManager.jl:244
 [11] run_single!(::Tuple{Pluto.ServerSession,Pluto.Notebook}, ::Pluto.Cell, ::Pluto.ReactiveNode) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/Run.jl:107
 [12] run_reactive!(::Pluto.ServerSession, ::Pluto.Notebook, ::Pluto.NotebookTopology, ::Pluto.NotebookTopology, ::Array{Pluto.Cell,1}; deletion_hook::Function, persist_js_state::Bool) at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/Run.jl:78
 [13] run_reactive! at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/Run.jl:26 [inlined]
 [14] macro expansion at /Users/Daniele/.julia/packages/Pluto/luIaC/src/evaluation/Run.jl:13 [inlined]
 [15] (::Pluto.var"#79#81"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},Pluto.ServerSession,Pluto.Notebook,Pluto.NotebookTopology,Pluto.NotebookTopology,Array{Pluto.Cell,1}})() at ./task.jl:356 πŸ”₯ [ Info: Sending interrupt to process 3
[ Info: Sending interrupt to process 3
[ Info: Sending interrupt to process 3
[ Info: Sending interrupt to process 3
[ Info: Sending interrupt to process 3
MartaVanin commented 3 years ago

Hello, huge fan of Pluto here, but I get a similar error when I try to run this notebook: https://github.com/Electa-Git/PowerModelsDistributionStateEstimation.jl/blob/master/examples/PMDSE_intro.jl

My environment:

  [336ed68f] CSV v0.6.2
  [b6b21f68] Ipopt v0.6.3
  [4076af6c] JuMP v0.21.4
  [91a5bcdd] Plots v1.10.5
  [c3e4b0f8] Pluto v0.12.20
  [c36e90e8] PowerModels v0.17.4
  [d7431456] PowerModelsDistribution v0.10.1
  [d0713e65] PowerModelsDistributionStateEstimation v0.2.3

Basically, it is a notebook that explains how to use the PowerModelsDistributionStateEstimation package, which I made for version v0.1.2, but that in principle should work also for v0.2.x. However, with the updated package version it crashes, and it looks like a Pluto problem. On the REPL, I get:

Worker 2 terminated.Distributed
.ProcessExitedException(2)Distributed.ProcessExitedException(2)
Stacktrace: [1] worker_from_id(::Distributed.ProcessGroup, ::Int64) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\cluster.jl:1074
 [2] worker_from_id at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\cluster.jl:1071 [inlined]
 [3] remotecall(::Function, ::Int64, ::Module, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\remotecall.jl:376
 [4] remotecall at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\remotecall.jl:376 [inlined]
 [5] macro expansion at .\task.jl:403 [inlined]
 [6] macro expansion at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\macros.jl:224 [inlined]
 [7] macro expansion at .\task.jl:332 [inlined]
 [8] remotecall_eval(::Module, ::Array{Int64,1}, ::Expr) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\macros.jl:218
 [9] create_emptyworkspacemodule(::Int64) at C:\Users\mvanin\.julia\packages\Pluto\fxtGo\src\evaluation\WorkspaceManager.jl:99
 [10] delete_vars(::Tuple{Pluto.ServerSession,Pluto.Notebook}, ::Set{Symbol}, ::Set{Tuple{Base.UUID,Array{Symbol,1}}}, ::Set{Expr}; kwargs::Base.Iterators.Pairs{Symbol,Array{Pluto.Cell,1},Tuple{Symbol},NamedTuple{(:to_run,),Tuple{Array{Pluto.Cell,1}}}}) at C:\Users\mvanin\.julia\packages\Pluto\fxtGo\src\evaluation\WorkspaceManager.jl:275
 [11] run_reactive!(::Pluto.ServerSession, ::Pluto.Notebook, ::Pluto.NotebookTopology, ::Pluto.NotebookTopology, ::Array{Pluto.Cell,1}; deletion_hook::Function, persist_js_state::Bool) at C:\Users\mvanin\.julia\packages\Pluto\fxtGo\src\evaluation\Run.jl:65
 [12] run_reactive! at C:\Users\mvanin\.julia\packages\Pluto\fxtGo\src\evaluation\Run.jl:26 [inlined]
 [13] macro expansion at C:\Users\mvanin\.julia\packages\Pluto\fxtGo\src\evaluation\Run.jl:13 [inlined]
 [14] (::Pluto.var"#79#81"{Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}},Pluto.ServerSession,Pluto.Notebook,Pluto.NotebookTopology,Pluto.NotebookTopology,Array{Pluto.Cell,1}})() at .\task.jl:356

Hope this is relevant and it helps a bit? I am not sending stop signals here, but thought might be related because some toher users above also get Worker 2 terminated.Distributed .ProcessExitedException(2)Distributed.ProcessExitedException(2)

fonsp commented 3 years ago

@MartaVanin can you move this to a new issue? Is there any output in the terminal before Worker 2 terminated.Distributed?

danvinci commented 2 years ago

Update on this issue (merged to original #848): Pluto has improved tremendously, and is way more stable. Seems to keep being usable only from Chrome, unless I specify a different port at launch, then also Firefox works.

Even then, the file picker works in Chrome but not in Firefox.

The solution for now is to keep using Chrome.

When it comes to processes (Pluto?) ignoring stop signals, it keeps happening but mostly with long-running ram-intensive tasks like loading a 500MB csv into a dataframe, or query the same data from a SQLite DB.

For example, I'd take a CSV dataset (~600mb), load it into a SQLite DB file, and then have a forever-running cell when trying to query the DB and use a dataframe as a sink. The cell would run for several minutes with no output, and execution doesn't stop when requested. I see the following in the terminal when trying to terminate it: From worker 2: WARNING: Force throwing a SIGINT

The DB file is 2.3GB, almost x4 the original data, and the raw data can be loaded into a dataframe in <1min from the CSV.