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

Pluto in perpetual loading state... #2581

Closed
whatsthecraic opened this issue Jun 8, 2023 · 6 comments
Closed

Pluto in perpetual loading state... #2581

whatsthecraic opened this issue Jun 8, 2023 · 6 comments
Labels
other packages Integration with other Julia packages

Comments

@whatsthecraic
Copy link

Good morning,

since I've updated the Pluto package (v0.19.26), I cannot create or load any notebook. It's does not print anything in the terminal, but the browser shows constantly loading...

image

image

On ArchLinux, julia 1.8.5, tested with both firefox & chromium.

I understand as it is it does not help diagnosing the root issue, but is there any additional logs/debug info I can provide?

@whatsthecraic
Copy link
Author

hmmm trying to run the test suite with Pluto on dev I'm also seeing these failures:

With function wrapping: Error During Test at /home/dean/workspace/julia/dev/Pluto/test/RichOutput.jl:439
  Test threw exception
  Expression: occursin(notebook.path |> basename, ((st[:stacktrace])[5])[:file])
  BoundsError: attempt to access 4-element Vector{Dict{Symbol, Any}} at index [5]
  Stacktrace:
   [1] getindex(A::Vector{Dict{Symbol, Any}}, i1::Int64)
     @ Base ./array.jl:924
   [2] macro expansion
     @ /usr/share/julia/stdlib/v1.8/Test/src/Test.jl:464 [inlined]
   [3] macro expansion
     @ ~/workspace/julia/dev/Pluto/test/RichOutput.jl:439 [inlined]
   [4] macro expansion
     @ /usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1439 [inlined]
   [5] macro expansion
     @ ~/workspace/julia/dev/Pluto/test/RichOutput.jl:395 [inlined]
   [6] macro expansion
     @ /usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [7] macro expansion
     @ ~/workspace/julia/dev/Pluto/test/RichOutput.jl:374 [inlined]
   [8] macro expansion
     @ /usr/share/julia/stdlib/v1.8/Test/src/Test.jl:1363 [inlined]
   [9] top-level scope
     @ ~/workspace/julia/dev/Pluto/test/RichOutput.jl:8
Test Summary:                      | Pass  Fail  Error  Total   Time
Rich output                        |  123    10     18    151  53.7s
  Tree viewer                      |   60                  60  22.8s
  Table viewer                     |   30                  30  22.9s
  Strange code                     |    2                   2   2.5s
  Mutliple expressions & semicolon |   19                  19   0.1s
  Stack traces                     |   12    10     18     40   5.3s
    Without function wrapping      |    6     5      9     20   3.4s
    With function wrapping         |    6     5      9     20   1.9s
ERROR: LoadError: Some tests did not pass: 123 passed, 10 failed, 18 errored, 0 broken.
in expression starting at /home/dean/workspace/julia/dev/Pluto/test/RichOutput.jl:6
in expression starting at /home/dean/workspace/julia/dev/Pluto/test/runtests.jl:19

but I suspect they're unrelated?

@ep12
Copy link

ep12 commented Jun 10, 2023

Same problem here. Also on arch: linux 6.3.6, julia 1.9.0, Pluto v0.19.26. Tried downgrading julia to 1.8.5, linux 5.19.13, Pluto to some versions, no change at all. Firefox and Chrome as well as Firefox on a different machine. Could rule out the browser: I installed pluto on the other machine running manjaro and the pluto server on it behaved as expected when accessed from the arch machine.

The problem is reproducible in an arch VM. Spin one up, install arch, julia, pluto and voila, it does not work. Endless loading.

I also fiddled around with HTTP.jl and the pluto webserver.jl. The devtools showed some websocket did an oopsie messages, the network tab showed that the initial upgrade request was repeatedly sent. Each time with status 101 and then somehow the socket was immediately closed. Pluto debug logs indicated some read after EOF directly after the upgrade.

Then I compared the versions of various libraries that julia uses between arch and manjaro, the only difference being mbedtls 2.28.2 (manjaro) vs. 3.4.0 (arch). After downgrading it with the following command, pluto seems to work again...
Another remark: I downgraded mbedtls while firefox was running and without restarting firefox afterwards, only starting pluto and it immediately worked again, so it probably does not affect the browser but only pluto.
Not sure which bit of software uses mbedtls directly (pluto (probably not), HTTP.jl, julia, ...) and actually I've spent far too much time (days!) on debugging/solving that issue at least for me already. At least I'm not the only one... Maybe the brief comments help others troubleshoot this problem and hopefully downgrading is a workaround for you for now.

Downgrade mbedtls on arch:

pacman -U https://archive.archlinux.org/packages/m/mbedtls/mbedtls-2.28.2-1-x86_64.pkg.tar.zst

@ep12
Copy link

ep12 commented Jun 10, 2023

Stumbled over JuliaLang/julia#48806. Maybe the people over there can provide further help with this issue.

@whatsthecraic
Copy link
Author

I just want to confirm that downgrading mbedtls also resolved the issue for me. Thanks @ep12 !!

@Pangoraw Pangoraw added the other packages Integration with other Julia packages label Jun 27, 2023
@Pangoraw
Copy link
Collaborator

Closing since this seems solved by downgrading mbedtls (thanks @ep12 and @whatsthecraic!). Also as an additional information on Arch, I have had problems in the past using the julia package whereas julia-bin from the AUR has no problems (I now use juliaup).

@gtsiam
Copy link

gtsiam commented Jun 29, 2023

This has been bugging me for a while, so picking up where @ep12 left off (I legit have no idea how you tracked it down to mbedtls):

First, downgrading mbedtls is not ideal to say the least. For a permanent fix, I've filed a bug with arch to fix the issue in the official julia package.

In the meantime, just install the mbedtls2 package and run pluto like this:

LD_LIBRARY_PATH=/usr/lib/mbedtls2 julia -e 'import Pluto; Pluto.run()'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
other packages Integration with other Julia packages
Projects
None yet
Development

No branches or pull requests

4 participants