-
-
Notifications
You must be signed in to change notification settings - Fork 293
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
Cannot safely exit Pluto on Windows + git bash #2136
Comments
What happens when you interrupt this code snippet? ➜ ~ julia
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.7.0 (2021-11-30)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> try
sleep(1000)
catch e
typeof(e)
end
^CInterruptException
julia> |
Same thing. Hmm. I do not recall having these problems when I interrupt other things at REPL. |
On MacOS, 1.8.0-rc1 Intel, ctrl-C does not interrupt safely anymore. An error that never recovers to terminal: ^Cfatal: error thrown and no exception handler available.
InterruptException()
ijl_task_get_next at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
poptask at ./task.jl:919
wait at ./task.jl:928
task_done_hook at ./task.jl:632
jfptr_task_done_hook_28572.clone_1 at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/sys.dylib (unknown line)
ijl_apply_generic at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
jl_finish_task at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
start_task at /Applications/Julia-1.8.app/Contents/Resources/julia/lib/julia/libjulia-internal.1.8.dylib (unknown line)
┌ Warning: Reading WebSocket client stream failed for unknown reason:
│ exception =
│ schedule: Task not runnable
│ Stacktrace:
│ [1] error(s::String)
│ @ Base ./error.jl:35
│ [2] schedule(t::Task, arg::Any; error::Bool)
│ @ Base ./task.jl:789
│ [3] schedule
│ @ ./task.jl:787 [inlined]
│ [4] uv_writecb_task(req::Ptr{Nothing}, status::Int32)
│ @ Base ./stream.jl:1161
│ [5] process_events
│ @ ./libuv.jl:104 [inlined]
│ [6] wait()
│ @ Base ./task.jl:930
│ [7] wait(c::Base.GenericCondition{Base.Threads.SpinLock})
│ @ Base ./condition.jl:124
│ [8] wait_readnb(x::Sockets.TCPSocket, nb::Int64)
│ @ Base ./stream.jl:416
│ [9] eof(s::Sockets.TCPSocket)
│ @ Base ./stream.jl:106
│ [10] eof(t::HTTP.ConnectionPool.Transaction{Sockets.TCPSocket})
│ @ HTTP.ConnectionPool ~/.julia/packages/HTTP/aTjcj/src/ConnectionPool.jl:222
│ [11] eof
│ @ ~/.julia/packages/HTTP/aTjcj/src/WebSockets.jl:255 [inlined]
│ [12] (::Pluto.var"#401#413"{Pluto.ServerSession, Base.RefValue{Function}})(clientstream::HTTP.WebSockets.WebSocket{HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│ @ Pluto ~/.julia/packages/Pluto/Bug7E/src/webserver/WebServer.jl:166
│ [13] upgrade(f::Pluto.var"#401#413"{Pluto.ServerSession, Base.RefValue{Function}}, http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}; binary::Bool)
│ @ HTTP.WebSockets ~/.julia/packages/HTTP/aTjcj/src/WebSockets.jl:160
│ [14] upgrade
│ @ ~/.julia/packages/HTTP/aTjcj/src/WebSockets.jl:140 [inlined]
│ [15] (::Pluto.var"#400#412"{Pluto.ServerSession, HTTP.Handlers.Router{Symbol("##312")}, Base.RefValue{Function}})(http::HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}})
│ @ Pluto ~/.julia/packages/Pluto/Bug7E/src/webserver/WebServer.jl:161
│ [16] handle
│ @ ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:270 [inlined]
│ [17] #4
│ @ ~/.julia/packages/HTTP/aTjcj/src/Handlers.jl:351 [inlined]
│ [18] macro expansion
│ @ ~/.julia/packages/HTTP/aTjcj/src/Servers.jl:415 [inlined]
│ [19] (::HTTP.Servers.var"#13#14"{HTTP.Handlers.var"#4#5"{HTTP.Handlers.StreamHandlerFunction{Pluto.var"#400#412"{Pluto.ServerSession, HTTP.Handlers.Router{Symbol("##312")}, Base.RefValue{Function}}}}, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}, HTTP.Servers.Server{Nothing, Sockets.TCPServer}, HTTP.Streams.Stream{HTTP.Messages.Request, HTTP.ConnectionPool.Transaction{Sockets.TCPSocket}}})()
│ @ HTTP.Servers ./task.jl:482
└ @ Pluto ~/.julia/packages/Pluto/Bug7E/src/webserver/WebServer.jl:198
|
Workaround for @tbeason: I also run Pluto from gitbash under MSWindiws 10. I start Pluto with
When I want to quit Pluto I use the Looking at my shell history, it appears that recently I needed to include |
Just to update here. I've been using Windows Powershell as my default in Windows Terminal and still have this issue. So perhaps it is related to Windows Terminal and not the specific terminal "backend"? |
cc @savq |
I opened a Julia issue about a change in interrupt behaviour on Julia 1.8, which I suspect to be the cause here. So far I only have my result on MacOS, perhaps someone using a different OS could try to reproduce the issue, and leave a comment with their |
@Pangoraw did you say that this issue is related to the HTTP 1.0 release? Or was that something else? |
Recently, meaning within the last few weeks, I cannot close Pluto anymore without experiencing a SEGFAULT. I use Windows Terminal + Git Bash for my Julia REPL experience and am on Windows 10. I start Julia, then
import Pluto; Pluto.run()
and Pluto runs without issue. When I am ready to close out, I return to the REPL and hitCtrl+C
. Nothing happens. If I continue to mash/hitCtrl+C
eventually I getWindows.PowerShell.2022-05-27.11-24-11.mp4
The text was updated successfully, but these errors were encountered: