Closed ericbn closed 2 years ago
Have you tried compiling zsh outside of homebrew to validate if it's a homebrew issue?
It works in the Docker container. However, it could also be a bug that affects only macOS builds.
My hunch so far is that this is a macOS build issue. I can't reproduce the issue in the Homebrew container using brewed zsh
.
I was able to reproduce the issue with a copy of zsh
compiled locally in two instances on macOS Monterey, with the following two sets of arguments at configure time (second time was to verify that Homebrew-passed arguments would not be a likely culprit):
./configure --prefix=$(pwd)/out --enable-fndir=$(pwd)/aux/functions \
--enable-scriptdir=$(pwd)/aux/scripts --enable-site-fndir=$(pwd)/out/aux/site-functions \
--enable-site-scriptdir=$(pwd)/out/aux/site-scripts --enable-runhelpdir=$(pwd)/aux/help \
--enable-cap --enable-maildir-support --enable-multibyte --enable-pcre --enable-zsh-secure-free \
--enable-unicode9 --enable-etcdir=/etc --with-tcsetpgrp DL_EXT=bundle
./configure --prefix=$(pwd)/out --enable-fndir=$(pwd)/share/functions \
--enable-scriptdir=$(pwd)/share/scripts --enable-site-fndir=$(pwd)/out/share/site-functions \
--enable-site-scriptdir=$(pwd)/out/share/site-scripts --enable-runhelpdir=$(pwd)/share/help
Still trying to fire up MacPorts on a VM to see if their copy exhibits the same issue.
Reproduced the same issue in zsh
5.9 from MacPorts.
I suggest reporting the bug to zsh-workers mailing list: https://www.zsh.org/mla/
Reported it to zsh-workers here: https://www.zsh.org/mla/workers/2022/msg00611.html
There's nothing actionable here for now (for Homebrew, anyway), so I'm closing this.
Feel free to open a new issue (or, better, a pull request) if there are any developments that we can do something about.
Feel free to open a PR to apply the patch in the zsh
formula.
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
Minimal reproducible example:
A more complete reproducible example, which is the one that got our attention:
This was first reported in https://github.com/zimfw/zimfw/discussions/459
This is not reproducible with earlier versions of Zsh installed via Homebrew, or with the
/bin/zsh
bundled with macOS (Zsh version 5.8.1 in macOS 12.4).Also, this is not reproducible with the zsh-users docker image:
What happened (include all command output)?
In the first example, the output was:
If the
f
function is simplified, I don't see the error. Not sure if it's related to network activity. Added the extrareturn 0
in thef
function to force that return code. If the-P 0
is removed, I don't see the error. So looks like it's related to concurrency. If the range is shortened, the error will be less frequent. Even with{1..13}
it happens to sometimes succeed in my Mid 2015 2.2 GHz Quad-Core Intel Core i7.In the second example, the output was:
Sometimes it might succeed. In this case, repeat the example a couple of more times.
What did you expect to happen?
In the first example, I expected:
since the return from all executions of
f
was0
.In the second example, I expected a different message at the end:
Step-by-step reproduction instructions (by running
brew
commands)