Closed patrickli closed 2 years ago
Can you reproduce this problem if you replace your entire ~/.zshrc
with this?
source ~/.p10k.zsh
source /Users/patrick/.local/share/zsh-snap/prezto/modules/prompt/external/powerlevel10k/powerlevel10k.zsh-theme
Yes. Same problem.
How about this? Do you get the same problem in this shell?
() (
emulate -L zsh -o err_return
local tmp
tmp="$(mktemp -d ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
{
builtin cd -q -- $tmp
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
>.zshrc <<\END
source ~/.p10k.zsh
source $ZDOTDIR/powerlevel10k/powerlevel10k.zsh-theme
END
builtin cd -q
ZDOTDIR=$tmp zsh --no-global-rcs
} always {
cd /
command rm -rf -- $tmp
}
)
Cloning into 'powerlevel10k'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 92 (delta 13), reused 63 (delta 10), pack-reused 0
Receiving objects: 100% (92/92), 424.95 KiB | 3.32 MiB/s, done.
Resolving deltas: 100% (13/13), done.
/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.nKyWWZGqMj/.zshrc:source:1: no such file or directory: /Users/patrick/.p10k.zsh
New config: /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.nKyWWZGqMj/.p10k.zsh.
Backup of /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.nKyWWZGqMj/.zshrc: $TMPDIR/.zshrc.pFPBXZOuQJ.
See /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.nKyWWZGqMj/.zshrc changes:
diff $TMPDIR/.zshrc.pFPBXZOuQJ /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.nKyWWZGqMj/.zshrc
File feature requests and bug reports at https://github.com/romkatv/powerlevel10k/issues
gitstatus_query_p9k_:print:56: write error: broken pipe
no such file or directory: /Users/patrick/.p10k.zsh
You didn't mention this error in your previous comment. Did you see it there too?
This file in a different path, which I have changed in the first clean zshrc you asked me to try. Fixed this in the clean shell version and still the same problem.
Cloning into 'powerlevel10k'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 92 (delta 13), reused 64 (delta 10), pack-reused 0
Receiving objects: 100% (92/92), 424.95 KiB | 3.40 MiB/s, done.
Resolving deltas: 100% (13/13), done.
gitstatus_query_p9k_:print:56: write error: broken pipe
This file in a different path, which I have changed in the first clean zsh you asked me to try.
Got it. If you change anything in the commands you are running, say so. Otherwise it's bound to cause confusion.
Let's try one more thing:
() (
emulate -L zsh -o err_return
local tmp
tmp="$(mktemp -d ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
{
builtin cd -q -- $tmp
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
>.zshrc <<\END
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
source $ZDOTDIR/powerlevel10k/powerlevel10k.zsh-theme
END
builtin cd -q
ZDOTDIR=$tmp zsh --no-global-rcs
} always {
cd /
command rm -rf -- $tmp
}
)
If you get an error again, run this and post the output here:
ps o pid,ppid,pgid,state,comm | grep gitstatus
Cloning into 'powerlevel10k'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 92 (delta 13), reused 64 (delta 10), pack-reused 0
Receiving objects: 100% (92/92), 424.95 KiB | 2.46 MiB/s, done.
Resolving deltas: 100% (13/13), done.
gitstatus_query_p9k_:print:56: write error: broken pipe
patrick@NZ99008ML ~ ps o pid,ppid,pgid,state,comm | grep gitstatus ✔ 1 22:03:01
patrick@NZ99008ML ~
Looks like the gitstatusd
is killed. You can see that from the original log I posted.
Looks like the
gitstatusd
is killed.
Indeed.
You can see that from the original log I posted.
The original post captures logs from zsh that uses your configs which have a lot more than powerlevel10k. They aren't very useful.
Let's try this:
() (
emulate -L zsh -o err_return -o xtrace
zmodload zsh/system
local tmp
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
{
local fd
zsystem flock -f fd -- $tmp
if ( zsystem flock -t 1 -- $tmp ); then
unsetopt xtrace
print -ru2 -- "flock is broken"
fi
} always {
command rm -rf -- $tmp
}
)
What's the output?
+(anon):2> zmodload zsh/system
+(anon):3> local tmp
+(anon):4> tmp=+(anon):4> mktemp /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.XXXXXXXXXX
+mktemp:1> /usr/local/bin/gmktemp /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.XXXXXXXXXX
+(anon):4> tmp=/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.OUYEtjk2z8
+(anon):6> local fd
+(anon):7> zsystem flock -f fd -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.OUYEtjk2z8
+(anon):8> zsystem flock -t 1 -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.OUYEtjk2z8
+(anon):13> rm -rf -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.OUYEtjk2z8
So flock
works. That's good. Let's see the logs then. Run this:
() (
emulate -L zsh -o err_return
local tmp
tmp="$(mktemp -d ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
{
builtin cd -q -- $tmp
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git
>.zshrc <<\END
GITSTATUS_LOG_LEVEL=DEBUG
POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true
source $ZDOTDIR/powerlevel10k/powerlevel10k.zsh-theme
END
builtin cd -q
ZDOTDIR=$tmp zsh --no-global-rcs
} always {
cd /
command rm -rf -- $tmp
}
)
When you get prompt, run this:
print '=== xtrace ===' && cat -- $GITSTATUS_XTRACE_POWERLEVEL9K && print '=== daemon ===' && cat -- $GITSTATUS_DAEMON_LOG_POWERLEVEL9K
Cloning into 'powerlevel10k'...
remote: Enumerating objects: 92, done.
remote: Counting objects: 100% (92/92), done.
remote: Compressing objects: 100% (78/78), done.
remote: Total 92 (delta 13), reused 64 (delta 10), pack-reused 0
Receiving objects: 100% (92/92), 424.95 KiB | 778.00 KiB/s, done.
Resolving deltas: 100% (13/13), done.
gitstatus_query_p9k_:print:56: write error: broken pipe
patrick@NZ99008ML ~ print '=== xtrace ===' && cat -- $GITSTATUS_XTRACE_POWERLEVEL9K && print '=== daemon ===' && cat -- $GITSTATUS_DAEMON_LOG_POWERLEVEL9K ✔ 1 22:24:21
=== xtrace ===
+(anon):7> setopt monitor
+(anon):9> (( ! _GITSTATUS_STATE_POWERLEVEL9K ))
+(anon):10> [[ -r /proc/version ]]
+(anon):13> print -rn
+(anon):14> zsystem flock -f lock_fd /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.lock
+(anon):15> [[ 13 == <1-> ]]
+(anon):18> typeset -gi '_GITSTATUS_LOCK_FD_POWERLEVEL9K=lock_fd'
+(anon):20> [[ darwin21.0 == cygwin* ]]
+(anon):41> sysopen -r -o cloexec -u resp_fd /dev/fd/12
+(anon):44> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=86478'
+(anon):46> [[ 15 == <1-> ]]
+(anon):47> typeset -gi '_GITSTATUS_RESP_FD_POWERLEVEL9K=resp_fd'
+(anon):48> typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=1'
+(anon):51> (( ! async ))
+(anon):52> (( _GITSTATUS_CLIENT_PID_POWERLEVEL9K == sysparams[pid] ))
+(anon):54> local pgid
+(anon):55> (( 0 < 20 ))
+(anon):56> [[ -t 15 ]]
+(anon):41> _gitstatus_daemon_p9k_
+(anon):57> sysread -s 20 -t 5.0000000000 -i 15 'pgid[$#pgid+1]'
+_gitstatus_daemon_p9k_:1> local -i pipe_fd
+(anon):55> (( 20 < 20 ))
+(anon):59> [[ ' 86478' == \ #<1-> ]]
+(anon):60> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=pgid'
+(anon):62> sysopen -w -o cloexec -u req_fd -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.fifo
+(anon):63> [[ 14 == <1-> ]]
+(anon):64> typeset -gi '_GITSTATUS_REQ_FD_POWERLEVEL9K=req_fd'
+(anon):66> print -nru 14 -- $'}hello\C-_\C-^'
+(anon):67> local expected=$'}hello\C-_0\C-^' actual
+(anon):68> (( 1 ))
+(anon):68> [[ ! -t 1 ]]
+(anon):71> local -F deadline=1
+(anon):73> true
+(anon):74> [[ -t 15 ]]
+(anon):75> sysread -s 1 -t 5.0000000000 -i 15 actual
+(anon):76> [[ $'}hello\C-_0\C-^' == }* ]]
+(anon):76> break
+(anon):113> (( deadline == 0 ))
+(anon):126> (( 1 < 9 ))
+(anon):127> [[ -t 15 ]]
+(anon):128> sysread -s 8 -t 5.0000000000 -i 15 'actual[$#actual+1]'
+(anon):126> (( 9 < 9 ))
+(anon):130> [[ $'}hello\C-_0\C-^' == }hello0 ]]
+(anon):144> zle -F 15 _gitstatus_process_response_POWERLEVEL9K-_p9k_
+(anon):157> add-zsh-hook zshexit _gitstatus_cleanup_POWERLEVEL9K-_p9k_
+add-zsh-hook:15> emulate -L zsh
+add-zsh-hook:17> local -a hooktypes
+add-zsh-hook:18> hooktypes=( chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name )
+add-zsh-hook:22> local usage='Usage: add-zsh-hook hook function\nValid hooks are:\n chpwd precmd preexec periodic zshaddhistory zshexit zsh_directory_name'
+add-zsh-hook:24> local opt
+add-zsh-hook:25> local -a autoopts
+add-zsh-hook:26> integer del list help
+add-zsh-hook:28> getopts dDhLUzk opt
+add-zsh-hook:55> shift 0
+add-zsh-hook:57> (( list ))
+add-zsh-hook:60> (( help || 2 != 2 || 6 == 0 ))
+add-zsh-hook:65> local hook=zshexit_functions
+add-zsh-hook:66> local fn=_gitstatus_cleanup_POWERLEVEL9K-_p9k_
+add-zsh-hook:68> (( del ))
+add-zsh-hook:83> (( 0 ))
+add-zsh-hook:89> typeset -ga zshexit_functions
+add-zsh-hook:90> set -A zshexit_functions _gitstatus_cleanup_POWERLEVEL9K-_p9k_
+add-zsh-hook:92> autoload -- _gitstatus_cleanup_POWERLEVEL9K-_p9k_
+(anon):162> (( lock_fd != -1 ))
+(anon):163> zf_rm -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.lock
+(anon):164> zsystem flock -u 13
+(anon):166> unset _GITSTATUS_LOCK_FD_POWERLEVEL9K
+(anon):168> typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=2'
=== daemon ===
+_gitstatus_daemon_p9k_:3> local pgid=86478
+_gitstatus_daemon_p9k_:4> [[ 86478 == <1-> ]]
+_gitstatus_daemon_p9k_:5> cd -q /
+_gitstatus_daemon_p9k_:90> (( lock_fd == -1 ))
+_gitstatus_daemon_p9k_:9> trap '' PIPE
+_gitstatus_daemon_p9k_:11> local uname_sm
+_gitstatus_daemon_p9k_:93> zsystem flock -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.lock
+_gitstatus_daemon_p9k_:12> uname_sm=+_gitstatus_daemon_p9k_:12> uname -sm
+_gitstatus_daemon_p9k_:12> uname_sm='darwin x86_64'
+_gitstatus_daemon_p9k_:13> [[ 'darwin x86_64' == [^\ ]##\ [^\ ]## ]]
+_gitstatus_daemon_p9k_:14> local uname_s=darwin
+_gitstatus_daemon_p9k_:15> local uname_m=x86_64
+_gitstatus_daemon_p9k_:17> [[ '' == <1-> ]]
+_gitstatus_daemon_p9k_:20> local cpus
+_gitstatus_daemon_p9k_:21> (( ! 1 ))
+_gitstatus_daemon_p9k_:21> [[ darwin == linux ]]
+_gitstatus_daemon_p9k_:22> cpus=+_gitstatus_daemon_p9k_:22> sysctl -n hw.ncpu
+_gitstatus_daemon_p9k_:22> cpus=8
+_gitstatus_daemon_p9k_:27> args+=( -t 16 )
+_gitstatus_daemon_p9k_:30> mkfifo -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.fifo
+_gitstatus_daemon_p9k_:31> print -rnu 14 -- ' 86478'
+_gitstatus_daemon_p9k_:33> zf_rm -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.fifo
+_gitstatus_daemon_p9k_:35> local _gitstatus_zsh_daemon _gitstatus_zsh_version _gitstatus_zsh_downloaded
+_gitstatus_daemon_p9k_:43> local gitstatus_plugin_dir_var=_gitstatus_plugin_dir_p9k_
+_gitstatus_daemon_p9k_:44> local gitstatus_plugin_dir=/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus
+_gitstatus_daemon_p9k_:45> set -- -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_daemon_p9k_:47> [[ 1 == (|-|+)<1-> ]]
+_gitstatus_daemon_p9k_:48> source /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/install
+/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/install:469> [ -z '' ']'
+/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/install:470> _gitstatus_install_main /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:1> [ -n 5.8 ']'
+_gitstatus_install_main:2> emulate -L sh -o no_unset
+_gitstatus_install_main:7> local argv1=/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus
+_gitstatus_install_main:8> shift
+_gitstatus_install_main:10> local no_check='' no_install='' uname_s='' uname_m='' gitstatus_dir='' dl_status='' e=''
+_gitstatus_install_main:11> local opt='' OPTARG='' OPTIND=1
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case d (h)
+_gitstatus_install_main:14> case d (n)
+_gitstatus_install_main:14> case d (f)
+_gitstatus_install_main:14> case d (d)
+_gitstatus_install_main:55> [ -n '' ']'
+_gitstatus_install_main:59> [ -z /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus ']'
+_gitstatus_install_main:63> gitstatus_dir=/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case s (h)
+_gitstatus_install_main:14> case s (n)
+_gitstatus_install_main:14> case s (f)
+_gitstatus_install_main:14> case s (d)
+_gitstatus_install_main:14> case s (p)
+_gitstatus_install_main:14> case s (e)
+_gitstatus_install_main:14> case s (m)
+_gitstatus_install_main:14> case s (s)
+_gitstatus_install_main:99> [ -n '' ']'
+_gitstatus_install_main:103> [ -z darwin ']'
+_gitstatus_install_main:107> uname_s=darwin
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case m (h)
+_gitstatus_install_main:14> case m (n)
+_gitstatus_install_main:14> case m (f)
+_gitstatus_install_main:14> case m (d)
+_gitstatus_install_main:14> case m (p)
+_gitstatus_install_main:14> case m (e)
+_gitstatus_install_main:14> case m (m)
+_gitstatus_install_main:88> [ -n '' ']'
+_gitstatus_install_main:92> [ -z x86_64 ']'
+_gitstatus_install_main:96> uname_m=x86_64
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case p (h)
+_gitstatus_install_main:14> case p (n)
+_gitstatus_install_main:14> case p (f)
+_gitstatus_install_main:14> case p (d)
+_gitstatus_install_main:14> case p (p)
+_gitstatus_install_main:66> [ -n '' ']'
+_gitstatus_install_main:70> [ -z 'printf '\''\001'\'' >&14' ']'
+_gitstatus_install_main:74> dl_status='printf '\''\001'\'' >&14'
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case e (h)
+_gitstatus_install_main:14> case e (n)
+_gitstatus_install_main:14> case e (f)
+_gitstatus_install_main:14> case e (d)
+_gitstatus_install_main:14> case e (p)
+_gitstatus_install_main:14> case e (e)
+_gitstatus_install_main:77> [ -n '' ']'
+_gitstatus_install_main:81> [ -z 14 ']'
+_gitstatus_install_main:85> e=14
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus -s darwin -m x86_64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:115> shift 11
+_gitstatus_install_main:117> : 14
+_gitstatus_install_main:118> : /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus
+_gitstatus_install_main:120> [ -n '' -a -n '' ']'
+_gitstatus_install_main:125> [ -z darwin ']'
+_gitstatus_install_main:129> [ -z x86_64 ']'
+_gitstatus_install_main:134> local daemon=''
+_gitstatus_install_main:135> local cache_dir=/Users/patrick/.cache/gitstatus
+_gitstatus_install_main:137> [ -z '' ']'
+_gitstatus_install_main:138> [ -n '' ']'
+_gitstatus_install_main:142> [ -z '' -a -e /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/usrbin/gitstatusd ']'
+_gitstatus_install_main:145> [ -n '' ']'
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line=''
+_gitstatus_install_main:163> [ -n '' ']'
+_gitstatus_install_main:163> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line='uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="cygwin_nt-10.0"; uname_m_glob="i686"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42";'
+_gitstatus_install_main:166> uname_s_glob=cygwin_nt-10.0
+_gitstatus_install_main:166> uname_m_glob=i686
+_gitstatus_install_main:166> file=gitstatusd-darwin-x86_64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42
+_gitstatus_install_main:168> [ -z cygwin_nt-10.0 -o -z i686 -o -z gitstatusd-darwin-x86_64 -o -z v1.5.1 -o -z fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42 ']'
+_gitstatus_install_main:177> case darwin (cygwin_nt-10.0)
+_gitstatus_install_main:177> case darwin (*)
+_gitstatus_install_main:179> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line='uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="cygwin_nt-10.0"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f";'
+_gitstatus_install_main:166> uname_s_glob=cygwin_nt-10.0
+_gitstatus_install_main:166> uname_m_glob=x86_64
+_gitstatus_install_main:166> file=gitstatusd-darwin-x86_64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f
+_gitstatus_install_main:168> [ -z cygwin_nt-10.0 -o -z x86_64 -o -z gitstatusd-darwin-x86_64 -o -z v1.5.1 -o -z c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f ']'
+_gitstatus_install_main:177> case darwin (cygwin_nt-10.0)
+_gitstatus_install_main:177> case darwin (*)
+_gitstatus_install_main:179> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line='uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="darwin"; uname_m_glob="arm64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe";'
+_gitstatus_install_main:166> uname_s_glob=darwin
+_gitstatus_install_main:166> uname_m_glob=arm64
+_gitstatus_install_main:166> file=gitstatusd-darwin-x86_64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe
+_gitstatus_install_main:168> [ -z darwin -o -z arm64 -o -z gitstatusd-darwin-x86_64 -o -z v1.5.1 -o -z ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe ']'
+_gitstatus_install_main:177> case darwin (darwin)
+_gitstatus_install_main:181> case x86_64 (arm64)
+_gitstatus_install_main:181> case x86_64 (*)
+_gitstatus_install_main:183> continue
+_gitstatus_install_main:161> IFS='' +_gitstatus_install_main:161> read -r line
+_gitstatus_install_main:162> line='uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="darwin"; uname_m_glob="x86_64"; file="gitstatusd-${uname_s}-${uname_m}"; version="v1.5.1"; sha256="b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160";'
+_gitstatus_install_main:166> uname_s_glob=darwin
+_gitstatus_install_main:166> uname_m_glob=x86_64
+_gitstatus_install_main:166> file=gitstatusd-darwin-x86_64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160
+_gitstatus_install_main:168> [ -z darwin -o -z x86_64 -o -z gitstatusd-darwin-x86_64 -o -z v1.5.1 -o -z b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160 ']'
+_gitstatus_install_main:177> case darwin (darwin)
+_gitstatus_install_main:181> case x86_64 (x86_64)
+_gitstatus_install_main:188> [ -z '' ']'
+_gitstatus_install_main:190> local daemon=/private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/usrbin/gitstatusd-darwin-x86_64
+_gitstatus_install_main:191> [ ! -e /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/p10k.JcK2PzN7Db/powerlevel10k/gitstatus/usrbin/gitstatusd-darwin-x86_64 ']'
+_gitstatus_install_main:192> daemon=/Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64
+_gitstatus_install_main:193> [ -e /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 ']'
+_gitstatus_install_main:195> [ -n /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 ']'
+_gitstatus_install_main:196> _gitstatus_install_daemon_found 0 _gitstatus_set_daemon_p9k_
+_gitstatus_install_daemon_found:1> local installed=0
+_gitstatus_install_daemon_found:2> shift
+_gitstatus_install_daemon_found:3> [ 1 '=' 0 ']'
+_gitstatus_install_daemon_found:3> _gitstatus_set_daemon_p9k_ /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 v1.5.1 0
+_gitstatus_set_daemon_p9k_:1> _gitstatus_zsh_daemon=/Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64
+_gitstatus_set_daemon_p9k_:2> _gitstatus_zsh_version=v1.5.1
+_gitstatus_set_daemon_p9k_:3> _gitstatus_zsh_downloaded=0
+_gitstatus_install_main:197> return
+_gitstatus_daemon_p9k_:49> [[ -n /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 ]]
+_gitstatus_daemon_p9k_:50> [[ -n v1.5.1 ]]
+_gitstatus_daemon_p9k_:51> [[ 0 == [01] ]]
+_gitstatus_daemon_p9k_:53> (( UID == EUID ))
+_gitstatus_daemon_p9k_:54> local home=/Users/patrick
+_gitstatus_daemon_p9k_:62> [[ -x /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 ]]
+_gitstatus_daemon_p9k_:63> HOME=/Users/patrick /Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64 -G v1.5.1 -s 1 -u 1 -d 1 -c 1 -m -1 -v DEBUG -t 16
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[0]: "/Users/patrick/.cache/gitstatus/gitstatusd-darwin-x86_64"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[1]: "-G"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[2]: "v1.5.1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[3]: "-s"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[4]: "1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[5]: "-u"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[6]: "1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[7]: "-d"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[8]: "1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[9]: "-c"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[10]: "1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[11]: "-m"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[12]: "-1"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[13]: "-v"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[14]: "DEBUG"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[15]: "-t"
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:186] argv[16]: "16"
[2021-12-03 22:24:21 0000000110945600 INFO src/thread_pool.cc:81] Spawning 16 thread(s)
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:201] Processing request: "}hello" for ""
[2021-12-03 22:24:21 0000000110945600 INFO src/response.cc:69] Replying without git status
[2021-12-03 22:24:21 0000000110945600 INFO src/timer.cc:64] Timing for: request: 0.031ms cpu
[2021-12-03 22:24:21 0000000110945600 INFO src/gitstatus.cc:204] Successfully processed request: "}hello" for ""
+_gitstatus_daemon_p9k_:93> [[ -e /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.lock ]]
+_gitstatus_daemon_p9k_:94> zf_rm -f -- /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.lock /private/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T/gitstatus.POWERLEVEL9K.503.86453.1638523461.1.fifo
+_gitstatus_daemon_p9k_:95> kill -- -86478
patrick@NZ99008ML ~
That's intriguing. Let's try this:
() {
emulate -L zsh -o err_return
zmodload zsh/system
zmodload -F zsh/files b:zf_rm
local tmp fd
{
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
zsystem flock -f fd -- $tmp
{
zsystem flock -- $tmp
[[ ! -e $tmp ]]
} &
command sleep 1
zf_rm -- $tmp
zsystem flock -u $fd
fd=
if ! wait %; then
print -ru2 -- "filesystem is broken"
return 1
fi
} always {
unsetopt err_return
[[ -z $tmp ]] || command rm -f -- $tmp
[[ -z $fd ]] || zsystem flock -u $fd
}
}
I have a good feeling about this one.
+(anon):2> zmodload zsh/system
+(anon):3> zmodload -F zsh/files b:zf_rm
+(anon):4> local tmp fd
+(anon):6> tmp=+(anon):6> mktemp /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.XXXXXXXXXX
+mktemp:1> /usr/local/bin/gmktemp /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.XXXXXXXXXX
+(anon):6> tmp=/var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.ugNJ6JXEjr
+(anon):8> local fd
fd=''
+(anon):9> zsystem flock -f fd -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.ugNJ6JXEjr
[2] 87713
+(anon):11> zsystem flock -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.ugNJ6JXEjr
+(anon):14> sleep 1
+(anon):15> zf_rm -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.ugNJ6JXEjr
+(anon):12> [[ ! -e /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.ugNJ6JXEjr ]]
+(anon):16> zsystem flock -u 14
+(anon):17> fd=''
[2] + 87713 exit 1 { zsystem flock -- $tmp; [[ ! -e $tmp ]]; }
+(anon):18> wait %
(anon):wait:18: %: no such job
+(anon):19> unsetopt xtrace
filesystem is broken
That's amazing! Let's try to narrow it down.
() {
emulate -L zsh -o err_return
zmodload zsh/datetime
zmodload -F zsh/files b:zf_rm
local tmp
{
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
local -i iters
local -F start=EPOCHREALTIME
zf_rm -- $tmp
while [[ -e $tmp ]]; do
(( ++iters ))
done
if (( iters )); then
local -F took_ms='1e3 * (EPOCHREALTIME - start)'
print -r -- "filesystem is broken"
typeset -p iters took_ms
else
print -r -- "filesystem works fine"
fi
} always {
unsetopt err_return
[[ -z $tmp ]] || command rm -f -- $tmp
}
}
filesystem works fine
Fascinating. Your filesystem has a bug, which is likely caused by the DLP software you are using. Basically, the script I posted in https://github.com/romkatv/powerlevel10k/issues/1655#issuecomment-985368364 shouldn't print "filesystem is broken" on a working filesystem.
Which DLP software are you using?
It's probably possible to work around this bug in gitstatus but I cannot promise to implement it.
Yeah. This DLP software does quite a few things. Including but not limited to, screen recording, file level encryption and maybe remote control?
It is this thing: http://ip-guard.com/en/
I could try to report this to the vendor, as we already have a reproducible example here. Do you mind explain what should be the correct behavior and how you manage to cause it? I can see you are trying to aquire a lock file but how does it different from creating a normal file?
I sent IP-guard a bug report.
Date: Fri, 3 Dec 2021 11:02:36 +0100 Subject: BUG: IP-guard breaks filesystem on Darwin 21.1.0 x86_64 From: Roman Perepelitsa roman.perepelitsa@gmail.com To: techsupport@ip-guard.com
To reproduce:
- Install IP-guard on Darwin 21.1.0 x86_64.
- Open Terminal.
- Start zsh if not already started.
- Run this command:
() { emulate -L zsh -o err_return zmodload zsh/system zmodload -F zsh/files b:zf_rm local tmp fd { tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)" zsystem flock -f fd -- $tmp { zsystem flock -- $tmp [[ ! -e $tmp ]] } & command sleep 1 zf_rm -- $tmp zsystem flock -u $fd fd= if ! wait %; then print -ru2 -- "filesystem is broken" return 1 fi } always { unsetopt err_return [[ -z $tmp ]] || command rm -f -- $tmp [[ -z $fd ]] || zsystem flock -u $fd } }
- Expected behavior: the command does NOT print "filesystem is broken".
- Actual behavior: the command prints "filesystem is broken".
Disabling IP-guard fixes the issue.
Roman.
zsystem flock
is documented in man zshmodules
(search for "flock").
I could try to report this to the vendor, as we already have a reproducible example here.
That probably wouldn't hurt. There is a fair chance my bug report will be ignored.
I think it is important to understand (and thus explain) what exactly is broken.
I've added some comments to the test code. Can you explain the questions for me please?
() {
# initialization
emulate -L zsh -o err_return
zmodload zsh/system
zmodload -F zsh/files b:zf_rm
local tmp fd
{
# make a temp file to lock
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
local fd
# lock the temp file
zsystem flock -f fd -- $tmp
{
# start a background process trying to acquire the lock
zsystem flock -- $tmp # this will block because file is locked
[[ ! -e $tmp ]]
} & # send to the background
command sleep 1
zf_rm -- $tmp # delete the temp file, thus releasing the lock?
zsystem flock -u $fd # explicitly release the lock.
# At this stage the background process should fail? because the lock is released but the file to lock is no longer exist.
# or would it succeed because it can now acquire a lock?
fd=
if ! wait %; then # wait for all background jobs? At this point there should be no jobs running because the background lock process has exited. So wouldn't it be the correct behaviour that this block is executed?
print -ru2 -- "filesystem is broken"
return 1
fi
} always {
# always clean up
unsetopt err_return
[[ -z $tmp ]] || command rm -f -- $tmp
[[ -z $fd ]] || zsystem flock -u $fd
}
}
Here's a better test case. I've also added comments to it.
() {
emulate -L zsh -o err_return -o no_notify -o prompt_percent
zmodload zsh/system
zmodload -F zsh/files b:zf_rm
local tmp fd
{
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
zsystem flock -f fd -- $tmp
# This block runs in a background process.
{
local PS4='%F{3}background process:%f '
setopt xtrace
# On a working system this will block until the line
# marked "B" is executed. On a system with IP-guard
# this will block only until the line marked "A" is
# executed.
zsystem flock -- $tmp
# On a working system the following test succeeds. On
# a system with IP-guard it fails. This is a direct
# consequence of `zsystem flock -- $tmp` behaving
# differently when the file is unlinked (see the comment
# above).
[[ ! -e $tmp ]]
} &
local PS4='%F{5}foreground process:%f '
# This block runs in the foreground process concurrently
# with the background process.
() {
setopt xtrace
command sleep 1
zf_rm -- $tmp # A
command sleep 1
zsystem flock -u $fd # B
command sleep 1
}
# Wait for the background process to finish.
if wait $!; then
print -P -- '\nFilesystem %F{2}works%f!'
else
print -Pu2 -- '\nFilesystem is %F{1}broken%f!'
return 1
fi
} always {
unsetopt err_return
[[ -z $tmp ]] || command rm -f -- $tmp
}
}
Try running it on a system with IP-guard and without and compare the traces.
Let's try a workaround. If it works, I'll apply it to gitstatus and you won't get errors even with IP-guard.
Please run this code on a system with IP-guard and post the output here:
() {
emulate -L zsh -o err_return -o no_notify -o prompt_percent
zmodload zsh/system
zmodload -F zsh/files b:zf_rm
local tmp fd
{
tmp="$(mktemp ${TMPDIR:-/tmp}/p10k.XXXXXXXXXX)"
zsystem flock -f fd -- $tmp
{
local PS4='%F{3}background process:%f '
setopt xtrace
zsystem flock -- $tmp
command sleep 2
[[ ! -e $tmp ]]
} &
local PS4='%F{5}foreground process:%f '
() {
setopt xtrace
command sleep 3
zf_rm -- $tmp
command sleep 1
zsystem flock -u $fd
command sleep 1
}
if wait $!; then
print -P -- '\nFilesystem %F{2}works%f!'
else
print -Pu2 -- '\nFilesystem is %F{1}broken%f!'
return 1
fi
} always {
unsetopt err_return
[[ -z $tmp ]] || command rm -f -- $tmp
}
}
[2] 41665
background process: zsystem flock -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.Vj2lACvc6w
foreground process: sleep 3
foreground process: zf_rm -- /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.Vj2lACvc6w
background process: sleep 2
foreground process: sleep 1
foreground process: zsystem flock -u 20
foreground process: sleep 1
background process: [[ ! -e /var/folders/km/8ygsr3lj0yn_14whfnj5gnpw0000gq/T//p10k.Vj2lACvc6w ]]
[2] + 41665 done { local PS4='%F{3}background process:%f ' ; setopt xtrace; zsystem flock -- ;}
Filesystem works!
So essentially, when IP guard kext is loaded, when unlinking a file, the related lock will be released immediately. In normal circumstances the lock will still hold and only be released if done so explicitly. Is that a correct understanding?
So essentially, when IP guard kext is loaded, when unlinking a file, the related lock will be released immediately. In normal circumstances the lock will still hold and only be released if done so explicitly. Is that a correct understanding?
That's exactly my understanding of the bug in IP-guard.
I've implemented a workaround in https://github.com/romkatv/gitstatus/commit/f1cf61b241a2a34514a8ff5f71dfb79a99d85c7c and merged it into powerlevel10k. Please update powerlevel10k and let me know if it works for you.
Works perfectly. Also you don't even need to sleep for 5. Just 1 second will fix it.
It's a race condition. If one of the processes doesn't get scheduled within 1 second, you'll get the same error as before. Normally this won't happen but under high load it might. With a 5s delay this becomes significantly less likely.
Thanks for your assistance in debugging this.
I've got an updated package from the vendor. I will give it a go later and see if it is fixed.
Wow, that was fast. I'm impressed.
I have this message showing up at the start up of every new shell session.
gitstatusd
is not running. This happens on bothv1.15.0
tag andmaster
.I have the feeling that it is related to a DLP software that we had to run, because this message does not appear when the DLP was temporarily disabled during a period of time. But I am not sure if it is the DLP that is killing the process or not. Maybe you can point me at the right direction.
I have enabled debug mode and included some debug information according to the instructions on other issues.
I 've also included the output from
xtrace.log
here.