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

Running a notebook deleted contents of .julia/registries #834

Closed
KronosTheLate opened this issue Jan 10, 2021 · 0 comments
Closed

Running a notebook deleted contents of .julia/registries #834

KronosTheLate opened this issue Jan 10, 2021 · 0 comments

Comments

@KronosTheLate
Copy link

KronosTheLate commented Jan 10, 2021

WARNING - the post has been rewritten. It currently does not seem like the pluto notebook process is the culprit, but a trigger event that can cause the bug. Updated info below. Closing this for now, as it does not seem appropriate here

The problem is that during what I have identified as "trigger events", the contents of my .julia/registries folder is deleted. This can occur when I

  1. update or install packages (specifically during the "Updating registry at C:\Users\username.julia\registries\General" step)
  2. Run a pluto notebook. The notebook can be empty or contain a single cell with 1+1 and the problem can occur. When the error occurs, the notebook is not responsive, and a result is never evaluated, nor does the cell timer count.

The deletion of the folder contents happen during the Updating registry step, or the notebook has appear to run for about a minute. The behaviour is not consistently reproduced, but it is reoccuring. Package updating and installing has been a trigger event at least 3 times, and the notebook process has been a trigger event about 10 times. The problem can be consistent, then be fixed for time time, but then reoccur again soon.

Below is the error thrown upon stopping a not-responding pluto-notebook:

┌ Error: mktempdir cleanup
│   exception =
│    InterruptException:
│    Stacktrace:
│     [1] unlink(::String) at .\file.jl:917
│     [2] rm(::String; force::Bool, recursive::Bool) at .\file.jl:268
│     [3] rm(::String; force::Bool, recursive::Bool) at .\file.jl:278 (repeats 3 times)
│     [4] mktempdir(::Pkg.Types.var"#107#110"{String}, ::String; prefix::String) at .\file.jl:714
│     [5] mktempdir(::Function, ::String) at .\file.jl:707 (repeats 2 times)
│     [6] update_registries(::Pkg.Types.Context, ::Array{Pkg.Types.RegistrySpec,1}; force::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Types.jl:1119
│     [7] up(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; level::Pkg.Types.UpgradeLevel, mode::Pkg.Types.PackageMode, update_registry::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:227
│     [8] #up#38 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:68 [inlined]
│     [9] instantiate(::Pkg.Types.Context; manifest::Nothing, update_registry::Bool, verbose::Bool, platform::Pkg.BinaryPlatforms.Windows, kwargs::Base.Iterators.Pairs{Symbol,Base.DevNull,Tuple{Symbol},NamedTuple{(:io,),Tuple{Base.DevNull}}}) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:810
│     [10] top-level scope at C:\Users\densb\.julia\packages\Pluto\luIaC\src\runner\Loader.jl:19
│     [11] include(::String) at .\client.jl:457
│     [12] top-level scope at none:1
│     [13] eval(::Module, ::Any) at .\boot.jl:331
│     [14] (::Distributed.var"#103#104"{Distributed.CallMsg{:call}})() at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:290
│     [15] run_work_thunk(::Distributed.var"#103#104"{Distributed.CallMsg{:call}}, ::Bool) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:79
│     [16] run_work_thunk(::Distributed.RemoteValue, ::Function) at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:88
│     [17] (::Distributed.var"#96#98"{Distributed.RemoteValue,Distributed.var"#103#104"{Distributed.CallMsg{:call}}})() at .\task.jl:356
└ @ Base.Filesystem file.jl:717
TaskFailedException:
InterruptException:
Stacktrace:
 [1] sync_end(::Channel{Any}) at .\task.jl:314
 [2] macro expansion at .\task.jl:333 [inlined]
 [3] 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
 [4] create_workspaceprocess(; compiler_options::Pluto.Configuration.CompilerOptions) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:170
 [5] make_workspace(::Tuple{Pluto.ServerSession,Pluto.Notebook}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:43
 [6] #7 at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:188 [inlined]
 [7] macro expansion at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:76 [inlined]
 [8] (::Pluto.var"#1#2"{Pluto.WorkspaceManager.var"#7#9"{Tuple{Pluto.ServerSession,Pluto.Notebook}},Pluto.Promise{Pluto.WorkspaceManager.Workspace}})() at .\task.jl:356┌ Warning: Response function to message of type complete failed
└ @ Pluto C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:359

Stacktrace:┌ Warning: Reading WebSocket client stream failed for unknown reason:
│   parentbody =
│    Dict{Any,Any} with 5 entries:
│      "client_id"   => "1wwwjfk"
│      "body"        => Dict{Any,Any}("query"=>"sq")
│      "request_id"  => "bkboqy"
│      "notebook_id" => "03f35370-5341-11eb-0379-49c494b1da65"
│      "type"        => "complete"
│   exception =
│    TaskFailedException:
│    InterruptException:
│    Stacktrace:
│     [1] sync_end(::Channel{Any}) at .\task.jl:314
│     [2] macro expansion at .\task.jl:333 [inlined]
│     [3] 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
│     [4] create_workspaceprocess(; compiler_options::Pluto.Configuration.CompilerOptions) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:170
│     [5] make_workspace(::Tuple{Pluto.ServerSession,Pluto.Notebook}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:43
│     [6] #7 at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:188 [inlined]
│     [7] macro expansion at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:76 [inlined]
│     [8] (::Pluto.var"#1#2"{Pluto.WorkspaceManager.var"#7#9"{Tuple{Pluto.ServerSession,Pluto.Notebook}},Pluto.Promise{Pluto.WorkspaceManager.Workspace}})() at .\task.jl:356
│    Stacktrace:
│     [1] wait at .\task.jl:267 [inlined]
│     [2] wait(::Pluto.Promise{Pluto.WorkspaceManager.Workspace}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:83
│     [3] get_workspace at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:190 [inlined]
│     [4] (::Pluto.var"#201#203")(::Pluto.ServerSession, ::Dict{Any,Any}, ::Pluto.Notebook; initiator::Pluto.Initiator) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\REPLTools.jl:60
│     [5] process_ws_message(::Pluto.ServerSession, ::Dict{Any,Any}, ::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:357
│     [6] (::Pluto.var"#215#225"{Pluto.ServerSession,Base.RefValue{Function}})(::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:160
│     [7] upgrade(::Pluto.var"#215#225"{Pluto.ServerSession,Base.RefValue{Function}}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}; binary::Bool) at C:\Users\densb\.julia\packages\HTTP\IAI92\src\WebSockets.jl:160
│     [8] upgrade at C:\Users\densb\.julia\packages\HTTP\IAI92\src\WebSockets.jl:142 [inlined]
│     [9] (::Pluto.var"#214#224"{Pluto.ServerSession,HTTP.Handlers.Router{Symbol("##253")},Base.RefValue{Function}})(::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:147
│     [10] handle at C:\Users\densb\.julia\packages\HTTP\IAI92\src\Handlers.jl:269 [inlined]
│     [11] #4 at C:\Users\densb\.julia\packages\HTTP\IAI92\src\Handlers.jl:345 [inlined]
│     [12] macro expansion at C:\Users\densb\.julia\packages\HTTP\IAI92\src\Servers.jl:367 [inlined]
│     [13] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.StreamHandlerFunction{Pluto.var"#214#224"{Pluto.ServerSession,HTTP.Handlers.Router{Symbol("##253")},Base.RefValue{Function}}}},HTTP.ConnectionPool.Transaction{Sockets.TCPSocket},HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})() at .\task.jl:356
└ @ Pluto C:\Users\densb\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:168

 [1] wait at .\task.jl:267 [inlined]
 [2] wait(::Pluto.Promise{Pluto.WorkspaceManager.Workspace}) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:83
 [3] get_workspace at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:190 [inlined]
 [4] 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\densb\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:273
 [5] run_reactive!(::Pluto.ServerSession, ::Pluto.Notebook, ::Pluto.NotebookTopology, ::Pluto.NotebookTopology, ::Array{Pluto.Cell,1}; deletion_hook::Function, persist_js_state::Bool) at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:65
 [6] run_reactive! at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:26 [inlined]
 [7] macro expansion at C:\Users\densb\.julia\packages\Pluto\luIaC\src\evaluation\Run.jl:13 [inlined]
 [8] (::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

At some point yesterday, the notebook started working consistently, but gave the following error message every time I stopped the process:

┌ 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 2:    InterruptException()
pankgeorg pushed a commit that referenced this issue Jan 28, 2021
[Diff since v0.12.18](v0.12.18...v0.12.19)

**Closed issues:**
- GPU usage and console messages (#685)
- Feature Proposal: Exported HTML can be passed to a static site generator (#794)
- wait and resume execution on button press (#803)
- Latex code not appropriately displayed (#817)
- Python doesn't work in Pluto (#818)
- add pluto - pluto not found - Julia 1.5.3 macOS (#819)
- Cell output not shown correctly if in-line comment ends with semicolon (#820)
- _llvm (#821)
- Can't move cells (#822)
- Conditions on list comprehensions and execution order (#824)
- Electron app (#825)
- Errors when pressing Ctrl+C to stop Pluto (#827)
- Failed to load notebook error (#829)
- Popup docs don't work for some symbols (#832)
- Running a notebook deleted contents of `.julia/registries` (#834)
- Ctrl+C broken with `julia -e "Pluto.run()"` instead of the REPL (#836)
- Edit or remove default header and footer in exported static PDF (#837)
- Parameters.jl dynamically created macros confuse Pluto (#838)
- Feature request: Open URL from terminal (#840)
- Notebook gets stuck in forever loading state after restarting my PC while running it (#849)
- Syntax highlighting of @. (#854)
- File not found when file newly created while session is running (#855)
- Weird output from a mix of MathJax, Markdown and PlutoUI (#856)
- Misaligned plots when plotting with UnicodePlots.jl using BrailleCanvas (#870)

**Merged pull requests:**
- Pluto ux process file drop (#707) (@pankgeorg)
- Dralbase state managment (#710) (@dralletje)
- PLJ-785 CodeMirror Eject to TextArea - Reload from TextArea in Offline HTML export (#805) (@pankgeorg)
-  Dralbase state managment: Fix front-end tests (#809) (@pankgeorg)
- Update README.md (#814) (@fonsp)
- Regard `:=` in macros as einsum notation (take 2) (#816) (@mcabbott)
- 🧸 Open your own files as samples (#828) (@fonsp)
- Handle filters in generators, closes #824 (#839) (@Pangoraw)
- Update `== nothing` to `=== nothing` in Parse.jl (#841) (@heetbeet)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant