Can't Pkg.add probably due to bug

Hi

we use julia version 1.6.1 in a server (of which I am not root) and all went smoothly for months. Now we can not install packages any longer, instead we get

julia> using Pkg; Pkg.add("Optim")
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
┌ Error: curl_multi_socket_action: 8
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36

and it gets stuck. Control-C does not do anything useful.

This has been reported elsewhere (e.g. Error on installation packages and (I think) StackOverflowError with curl_multi_socket_action · Issue #94 · JuliaLang/Downloads.jl · GitHub . But I don’t see a solution other than installing a new version, which is a Big Hassle. Does anyone have a workaround?

thanks

Andres

Why would it be a big hussle? The current long-term stable version that gets bug fixes and security updates is Julia 1.10. Did you test if your code works with Julia 1.10? If yes, I would install it.

And if you use juliaup, switching between Julia versions is trivial. No need for root permissions.

2 Likes

If I read that correctly, it seems there might be a link with multithreading. Have you tried running Julia on a single thread (julia -t 1)?

2 Likes

I did, it does not work:

$ julia -t 1
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.6.1 (2021-04-23)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using Pkg; Pkg.add("Optim")
    Updating registry at `~/.julia/registries/General`
    Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Resolving package versions...
┌ Error: curl_multi_socket_action: 8
└ @ Downloads.Curl /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Downloads/src/Curl/utils.jl:36
┌ Error: curl_multi_socket_action: 8

Let’s say that it involves work for “root” which has other priorities. Plus the extra work of installing all packages. Doing these things in computation servers with >10 users is not trivial.

You don’t need to have root privileges to use juliaup, it installs Julia in userspace

1 Like