-
Notifications
You must be signed in to change notification settings - Fork 859
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
zsh usually hangs when using command substitution with pipes #3872
Comments
If so, that would be good news. I should point out that this is a VM, running on VMWare Fusion on macOS Mojave. So if there's a potential performance issue involved, that could be a possibility. I'm unfortunately unable to test out a pre-release build, since this is a VM I use for work (and therefore it needs to be kept functional).
I do indeed see this on Ubuntu. Like on Debian, it doesn't happen every time, but most times it does. Like on Debian, it doesn't fail under |
WAG this might be related to Rick Grimes problem. The OP smells like #3129 which has a similar repro but with Busybox |
I do have a problem with zombie processes sticking around when this occurs.. I know this worked in 1803 because my zsh configuration has extensive use of this construct and starting a WSL session with In my shell configuration (but not with the reduced testcase), I also see significant CPU usage from one of the zsh child processes, and Finally, one additional note that may or may not be interesting: this occurs even if the command substitution calls a shell function and that shell function has a pipe in it. I don't suppose that makes much of a difference in how zsh invokes things, but I thought I'd mention it in case it's helpful. |
Same issue here. |
This appears to be fixed in 1903, where my old shell configuration seem to work fine. There's no longer a hang when starting zsh or using my reproduction test case. I'm going to close this issue since it seems to be fixed. |
Thanks for the confirm. This was almost certainly variation #3129. |
ver
at a Windows Command Prompt)Microsoft Windows [Version 10.0.17763.316]
sudo apt-get update
sudo apt-get -y install zsh
zsh -c 'DATA=$(echo abc | sed -e "s/b/d/")'
zsh hangs. Occasionally it will complete, but most of the time it doesn't.
If a command substitution with a pipe appears in a zsh startup script (e.g.
.zshenv
) and zsh is the user's shell in/etc/passwd
, starting the WSL instance will hang and the instance will have to be reset.This behavior doesn't occur when using
mksh
,bash
, ordash
in place ofzsh
.zsh always succeeds when run under
strace
, however.zsh shouldn't hang in this case.
This looks potentially related to #1973, but that issue seems to have been fixed already. This may also be the same issue as #3392, but I'm unsure as I can't read the logs.
Also, as a note, this did work fine in 1803, but does not in 1809 (i.e., this is a regression).
I haven't provided an strace because this doesn't fail when traced and I didn't think that would be useful. If you want one anyway, please let me know, and I'll provide one.
The text was updated successfully, but these errors were encountered: