-
Notifications
You must be signed in to change notification settings - Fork 4.5k
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
Sorin theme causes shell to hang. #888
Comments
Some other notes:
|
I think I found it, it's the
But if I change the theme to |
I cannot reproduce this. |
I have the same problem, no idea if I can provide anything to help debug it though. |
same thing as @breerly |
Same problem, can reproduce by keeping "enter" pressed |
With a fresh install and an empty .zshrc, zsh 5.0.7, linux 4.0.4 on Arch Linux |
I encountered this issue a lot while working on improving the async functionality of prompt The only safe kill-signal to send, I have found, is |
Again, I cannot reproduce this. |
Just to report, I can't reproduce this either. |
https://github.com/mafredri/zsh-async, used by https://github.com/sindresorhus/pure, uses |
@stefanosc I recommend you try it inside a git repository. And I know it can be a bit tedious, but keep enter pressed for minimum of 1 minute. This happens very sporadically. Sometimes it can happen on the first try, sometimes it can take 5 minutes of pressing enter. @sorin-ionescu it does get notified by window resizes, but it's not really an issue, since no async task has completed, no callback function will be called. |
@mafredri I did try it inside a git repo. |
@stefanosc You can also try holding |
I tried again with Ctrl+C no delay, no hanging of any kind. the terminal
is immediately responsive as soon as I release the keys.
I am on OSX10.10.3
brew zsh 5.0.7
|
Do you have any custom hooks? |
@mafredri no custom hooks. I use iTerm2 I don't want to test Terminal because I had set it up specifically not to use zsh / prezto (I needed to work with a team and have certain bash config...) |
@stefanosc roger that, then this might be a Terminal + zsh specific issue. EDIT: Can reproduce in iTerm2, so no, not just Terminal. |
yes it must be something spefic to some environments, it would be good
to spot that as it seems somewhat common. If I notice anything else I
will post again.
|
I am also using iTerm2. I will try Terminal. |
I have not been able to replicate it in Terminal. |
I am running arch on latest prezto pulled from git today and am able to consistently replicate this issue, running termite and zsh-5.0.7-2 from extra, switching to skwp theme fixed the issue. |
@sorin-ionescu @stefanosc might it be that you have enabled some options / settings that prevents this issue from surfacing? I have tested with completely clean setups (e.g. only prezto default modifications) and it happens in both iTerm2 and Terminal, I can't really think of any other environment settings that could affect this. Just out of curiosity, is your |
The Prezto I use is the Prezto that is uploaded to GitHub sans a few runcom modifications seen bellow. zpreztorc--- /Users/sorin/.zprezto/runcoms/zprofile 2015-02-23 12:12:37.000000000 -0500
+++ /Users/sorin/.zprofile 2015-05-24 14:17:59.000000000 -0400
@@ -37,12 +37,15 @@
typeset -gU cdpath fpath mailpath path
# Set the the list of directories that cd searches.
-# cdpath=(
-# $cdpath
-# )
+cdpath=(
+ $HOME/Developer
+ $cdpath
+)
# Set the list of directories that Zsh searches for programs.
path=(
+ $HOME/.tilde/{bin,sbin}
+ /opt/homebrew/{bin,sbin}
/usr/local/{bin,sbin}
$path
)
@@ -60,8 +63,19 @@
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
+ # export LESSOPEN="| /Users/sorin/Downloads/less-458/debian/lesspipe %s";
+ # export LESSCLOSE="/Users/sorin/Downloads/less-458/debian/lesspipe %s %s";
+
+ # if (( $+commands[pygmentize] )); then
+ export LESSCOLORIZER='pygmentize -f terminal256 -O bg=dark,style=native -g'
+ export LESSCOLORIZER='source-highlight --outlang-def=esc256.outlang --style-file=esc256.style -i'
+ # fi
fi
+# if (( $+commands[source-highlight-esc.sh] )); then
+# export LESSOPEN="| /usr/bin/env source-highlight-esc.sh --infer-lang %s 2>&-"
+# fi
+
#
# Temporary Files
#
@@ -72,3 +86,28 @@
fi
TMPPREFIX="${TMPDIR%/}/zsh"
+
+#
+# Go
+#
+
+godir="$HOME/Developer/go"
+if [[ -d "$godir" ]]; then
+ typeset -gxUT GOPATH gopath
+ gopath=($godir $gopath)
+ path=("$godir/bin" $path)
+fi
+unset godir
+
+#
+# Git
+#
+
+export GIT_EDITOR="$commands[$EDITOR]"
+
+#
+# Homebrew
+#
+export HOMEBREW_PREFIX="$HOME/.homebrew"
+export HOMEBREW_CACHE="$HOME/.cache/Homebrew"
+export REPOSITORY="https://github.com/Homebrew/homebrew" zprofile--- /Users/sorin/.zprezto/runcoms/zprofile 2015-02-23 12:12:37.000000000 -0500
+++ /Users/sorin/.zprofile 2015-05-24 14:17:59.000000000 -0400
@@ -37,12 +37,15 @@
typeset -gU cdpath fpath mailpath path
# Set the the list of directories that cd searches.
-# cdpath=(
-# $cdpath
-# )
+cdpath=(
+ $HOME/Developer
+ $cdpath
+)
# Set the list of directories that Zsh searches for programs.
path=(
+ $HOME/.tilde/{bin,sbin}
+ /opt/homebrew/{bin,sbin}
/usr/local/{bin,sbin}
$path
)
@@ -60,8 +63,19 @@
# Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
if (( $#commands[(i)lesspipe(|.sh)] )); then
export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
+ # export LESSOPEN="| /Users/sorin/Downloads/less-458/debian/lesspipe %s";
+ # export LESSCLOSE="/Users/sorin/Downloads/less-458/debian/lesspipe %s %s";
+
+ # if (( $+commands[pygmentize] )); then
+ export LESSCOLORIZER='pygmentize -f terminal256 -O bg=dark,style=native -g'
+ export LESSCOLORIZER='source-highlight --outlang-def=esc256.outlang --style-file=esc256.style -i'
+ # fi
fi
+# if (( $+commands[source-highlight-esc.sh] )); then
+# export LESSOPEN="| /usr/bin/env source-highlight-esc.sh --infer-lang %s 2>&-"
+# fi
+
#
# Temporary Files
#
@@ -72,3 +86,28 @@
fi
TMPPREFIX="${TMPDIR%/}/zsh"
+
+#
+# Go
+#
+
+godir="$HOME/Developer/go"
+if [[ -d "$godir" ]]; then
+ typeset -gxUT GOPATH gopath
+ gopath=($godir $gopath)
+ path=("$godir/bin" $path)
+fi
+unset godir
+
+#
+# Git
+#
+
+export GIT_EDITOR="$commands[$EDITOR]"
+
+#
+# Homebrew
+#
+export HOMEBREW_PREFIX="$HOME/.homebrew"
+export HOMEBREW_CACHE="$HOME/.cache/Homebrew"
+export REPOSITORY="https://github.com/Homebrew/homebrew" |
I have not upgraded to the latest Mac OS X. Maybe this is a 10.10 problem. |
@sorin-ionescu This is also occuring in arch linux, i don't think it would be a problem specific to OSX. Which version of zsh are you running ? |
Thank you, @mafredri. |
@sorin-ionescu no problem, someone had to investigate this 😄 . This issue should now be fixed with the latest commits to the zsh git repo (36079 and 36084). At least I have not been able to reproduce any more deadlocks in my tests. It would be helpful if people are able to try it out and see if they can reproduce the issue mentioned here (just to make sure we get all edge-cases ironed out). |
If any OSX users are eager to test it out, you can apply this patch and install it through Homebrew: |
Thank you @mafredri. Unfortunately, we can't depend on users installing HEAD Zsh or even the latest Zsh. So, we'll have to use the workaround for a long time. |
Yes, I agree. I have a branch of zsh-async that essentially tries to use zle instead of kill-signals to communicate with the parent (this is something that's available in zsh 5.0.9 / 5.1, once released). It falls back to using |
@mafredri Could you verify that zsh-async does not interfere with the editor module or wacky themes that use ZLE to display status bars and other contextual data? |
It should not, it's not Zle in the traditional sense. Zle can be used to
|
This bug is still in master. I can easily hit it after a few commands with prezto enabled. Testing on Linux Mint 17.2 |
@cmcginty Possibly you are using long-term-bug version. I'm on Arch Linux with zsh 5.1.1 and no problem exists. |
@ishitatsuyuki Some people can't update Zsh. |
#888 (comment) |
Prezto works fine on local shells, but locks up, when I ssh into a Centos 7 server, with Prezto there. |
@bingalls My theme is not the only async theme. Which themes have you used? |
nicoulaj. I seem to recall kylewest & minimal, too. |
@bingalls Those don't use async. |
FWIW, I've seen long delays on Mac OS X running Prezto when the user's home directory is a git repository. The delay I have observed is definitely caused by a long-running @bingalls @cmcginty @breerly Do any of you have |
David- On 1/8/16 2:05 PM, David Rogers wrote:
|
@al-the-x nope:
|
@al-the-x Execute |
As @mafredri suggests, this seems fixed in Zsh 5.1+. Perhaps this bug should be marked 'wontfix' or 'fixed upstream' or something. On Linux Mint 7.1 with zsh 5.0.2-3ubuntu6 and out-the-box zprezto, I could reliably trigger a hang just by holding down Enter for 20+ seconds in a Git-managed project. After manually installing zsh-5.2 from source I can no longer trigger a hang. For posterity here is a gdb backtrace showing a malloc hang in zsh 5.0.2 (also note that switching to WINCH / signal 28 didn't help):
|
I had the same issue. It seemed the culprit for me was an old version of zsh. I installed zsh 5.2 and it now works fine. |
Is this still an issue with the changes in master? We've changed how the sorin prompt handles async tasks. |
Again, my environment changed. I recall a remote ssh terminal issue. That said, I no longer see the problem. |
I'm closing this because it's a very old issue and the prompt was partially rewritten to add async support which may have fixed this issue. |
My shell gets into a state where I can't do anything, I have to close the window and open a new shell. If I just hold
^C
, this is my output:At the end, you can see that the shell is busted, there is no way to get out.
Any help debugging/fixing would be much appreciated.
The text was updated successfully, but these errors were encountered: