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

Fix deadlock caused by REPL blinking #30112

Merged
merged 1 commit into from
Nov 22, 2018
Merged

Fix deadlock caused by REPL blinking #30112

merged 1 commit into from
Nov 22, 2018

Conversation

Keno
Copy link
Member

@Keno Keno commented Nov 21, 2018

The REPL beeping (blinking) code made the assumption that the prompt
prefix is always a String. That's not necessarily the case, and in
fact it can be an arbitrary funcion to be called when the prompt is
printed (e.g. TerminalExtensions uses this for the iTerm integration).
However, even worse, this code acquired a lock that it never released
on error, causing a deadlock. Fix the original assumption and also
add a try/catch/finally block such that future errors print the error
rather than deadlocking the terminal.

Fixes Keno/TerminalExtensions.jl#40

The REPL beeping (blinking) code made the assumption that the prompt
prefix is always a String. That's not necessarily the case, and in
fact it can be an arbitrary funcion to be called when the prompt is
printed (e.g. TerminalExtensions uses this for the iTerm integration).
However, even worse, this code acquired a lock that it never released
on error, causing a deadlock. Fix the original assumption and also
add a try/catch/finally block such that future errors print the error
rather than deadlocking the terminal.

Fixes Keno/TerminalExtensions.jl#40
@Keno Keno added REPL Julia's REPL (Read Eval Print Loop) backport pending 1.0 labels Nov 21, 2018
@Keno Keno merged commit 038d866 into master Nov 22, 2018
@martinholters martinholters deleted the kf/repldeadlock branch November 22, 2018 14:01
@KristofferC KristofferC mentioned this pull request Nov 28, 2018
61 tasks
@KristofferC KristofferC added bugfix This change fixes an existing bug and removed backport pending 1.0 labels Dec 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This change fixes an existing bug REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Freezes julia session under a variety of circumstances
3 participants