Anton Degterev
Anton Degterev

Reputation: 611

Cascading crash of Julia's packages system

It all started with the fact that at some point Pluto did not start, giving an error for incompatibility with some package. I removed several packages that seemed to me a possible source of problems, and started updating the packages, as a result of which I received a complaint about incompatibility with a specific package. I also deleted it - I received a complaint on the next one, and so on several times. The situation turned out to be too complicated and I completely deleted the directory with the packages and installed them again. But the mistake was repeated again. Now I have recorded everything in more detail. First, Pluto gave an error in connection with package "FuzzyCompletions" that I did not specifically install:

 Warning: Reading WebSocket client stream failed for unknown reason:
│   parentbody = Dict{Any,Any} with 5 entries: …
│   exception =
│    TaskFailedException:
│    On worker 2:
│    LoadError: Unsatisfiable requirements detected for package FuzzyCompletions [fb4132e2]:
│     FuzzyCompletions [fb4132e2] log:
│     ├─FuzzyCompletions [fb4132e2] has no known versions!
│     └─restricted to versions 0.3-0.4 by an explicit requirement — no versions left
│    check_constraints at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:935
│    Graph at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Resolve\graphtype.jl:362
│    deps_graph at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:502
│    resolve_versions! at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:374
│    up at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\Operations.jl:1222
│    #up#106 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:245
│    #up#38 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:68 [inlined]
│    #instantiate#170 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:810
│    instantiate at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Pkg\src\API.jl:795
│    top-level scope at C:\Users\ten\.julia\packages\Pluto\luIaC\src\runner\Loader.jl:22
│    include at .\client.jl:457
│    top-level scope at none:1
│    eval at .\boot.jl:331
│    #103 at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:290
│    run_work_thunk at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:79
│    run_work_thunk at C:\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.5\Distributed\src\process_messages.jl:88
│    #96 at .\task.jl:356
│    in expression starting at C:\Users\ten\.julia\packages\Pluto\luIaC\src\runner\Loader.jl:1
│    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\ten\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:170
│     [5] make_workspace(::Tuple{Pluto.ServerSession,Pluto.Notebook}) at C:\Users\ten\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:43
│     [6] #7 at C:\Users\ten\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:188 [inlined]
│     [7] macro expansion at C:\Users\ten\.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\ten\.julia\packages\Pluto\luIaC\src\evaluation\Tokens.jl:83
│     [3] get_workspace at C:\Users\ten\.julia\packages\Pluto\luIaC\src\evaluation\WorkspaceManager.jl:190 [inlined]
│     [4] (::Pluto.var"#204#206")(::Pluto.ServerSession, ::Dict{Any,Any}, ::Pluto.Notebook; initiator::Pluto.Initiator) at C:\Users\ten\.julia\packages\Pluto\luIaC\src\webserver\REPLTools.jl:92
│     [5] process_ws_message(::Pluto.ServerSession, ::Dict{Any,Any}, ::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\ten\.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\ten\.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\ten\.julia\packages\HTTP\IAI92\src\WebSockets.jl:160│     [8] upgrade at C:\Users\ten\.julia\packages\HTTP\IAI92\src\WebSockets.jl:142 [inlined]
│     [9] (::Pluto.var"#214#224"{Pluto.ServerSession,HTTP.Handlers.Router{Symbol("##280")},Base.RefValue{Function}})(::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at C:\Users\ten\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:147
│     [10] handle at C:\Users\ten\.julia\packages\HTTP\IAI92\src\Handlers.jl:269 [inlined]
│     [11] #4 at C:\Users\ten\.julia\packages\HTTP\IAI92\src\Handlers.jl:345 [inlined]
│     [12] macro expansion at C:\Users\ten\.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("##280")},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\ten\.julia\packages\Pluto\luIaC\src\webserver\WebServer.jl:168

During the initial installation of the packages, there were no errors or warnings, this error was the first one

I decided to try to remove Pluto and run the update, but after that I got the following error:

julia> Pkg.rm("Pluto")
Updating `C:\Users\ten\.julia\environments\v1.5\Project.toml`
  [c3e4b0f8] - Pluto v0.12.18
Updating `C:\Users\ten\.julia\environments\v1.5\Manifest.toml`
  [fb4132e2] - FuzzyCompletions v0.4.0
  [99f44e22] - MsgPack v1.1.0
  [c3e4b0f8] - Pluto v0.12.18

julia> Pkg.update()
ERROR: Unsatisfiable requirements detected for package Distributions [31c24e10]:
 Distributions [31c24e10] log:
 ├─Distributions [31c24e10] has no known versions!
 └─restricted to versions * by an explicit requirement — no versions left

Deleted it, and got a claim to the next package:

julia> Pkg.rm("Distributions")
Updating `C:\Users\ten\.julia\environments\v1.5\Project.toml`
  [31c24e10] - Distributions v0.24.10
No Changes to `C:\Users\ten\.julia\environments\v1.5\Manifest.toml`

julia> Pkg.update()
ERROR: Unsatisfiable requirements detected for package CSV [336ed68f]:
 CSV [336ed68f] log:
 ├─CSV [336ed68f] has no known versions!
 └─restricted to versions * by an explicit requirement — no versions left

Deleted it, and got a claim to the next package:

julia> Pkg.rm("CSV")
Updating `C:\Users\ten\.julia\environments\v1.5\Project.toml`
  [336ed68f] - CSV v0.8.2
No Changes to `C:\Users\ten\.julia\environments\v1.5\Manifest.toml`

julia> Pkg.update()
ERROR: Unsatisfiable requirements detected for package DataFrames [a93c6f00]:
 DataFrames [a93c6f00] log:
 ├─DataFrames [a93c6f00] has no known versions!
 └─restricted to versions * by an explicit requirement — no versions left

Perhaps it would be possible to continue this way, but it is obvious that this would not solve the problem. So I stopped and decided to ask for advice

All the packages I use are pretty standard. Here is the current status of what is left after the deletion:

julia> Pkg.status()
Status `C:\Users\ten\.julia\environments\v1.5\Project.toml`
  [dcc97b0b] GeoStats v0.21.0
  [916415d5] Images v0.23.3
  [682c06a0] JSON v0.21.1
  [91a5bcdd] Plots v1.10.1
  [7f904dfe] PlutoUI v0.6.11
  [92933f4c] ProgressMeter v1.4.1
  [6f49c342] RCall v0.13.10
  [de0858da] Printf
  [9a3f8284] Random
  [10745b16] Statistics

I have not found any recipes for what to do in the case of such cascading accidents and what may be their cause. If I did something wrong, I'm ready to once again completely tear down the packages folder and install them again. But it seems that I do not understand the reasons for what is happening, so I would like to understand the nature of this phenomenon, so that this does not happen again in the future

Upvotes: 0

Views: 132

Answers (1)

Oskar
Oskar

Reputation: 1450

As I already wrote in the comments the problem probably lies in the Julia registry. To have a broader insight on what registries are and how they work you might give a look at the Documentation.

To check the status of the registry you can use (within the REPL) ] registry status and to update it ] registry update.

However, there might got something broken. Then you can delete and add the registry back. This is done by:

pkg> registry rm General
pkg> registry add https://github.com/JuliaRegistries/General

where pkg> is the Pkg.jl REPL that you enter with a ].

Upvotes: 2

Related Questions