Repository navigation
Description
- A brief description
Under specific but easy to reproduce conditions, tmux and oh-my-zsh will freeze the entire WSL and become unkillable even from the Windows task manager. It also becomes impossible to stop the LxssManager service, which gets stuck at the "Stopping" phase, and it is even unkillable by killing the service's PID with taskkill /f /PID in an administrative command prompt. The only way to kill it is by rebooting (I haven't tried elevating my commandprompt from administrator to NT Authority\System, maybe that would work, since even administrative taskkill is being told access denied.
- Your Windows build number
Build 14926
(happens on earlier builds too, at least since 14905. Don't remember if it happened in anniversary)
- Steps / All commands required to reproduce the error from a brand new installation
From a clean install of WSL:
Install dependencies:
sudo apt install tmux git curl zsh
Run the oh-my-zsh install script
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
While running the script, it will ask for your user password in order to change your default shell. This does not actually do anything with WSL, so whatever.
Now run tmux with tmux. Inside of tmux, you will have a bash prompt. From here, run zsh with zsh.
Now hold down the enter key for a while, continually entering an empty line, which should begin to scroll the screen. Eventually it will freeze and become totally unkillable, even with the Windows task manager, and even if you attempt to manually stop the LxssManager service with either sc or from the administrative tools snap-in.
- Strace of the failing command
Freezes, so no strace. - Required packages and commands to install
tmux, git, curl, zsh (commands to install oh-my-zsh covered above)
By the way, this is definitely not a console issue, because it happens even if you try to do it from an X terminal.
Also, I tested this without oh-my-zsh, and it didn't freeze. When I looked at what oh-my-zsh does while screenscrolling outside of tmux, I noticed that intermittently, it's printing something that says "git:()". I think this might be related to the problem.

Activity
fpqc commentedon Sep 16, 2016
By the way, I only was able to test on one machine. If anyone else could attempt to reproduce and confirm, it would be helpful.
fpqc commentedon Sep 16, 2016
By the way, I was playing with a few other programs, and I was able to get them to break on oh-my-zsh (the new mintty/wsltty, for example, will crash oh-my-zsh without tmux. I think the hang is related to the pty implementation, maybe).
benhillis commentedon Sep 16, 2016
fpqc - If you could narrow down a sequence of reproducible steps it'd be very useful to us.
fpqc commentedon Sep 16, 2016
Ben Hillis (@benhillis) I gave them above, from a clean install even.
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"benhillis commentedon Sep 16, 2016
fpqc Sorry, missed that :)
fpqc commentedon Sep 16, 2016
Ben Hillis (@benhillis) also, btw, if you change the theme in .zshrc from robbyrussell to pygmalion (it's right at the top of .zshrc after you install oh-my-zsh), it seems to hang much faster (sometimes in as few as eight lines). Not sure why that is. Could just be the fact that my sample space is small).
fpqc commentedon Sep 17, 2016
Ben Hillis (@benhillis) I know it's the weekend but I am dying to know if you got a chance to attempt reproduction.
dethoma commentedon Sep 19, 2016
Yes we got a repro and have a working theory on what is going wrong that led to this behavior. Once we have the fix ready we will certainly try to get it into the earliest possible insider build.
fpqc commentedon Sep 19, 2016
Great! Deepu Thomas (@dethoma) ! Did you get the bsod too?
dethoma commentedon Sep 19, 2016
Not yet, if you do narrow down the repro steps please do share it with us. Thanks for your help.
fpqc commentedon Sep 19, 2016
Deepu Thomas (@dethoma) I haven't been able to reproduce it myself, but I would have assumed that it generated a proper crashdump somewhere. I basically got it after repeatedly triggering this bug (to narrow down what part of oh-my-zsh was causing it), rebooting, then retrying. Once I finally thought I had found the culprit, I went to save a file inside of nano inside of tmux, and that's wot did it.
arcanis commentedon Sep 25, 2016
I think I've just hit this issue with a fresh build - no bsod, but a freezing bash, almost right after starting it
Any workaround instead of disabling all of oh-my-zsh ?
fpqc commentedon Sep 25, 2016
Maël Nison (@arcanis) The freeze is the easy part, triggers very reliably with tmux and oh-my-zsh (I think it is a bug in the pty implementation, since I managed to trigger it outside of tmux). I have not yet been able to reproduce the bsod, but I think that might be disk i/o related, since it happened to me while saving my .zshrc file in nano (while using zsh in tmux).
fpqc commentedon Oct 7, 2016
Never mind. Still broken. Just got it to deadlock in 14942 as soon as I re-added completion and compfix.
zadjii-msft commentedon Oct 17, 2016
For the sake of linking, this is probably related to #1127
russalex commentedon Oct 20, 2016
The bad news: this bug looks to continue to happen in build 14951.
The good news: I can not get this to reproduce on an internal build. We have made quite a few fixes which have not made it out to the Insider builds yet.
One interesting bit, I did see it display "git:()" once in testing. Not certain what's causing that.
fpqc commentedon Nov 5, 2016
Russ Alexander (@russalex) Seems good now. I worked all day with oh-my-zsh (with the completion and compfix libs re-added), and I haven't hit a deadlock. I didn't do the "enter key stress" test this time, but I am sure you guys have (and there is another issue open related to this anyway), so I am going to go ahead and close.
nyanpasu64 commentedon Aug 6, 2018
I managed to encounter this on Windows Store Ubuntu (Xenial?) using a similar procedure. After installing Oh My Zsh, I tried navigating into a directory with a Git repository, and following some steps (I forgot what, it may have involved Ctrl+C on a particularly slow prompt), eventually freezing zsh; all attempts to start bash or wsl froze. In procexp, I have unkillable zombie zsh5 and git processes.
nyanpasu64 commentedon Aug 6, 2018
Windows 10 Version 1709 (OS Build 16299.547)
After pressing Ctrl+C, I get text
$(virtualenv_prompt_info)on-screen. Opening the same Git repository in Git Bash, I get an errorfatal: Unable to create 'C:/Users/jimbo1qaz/encrypted/code/wavetable/wavetable/.git/index.lock': File exists.Note that I have system-drive Veracrypt and a rather odd Windows directory hierarchy.
%userprofile%/code/wavetable/wavetable, which looks innocent enough...code/is a Windows symlink toencrypted/code/encrypted/is a Windows symlink toDropbox/encrypted/Dropbox/encrypted/code/wavetable/wavetableis a Windows symlink toC:\Users\jimbo1qaz\encrypted\dirlinks\path\wavetableencrypted/is a Windows symlink toDropbox/encrypted/oh my god, my directory hierarchy is fucked.
Should I create a new issue?
yveslange commentedon Apr 17, 2019
I have encountered this issue multiple times.
Using WSL partially fixed the problem (the freezes happens less).
I have removed Oh-my-zsh for the moment and I'm using woefe/git-prompt.zsh.
Also, upgrading GIT to the latest version seemed to increase the performance by.. a lot
So WSL tty + upgrading git + woefe = No freeze anymore