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

Interrupt shouldn't kill Juliaif nothing is running #105

Closed
sglyon opened this issue Feb 10, 2016 · 6 comments
Closed

Interrupt shouldn't kill Juliaif nothing is running #105

sglyon opened this issue Feb 10, 2016 · 6 comments

Comments

@sglyon
Copy link
Contributor

sglyon commented Feb 10, 2016

Right now if you do cmd+j cmd+i when julia is inactive, it will kill the active julia process. I believe this should be as simple as catching InterruptException() instead of doing whatever is printed here (nice that we can copy console output to show you this now :) ):

fatal: error thrown and no exception handler available.
InterruptException()
rec_backtrace at /Users/sglyon/src/julia/julia/src/task.c:658
jl_sigint_action at /Users/sglyon/src/julia/julia/src/signal-handling.c:36
sigint_handler at /Users/sglyon/src/julia/julia/usr/lib/libjulia.dylib (unknown line)
_sigtramp at /usr/lib/system/libsystem_platform.dylib (unknown line)
Julia has stopped: 1, null
@pfitzseb
Copy link
Member

Windows backtrace, for completeness' sake:

NtRemoveIoCompletionEx at C:\WINDOWS\SYSTEM32\ntdll.dll (unknown line)
GetQueuedCompletionStatusEx at C:\WINDOWS\system32\KERNELBASE.dll (unknown line)
uv_process_async_wakeup_req at D:\Programme\Julia-0.4.3\bin\libjulia.dll (unknown line)
uv_run at D:\Programme\Julia-0.4.3\bin\libjulia.dll (unknown line)
fatal: error thrown and no exception handler available.
process_events at stream.jl:713
wait at task.jl:360
task_done_hook at task.jl:174
jl_apply_generic at D:\Programme\Julia-0.4.3\bin\libjulia.dll (unknown line)
jl_unprotect_stack at D:\Programme\Julia-0.4.3\bin\libjulia.dll (unknown line)
InterruptException()
Julia has stopped

@MikeInnes
Copy link
Member

ref JuliaLang/julia#14032

At the moment the issue is that the InterruptException() bypasses the Juno worker tasks completely, which are stalled waiting for data from the socket. I'll think about it some more, there may be some way of injecting an interrupt-handling task or something.

@pfitzseb
Copy link
Member

Have you tried making interrupting julia a no-op when no user side code is running? Not sure if this would be a robust solution, though, but probably better than the current behaviour anyways...

@MikeInnes
Copy link
Member

Yeah, just disabling it depending on the working status seems like a reasonable bandaid.

@MikeInnes
Copy link
Member

Just pushed a patch for this. It actually seems to be reasonably robust, but let me know if it causes any issues.

@sglyon
Copy link
Contributor Author

sglyon commented Feb 17, 2016

Seems to be working for me, thanks!

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

3 participants