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

Errors when pressing Ctrl+C to stop Pluto #827

Closed
yurivish opened this issue Jan 7, 2021 · 3 comments
Closed

Errors when pressing Ctrl+C to stop Pluto #827

yurivish opened this issue Jan 7, 2021 · 3 comments

Comments

@yurivish
Copy link

yurivish commented Jan 7, 2021

I noticed that if you open Pluto, wait until it opens its page in the browser and print the Press Ctrl+C in this terminal to stop Pluto message, then press Ctrl+C, a variety of internal errors can occur. In some cases I had to press Ctrl+C twice to stop Pluto.

These might be Pluto bugs or they might be Julia bugs, not sure. In all of the cases I only pressed Ctrl+C after the instructions appeared to do so.

yurivish@Compy ~ % julia --eval "using Pluto; Pluto.run()"

Opening http://localhost:1235/?secret=BIQXRb8h in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

^C^Cfatal: error thrown and no exception handler available.
InterruptException()
jl_mutex_unlock at /Users/julia/buildbot/worker/package_macos64/build/src/./locks.h:144 [inlined]
jl_task_get_next at /Users/julia/buildbot/worker/package_macos64/build/src/partr.c:476
poptask at ./task.jl:704
wait at ./task.jl:712 [inlined]
task_done_hook at ./task.jl:442
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
jl_finish_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:196
start_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:715
yurivish@Compy ~ % julia --eval "using Pluto; Pluto.run()"

Opening http://localhost:1235/?secret=D2o9hd74 in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

^C^C┌ Warning: Response function to message of type completepath failed
└ @ Pluto ~/.julia/packages/Pluto/luIaC/src/webserver/WebServer.jl:359


Closing Pluto... Restart Julia for a fresh session.

Have a nice day! 🎈
yurivish@Compy ~ % julia --eval "using Pluto; Pluto.run()"

Opening http://localhost:1235/?secret=Mkr9O4nK in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

^C^Cfatal: error thrown and no exception handler available.
InterruptException()
jl_mutex_unlock at /Users/julia/buildbot/worker/package_macos64/build/src/./locks.h:144 [inlined]
jl_task_get_next at /Users/julia/buildbot/worker/package_macos64/build/src/partr.c:476
poptask at ./task.jl:704
wait at ./task.jl:712 [inlined]
task_done_hook at ./task.jl:442
jl_apply at /Users/julia/buildbot/worker/package_macos64/build/src/./julia.h:1690 [inlined]
jl_finish_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:196
start_task at /Users/julia/buildbot/worker/package_macos64/build/src/task.c:715
yurivish@Compy ~ %
yurivish@Compy ~ % julia --eval "using Pluto; Pluto.run()"

Opening http://localhost:1235/?secret=iSO9pwAI in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

^C┌ Warning: Failed to write to WebSocket of 15mi8yp
│   exception =
│    InterruptException:
│    Stacktrace:
│     [1] pack_format(::Base.GenericIOBuffer{Array{UInt8,1}}, ::MsgPack.MapFixFormat, ::Dict{Symbol,Any}) at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:283
│     [2] pack_type at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:273 [inlined]
│     [3] pack(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Dict{Symbol,Any}) at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:25
│     [4] pack_format(::Base.GenericIOBuffer{Array{UInt8,1}}, ::MsgPack.MapFixFormat, ::Dict{Symbol,Any}) at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:283
│     [5] pack_type at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:273 [inlined]
│     [6] pack(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Dict{Symbol,Any}) at /Users/yurivish/.julia/packages/MsgPack/pN9xd/src/pack.jl:25
│     [7] pack(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Vararg{Any,N} where N) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/MsgPack.jl:73
│     [8] serialize_message_to_stream(::Base.GenericIOBuffer{Array{UInt8,1}}, ::Pluto.UpdateMessage) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:15
│     [9] sprint(::Function, ::Pluto.UpdateMessage; context::Nothing, sizehint::Int64) at ./strings/io.jl:105
│     [10] sprint at ./strings/io.jl:101 [inlined]
│     [11] serialize_message at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:19 [inlined]
│     [12] flushclient(::Pluto.ClientSession) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:73
│     [13] putclientupdates!(::Pluto.ClientSession, ::Pluto.UpdateMessage) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:50
│     [14] putclientupdates! at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:56 [inlined]
│     [15] (::Pluto.var"#124#126")(::Pluto.ServerSession, ::Dict{Any,Any}, ::Nothing; initiator::Pluto.Initiator) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/Dynamic.jl:21
│     [16] process_ws_message(::Pluto.ServerSession, ::Dict{Any,Any}, ::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/WebServer.jl:357
│     [17] (::Pluto.var"#215#225"{Pluto.ServerSession,Base.RefValue{Function}})(::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}) at /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/WebServer.jl:160
│     [18] upgrade(::Pluto.var"#215#225"{Pluto.ServerSession,Base.RefValue{Function}}, ::HTTP.Streams.Stream{HTTP.Messages.Request,HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}; binary::Bool) at /Users/yurivish/.julia/packages/HTTP/IAI92/src/WebSockets.jl:160
│     [19] upgrade at /Users/yurivish/.julia/packages/HTTP/IAI92/src/WebSockets.jl:142 [inlined]
│     [20] (::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 /Users/yurivish/.julia/packages/Pluto/luIaC/src/webserver/WebServer.jl:147
│     [21] handle at /Users/yurivish/.julia/packages/HTTP/IAI92/src/Handlers.jl:269 [inlined]
│     [22] #4 at /Users/yurivish/.julia/packages/HTTP/IAI92/src/Handlers.jl:345 [inlined]
│     [23] macro expansion at /Users/yurivish/.julia/packages/HTTP/IAI92/src/Servers.jl:367 [inlined]
│     [24] (::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 ~/.julia/packages/Pluto/luIaC/src/webserver/PutUpdates.jl:84
^C

Closing Pluto... Restart Julia for a fresh session.

Have a nice day! 🎈

This is on Julia 1.53 with Pluto v0.12.18:

julia> versioninfo()
Julia Version 1.5.3
Commit 788b2c77c1 (2020-11-09 13:37 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin18.7.0)
  CPU: Intel(R) Core(TM) i9-9980HK CPU @ 2.40GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-9.0.1 (ORCJIT, skylake)
@fonsp
Copy link
Owner

fonsp commented Jan 11, 2021

Like #836, I think that this is caused by doing julia --eval "..." instead of typing these commands in the REPL. Can you check that?

@yurivish
Copy link
Author

Hi @fonsp, I can confirm that when launching Pluto from the REPL I don't see those errors for this or #836.

julia> using Pluto; Pluto.run()

Opening http://localhost:1234/?secret=5gHM3tZV in your default browser... ~ have fun!

Press Ctrl+C in this terminal to stop Pluto

^C

Closing Pluto... Restart Julia for a fresh session.

Have a nice day! 🎈
      From worker 2:	    Fetching: [>

@fonsp fonsp closed this as completed Jan 12, 2021
@fonsp
Copy link
Owner

fonsp commented Jan 12, 2021

Let's continue in #836

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

2 participants