Skip to content
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

gitstatus failed to initialize on FreeBSD 13 #262

Closed
robotski opened this issue Sep 7, 2021 · 10 comments
Closed

gitstatus failed to initialize on FreeBSD 13 #262

robotski opened this issue Sep 7, 2021 · 10 comments

Comments

@robotski
Copy link

robotski commented Sep 7, 2021

`exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed mach error 2 errno 13
[powerlevel10k] fetching gitstatusd .. -exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed mach error 2 errno 13

[ERROR]: gitstatus failed to initialize.

Zsh log (/tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.xtrace.log):

+(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 /tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.lock
+(anon):15> [[ 16 == <1-> ]]
+(anon):18> typeset -gi '_GITSTATUS_LOCK_FD_POWERLEVEL9K=lock_fd'
+(anon):20> [[ freebsd13.0 == cygwin* ]]
+(anon):41> sysopen -r -o cloexec -u resp_fd /tmp/zshTEt5Yw
+(anon):44> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=38250'
+(anon):46> [[ 17 == <1-> ]]
+(anon):47> typeset -gi '_GITSTATUS_RESP_FD_POWERLEVEL9K=resp_fd'
+(anon):48> typeset -gi '_GITSTATUS_STATE_POWERLEVEL9K=1'
+(anon):51> ((  ! async  ))
+(anon):41> _gitstatus_daemon_p9k_
+_gitstatus_daemon_p9k_:1> local -i pipe_fd
+(anon):7> setopt monitor
+(anon):9> ((  ! _GITSTATUS_STATE_POWERLEVEL9K  ))
+(anon):51> ((  ! async  ))
+(anon):52> ((  _GITSTATUS_CLIENT_PID_POWERLEVEL9K == sysparams[pid]  ))
+(anon):54> local pgid
+(anon):55> ((  0 < 20  ))
+(anon):56> [[ -t 17 ]]
+(anon):57> sysread -s 20 -t 5.0000000000 -i 17 'pgid[$#pgid+1]'
+(anon):55> ((  20 < 20  ))
+(anon):59> [[ '               38250' == \ #<1-> ]]
+(anon):60> typeset -gi 'GITSTATUS_DAEMON_PID_POWERLEVEL9K=pgid'
+(anon):62> sysopen -w -o cloexec -u req_fd -- /tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.fifo
+(anon):63> [[ 19 == <1-> ]]
+(anon):64> typeset -gi '_GITSTATUS_REQ_FD_POWERLEVEL9K=req_fd'
+(anon):66> print -nru 19 -- $'}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 17 ]]
+(anon):75> sysread -s 1 -t 5.0000000000 -i 17 actual
+(anon):76> [[ $'}hello\C-_0\C-^' == �* ]]
+(anon):77> [[ $'\C-A' != � ]]
+(anon):85> ((  EPOCHREALTIME < deadline  ))
+(anon):86> ((  deadline > 0  ))
+(anon):87> deadline=0
+(anon):88> ((  stderr_fd  ))
+(anon):89> unsetopt xtrace

Daemon log (/tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.daemon.log):

+_gitstatus_daemon_p9k_:3> local pgid=38250
+_gitstatus_daemon_p9k_:4> [[ 38250 == <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 -- /tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.lock
+_gitstatus_daemon_p9k_:12> uname_sm=+_gitstatus_daemon_p9k_:12> uname -sm
+_gitstatus_daemon_p9k_:12> uname_sm='freebsd amd64'
+_gitstatus_daemon_p9k_:13> [[ 'freebsd amd64' == [^\ ]##\ [^\ ]## ]]
+_gitstatus_daemon_p9k_:14> local uname_s=freebsd
+_gitstatus_daemon_p9k_:15> local uname_m=amd64
+_gitstatus_daemon_p9k_:17> [[ '' == <1-> ]]
+_gitstatus_daemon_p9k_:20> local cpus
+_gitstatus_daemon_p9k_:21> ((  ! 1  ))
+_gitstatus_daemon_p9k_:21> [[ freebsd == 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 -- /tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.1.fifo
+_gitstatus_daemon_p9k_:31> print -rnu 14 -- '               38250'
+_gitstatus_daemon_p9k_:33> zf_rm -- /tmp/gitstatus.POWERLEVEL9K.1001.38079.1631055372.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=/usr/home/arladmin/powerlevel10k/gitstatus
+_gitstatus_daemon_p9k_:45> set -- -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_daemon_p9k_:47> [[ 1 == (|-|+)<1-> ]]
+_gitstatus_daemon_p9k_:48> source /usr/home/arladmin/powerlevel10k/gitstatus/install
+/usr/home/arladmin/powerlevel10k/gitstatus/install:467> [ -z '' ']'
+/usr/home/arladmin/powerlevel10k/gitstatus/install:468> _gitstatus_install_main /usr/home/arladmin/powerlevel10k/gitstatus -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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=/usr/home/arladmin/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 /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 /usr/home/arladmin/powerlevel10k/gitstatus ']'
+_gitstatus_install_main:63> gitstatus_dir=/usr/home/arladmin/powerlevel10k/gitstatus
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 freebsd ']'
+_gitstatus_install_main:107> uname_s=freebsd
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 amd64 ']'
+_gitstatus_install_main:96> uname_m=amd64
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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> : /usr/home/arladmin/powerlevel10k/gitstatus
+_gitstatus_install_main:120> [ -n '' -a -n '' ']'
+_gitstatus_install_main:125> [ -z freebsd ']'
+_gitstatus_install_main:129> [ -z amd64 ']'
+_gitstatus_install_main:134> local daemon=''
+_gitstatus_install_main:135> local cache_dir=/home/arladmin/.cache/gitstatus
+_gitstatus_install_main:137> [ -z '' ']'
+_gitstatus_install_main:138> [ -n '' ']'
+_gitstatus_install_main:142> [ -z '' -a -e /usr/home/arladmin/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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42 ']'
+_gitstatus_install_main:177> case freebsd (cygwin_nt-10.0)
+_gitstatus_install_main:177> case freebsd (*)
+_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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f ']'
+_gitstatus_install_main:177> case freebsd (cygwin_nt-10.0)
+_gitstatus_install_main:177> case freebsd (*)
+_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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe ']'
+_gitstatus_install_main:177> case freebsd (darwin)
+_gitstatus_install_main:177> case freebsd (*)
+_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="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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160 ']'
+_gitstatus_install_main:177> case freebsd (darwin)
+_gitstatus_install_main:177> case freebsd (*)
+_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="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";'
+_gitstatus_install_main:166> uname_s_glob=freebsd
+_gitstatus_install_main:166> uname_m_glob=amd64
+_gitstatus_install_main:166> file=gitstatusd-freebsd-amd64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426
+_gitstatus_install_main:168> [ -z freebsd -o -z amd64 -o -z gitstatusd-freebsd-amd64 -o -z v1.5.1 -o -z b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426 ']'
+_gitstatus_install_main:177> case freebsd (freebsd)
+_gitstatus_install_main:181> case amd64 (amd64)
+_gitstatus_install_main:188> [ -z '' ']'
+_gitstatus_install_main:190> local daemon=/usr/home/arladmin/powerlevel10k/gitstatus/usrbin/gitstatusd-freebsd-amd64
+_gitstatus_install_main:191> [ ! -e /usr/home/arladmin/powerlevel10k/gitstatus/usrbin/gitstatusd-freebsd-amd64 ']'
+_gitstatus_install_main:192> daemon=/home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64
+_gitstatus_install_main:193> [ -e /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 ']'
+_gitstatus_install_main:195> [ -n /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 ']'
+_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_ /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 v1.5.1 0
+_gitstatus_set_daemon_p9k_:1> _gitstatus_zsh_daemon=/home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64
+_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 /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 ]]
+_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=/home/arladmin
+_gitstatus_daemon_p9k_:62> [[ -x /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 ]]
+_gitstatus_daemon_p9k_:63> HOME=/home/arladmin /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 -G v1.5.1 -s -1 -u -1 -d -1 -c -1 -m -1 -v DEBUG -t 16
+_gitstatus_daemon_p9k_:64> local -i ret=134
+_gitstatus_daemon_p9k_:65> [[ 134 == (0|129|130|131|137|141|143|159) ]]
+_gitstatus_daemon_p9k_:68> ((  ! _gitstatus_zsh_downloaded  ))
+_gitstatus_daemon_p9k_:69> [[ 1 == (|-|+)<1-> ]]
+_gitstatus_daemon_p9k_:70> [[ /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 == /home/arladmin/.cache/gitstatus/* ]]
+_gitstatus_daemon_p9k_:73> set -- -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_daemon_p9k_:74> _gitstatus_zsh_daemon=''
+_gitstatus_daemon_p9k_:75> _gitstatus_zsh_version=''
+_gitstatus_daemon_p9k_:76> _gitstatus_zsh_downloaded=''
+_gitstatus_daemon_p9k_:77> source /usr/home/arladmin/powerlevel10k/gitstatus/install
+/usr/home/arladmin/powerlevel10k/gitstatus/install:467> [ -z '' ']'
+/usr/home/arladmin/powerlevel10k/gitstatus/install:468> _gitstatus_install_main /usr/home/arladmin/powerlevel10k/gitstatus -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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=/usr/home/arladmin/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 -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:14> case f (h)
+_gitstatus_install_main:14> case f (n)
+_gitstatus_install_main:14> case f (f)
+_gitstatus_install_main:48> [ -n '' ']'
+_gitstatus_install_main:52> no_check=1
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 /usr/home/arladmin/powerlevel10k/gitstatus ']'
+_gitstatus_install_main:63> gitstatus_dir=/usr/home/arladmin/powerlevel10k/gitstatus
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 freebsd ']'
+_gitstatus_install_main:107> uname_s=freebsd
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 amd64 ']'
+_gitstatus_install_main:96> uname_m=amd64
+_gitstatus_install_main:13> getopts :s:m:d:p:e:fnh opt -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -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 -f -d /usr/home/arladmin/powerlevel10k/gitstatus -s freebsd -m amd64 -p 'printf '\''\001'\'' >&14' -e 14 -- _gitstatus_set_daemon_p9k_
+_gitstatus_install_main:115> shift 12
+_gitstatus_install_main:117> : 14
+_gitstatus_install_main:118> : /usr/home/arladmin/powerlevel10k/gitstatus
+_gitstatus_install_main:120> [ -n 1 -a -n '' ']'
+_gitstatus_install_main:125> [ -z freebsd ']'
+_gitstatus_install_main:129> [ -z amd64 ']'
+_gitstatus_install_main:134> local daemon=''
+_gitstatus_install_main:135> local cache_dir=/home/arladmin/.cache/gitstatus
+_gitstatus_install_main:137> [ -z 1 ']'
+_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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z fe132c412c460c2889d731012d280207fe2b4a3c94d077fb4f1c06ed5d319a42 ']'
+_gitstatus_install_main:177> case freebsd (cygwin_nt-10.0)
+_gitstatus_install_main:177> case freebsd (*)
+_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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z c84cade0d6b86e04c27a6055f45851f6b46d6b88ba58772f7ca8ef4d295c800f ']'
+_gitstatus_install_main:177> case freebsd (cygwin_nt-10.0)
+_gitstatus_install_main:177> case freebsd (*)
+_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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z ad973948cca4bdcf83b7fcdda70c489a404488ea7304712721f1100b73ec7cbe ']'
+_gitstatus_install_main:177> case freebsd (darwin)
+_gitstatus_install_main:177> case freebsd (*)
+_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="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-freebsd-amd64
+_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-freebsd-amd64 -o -z v1.5.1 -o -z b13455d56cf7b6f07efb7da088057bbc1212847c88b59493918d6f9c0c157160 ']'
+_gitstatus_install_main:177> case freebsd (darwin)
+_gitstatus_install_main:177> case freebsd (*)
+_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="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";'
+_gitstatus_install_main:163> [ -n 'uname_s_glob="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";' ']'
+_gitstatus_install_main:165> local uname_s_glob='' uname_m_glob='' file='' version='' sha256=''
+_gitstatus_install_main:166> eval 'uname_s_glob="freebsd";        uname_m_glob="amd64";   file="gitstatusd-${uname_s}-${uname_m}";     version="v1.5.1"; sha256="b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426";'
+_gitstatus_install_main:166> uname_s_glob=freebsd
+_gitstatus_install_main:166> uname_m_glob=amd64
+_gitstatus_install_main:166> file=gitstatusd-freebsd-amd64
+_gitstatus_install_main:166> version=v1.5.1
+_gitstatus_install_main:166> sha256=b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426
+_gitstatus_install_main:168> [ -z freebsd -o -z amd64 -o -z gitstatusd-freebsd-amd64 -o -z v1.5.1 -o -z b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426 ']'
+_gitstatus_install_main:177> case freebsd (freebsd)
+_gitstatus_install_main:181> case amd64 (amd64)
+_gitstatus_install_main:188> [ -z 1 ']'
+_gitstatus_install_main:203> [ -n '' ']'
+_gitstatus_install_main:208> local daemon=/home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64
+_gitstatus_install_main:210> [ -n '' ']'
+_gitstatus_install_main:214> [ ! -d /home/arladmin/.cache/gitstatus ']'
+_gitstatus_install_main:214> [ ! -w /home/arladmin/.cache/gitstatus ']'
+_gitstatus_install_main:237> local tmpdir
+_gitstatus_install_main:238> command -v mktemp
+_gitstatus_install_main:239> tmpdir=+_gitstatus_install_main:239> mktemp -d /tmp/gitstatus-install.XXXXXXXXXX
+_gitstatus_install_main:239> tmpdir=/tmp/gitstatus-install.KVoNQ97EX1
+_gitstatus_install_main:265> command -v curl
+_gitstatus_install_main:320> local url1=https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-freebsd-amd64.tar.gz
+_gitstatus_install_main:321> local url2=https://gitee.com/romkatv/gitstatus/raw/release-v1.5.1/release/gitstatusd-freebsd-amd64.tar.gz
+_gitstatus_install_main:322> local sig='INT QUIT TERM ILL PIPE'
+_gitstatus_install_main:358> local trapped=''
+_gitstatus_install_main:359> trap 'trapped=1' INT QUIT TERM ILL PIPE
+_gitstatus_install_main:360> fetch 1 https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-freebsd-amd64.tar.gz
+_gitstatus_install_main:361> local pid1=39730
+fetch:1> [ 1 '!=' 1 ']'
+fetch:7> local cmd part url ret
+fetch:8> cmd=curl -q -kfsSL
+fetch:9> part=0
+fetch:10> true
+fetch:11> [ 0 '=' 2 ']'
+fetch:14> [ 0 '=' 0 ']'
+fetch:15> url=https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-freebsd-amd64.tar.gz
+fetch:19> run_cmd curl -q -kfsSL -- https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-freebsd-amd64.tar.gz
+run_cmd:1> command -v curl
+_gitstatus_install_main:362> fetch 2 https://gitee.com/romkatv/gitstatus/raw/release-v1.5.1/release/gitstatusd-freebsd-amd64.tar.gz
+run_cmd:2> local trapped='' pid die ret
+_gitstatus_install_main:363> local pid2=39833
+run_cmd:3> trap 'trapped=1' INT QUIT TERM ILL PIPE
+_gitstatus_install_main:365> local die='trap - INT QUIT TERM ILL PIPE; kill -- 39730 39833 2>/dev/null; wait -- 39730 39833 2>/dev/null; exit 1'
+fetch:1> [ 2 '!=' 1 ']'
+_gitstatus_install_main:366> trap 'trap - INT QUIT TERM ILL PIPE; kill -- 39730 39833 2>/dev/null; wait -- 39730 39833 2>/dev/null; exit 1' INT QUIT TERM ILL PIPE
+fetch:1> command -v sleep
+fetch:2> run_cmd sleep 2
+_gitstatus_install_main:367> [ -z '' ']'
+_gitstatus_install_main:369> local n=''
+run_cmd:1> command -v sleep
+_gitstatus_install_main:370> true
+run_cmd:2> local trapped='' pid die ret
+_gitstatus_install_main:371> [ -z 'printf '\''\001'\'' >&14' ']'
+_gitstatus_install_main:371> eval 'printf '\''\001'\'' >&14'
+run_cmd:3> trap 'trapped=1' INT QUIT TERM ILL PIPE
+_gitstatus_install_main:371> printf '\001'
+_gitstatus_install_main:372> command -v sleep
+run_cmd:7> ret=0
+run_cmd:6> curl -q -kfsSL -- https://github.com/romkatv/gitstatus/releases/download/v1.5.1/gitstatusd-freebsd-amd64.tar.gz
+run_cmd:8> [ 0 '=' 0 ']'
+run_cmd:9> pid=39948
+run_cmd:10> die='trap - INT QUIT TERM ILL PIPE; kill -- 39948 2>/dev/null; wait -- 39948 2>/dev/null; exit 1'
+run_cmd:11> trap 'trap - INT QUIT TERM ILL PIPE; kill -- 39948 2>/dev/null; wait -- 39948 2>/dev/null; exit 1' INT QUIT TERM ILL PIPE
+run_cmd:12> [ -z '' ']'
+run_cmd:13> wait -- 39948
+run_cmd:7> ret=0
+_gitstatus_install_main:373> sleep 1
+run_cmd:6> sleep 2
+run_cmd:8> [ 0 '=' 0 ']'
+run_cmd:9> pid=40104
+run_cmd:10> die='trap - INT QUIT TERM ILL PIPE; kill -- 40104 2>/dev/null; wait -- 40104 2>/dev/null; exit 1'
+run_cmd:11> trap 'trap - INT QUIT TERM ILL PIPE; kill -- 40104 2>/dev/null; wait -- 40104 2>/dev/null; exit 1' INT QUIT TERM ILL PIPE
+run_cmd:12> [ -z '' ']'
+run_cmd:13> wait -- 40104
+run_cmd:14> ret=0
+run_cmd:16> trap - INT QUIT TERM ILL PIPE
+run_cmd:17> [ -z '' ']'
+run_cmd:18> return 0
+fetch:20> ret=0
+fetch:21> [ 0 '=' 0 ']'
+fetch:22> check_sha256 1
+check_sha256:1> local data_file=/tmp/gitstatus-install.KVoNQ97EX1/1.tar.gz
+check_sha256:2> local hash_file=/tmp/gitstatus-install.KVoNQ97EX1/1.tar.gz.sha256
+check_sha256:3> local hash=''
+check_sha256:4> command -v shasum
+check_sha256:5> run_cmd shasum -b -a 256 -- /tmp/gitstatus-install.KVoNQ97EX1/1.tar.gz
+run_cmd:1> command -v shasum
+run_cmd:2> local trapped='' pid die ret
+run_cmd:3> trap 'trapped=1' INT QUIT TERM ILL PIPE
+run_cmd:7> ret=0
+run_cmd:6> shasum -b -a 256 -- /tmp/gitstatus-install.KVoNQ97EX1/1.tar.gz
+run_cmd:8> [ 0 '=' 0 ']'
+run_cmd:9> pid=40292
+run_cmd:10> die='trap - INT QUIT TERM ILL PIPE; kill -- 40292 2>/dev/null; wait -- 40292 2>/dev/null; exit 1'
+run_cmd:11> trap 'trap - INT QUIT TERM ILL PIPE; kill -- 40292 2>/dev/null; wait -- 40292 2>/dev/null; exit 1' INT QUIT TERM ILL PIPE
+run_cmd:12> [ -z '' ']'
+run_cmd:13> wait -- 40292
+run_cmd:14> ret=0
+run_cmd:16> trap - INT QUIT TERM ILL PIPE
+run_cmd:17> [ -z '' ']'
+run_cmd:18> return 0
+check_sha256:6> IFS='' +check_sha256:6> read -r hash
+check_sha256:7> hash=b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426
+check_sha256:25> [ 1 '=' 1 -a -z b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426 -o b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426 '=' b738c0967ba7a851bd758cd9fd836cddeec9fb4246afddc66ab4fed40c03e426 ']'
+fetch:22> break
+fetch:25> [ 0 '=' 0 ']'
+fetch:25> break
+fetch:30> echo -n
+fetch:31> return 0
+_gitstatus_install_main:377> [ -n 39730 -a -e /tmp/gitstatus-install.KVoNQ97EX1/1.status ']'
+_gitstatus_install_main:378> wait -- 39730
+_gitstatus_install_main:379> local ret=0
+_gitstatus_install_main:380> pid1=''
+_gitstatus_install_main:381> [ 0 '=' 0 ']'
+_gitstatus_install_main:382> [ -n 39833 ']'
+_gitstatus_install_main:383> kill -- 39833
+_gitstatus_install_main:384> wait -- 39833
+run_cmd:13> trap - INT QUIT TERM ILL PIPE
+run_cmd:13> kill -- 40104
+run_cmd:13> wait -- 40104
+run_cmd:13> exit 1
+_gitstatus_install_main:386> n=1
+_gitstatus_install_main:387> break
+_gitstatus_install_main:414> trap - INT QUIT TERM ILL PIPE
+_gitstatus_install_main:416> [ -z 1 ']'
+_gitstatus_install_main:426> tar -C /tmp/gitstatus-install.KVoNQ97EX1 -xzf /tmp/gitstatus-install.KVoNQ97EX1/1.tar.gz
+_gitstatus_install_main:428> local tmpfile
+_gitstatus_install_main:429> command -v mktemp
+_gitstatus_install_main:430> tmpfile=+_gitstatus_install_main:430> mktemp /home/arladmin/.cache/gitstatus/gitstatusd.XXXXXXXXXX
+_gitstatus_install_main:430> tmpfile=/home/arladmin/.cache/gitstatus/gitstatusd.TAqwo2eFpy
+_gitstatus_install_main:434> mv -f -- /tmp/gitstatus-install.KVoNQ97EX1/gitstatusd-freebsd-amd64 /home/arladmin/.cache/gitstatus/gitstatusd.TAqwo2eFpy
+_gitstatus_install_main:435> mv -f -- /home/arladmin/.cache/gitstatus/gitstatusd.TAqwo2eFpy /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64
+_gitstatus_install_main:435> exit
+_gitstatus_install_main:442> local ret=0
+_gitstatus_install_main:443> rm -rf -- /tmp/gitstatus-install.KVoNQ97EX1
+_gitstatus_install_main:444> [ 0 '=' 0 ']'
+_gitstatus_install_main:446> _gitstatus_install_daemon_found 1 _gitstatus_set_daemon_p9k_
+_gitstatus_install_daemon_found:1> local installed=1
+_gitstatus_install_daemon_found:2> shift
+_gitstatus_install_daemon_found:3> [ 1 '=' 0 ']'
+_gitstatus_install_daemon_found:3> _gitstatus_set_daemon_p9k_ /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 v1.5.1 1
+_gitstatus_set_daemon_p9k_:1> _gitstatus_zsh_daemon=/home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64
+_gitstatus_set_daemon_p9k_:2> _gitstatus_zsh_version=v1.5.1
+_gitstatus_set_daemon_p9k_:3> _gitstatus_zsh_downloaded=1
+_gitstatus_install_main:447> return
+_gitstatus_daemon_p9k_:78> [[ -n /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 ]]
+_gitstatus_daemon_p9k_:79> [[ -n v1.5.1 ]]
+_gitstatus_daemon_p9k_:80> [[ 1 == 1 ]]
+_gitstatus_daemon_p9k_:82> HOME=/home/arladmin /home/arladmin/.cache/gitstatus/gitstatusd-freebsd-amd64 -G v1.5.1 -s -1 -u -1 -d -1 -c -1 -m -1 -v DEBUG -t 16

System information:

zsh:      5.8
uname -a: FreeBSD nepenthe 13.0-RELEASE-p4 FreeBSD 13.0-RELEASE-p4 #0: Tue Aug 24 07:33:27 UTC 2021     [email protected]:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64`
@robotski
Copy link
Author

robotski commented Sep 8, 2021

I believe this has something to do with the new W^X memory mapping policy for user processes in FreeBSD 13.
Setting sysctl kern.elf64.allow_wx=1 causes gitstatus to run normally. Running elfctl -e +wxneeded on the gitstatusd binary also allows it to run normally, but I'm uncertain if this attribute can be preset for the repository.

@romkatv
Copy link
Owner

romkatv commented Sep 8, 2021

Thanks for letting me know. If you can tell me what I need to change and give me a reasonable explanation why it needs to be done, I'll do that. Otherwise it's unlikely I'll do anything about this issue.

@robotski
Copy link
Author

I'm not familiar with how this build system works, but running elfctl -e +wxneeded as root on the executable fixes things. Looks like it should go it build after compilation but before testing.

@romkatv
Copy link
Owner

romkatv commented Sep 10, 2021

Does that command have negative side effects? Why is it necessary?

@robotski
Copy link
Author

FreeBSD 13 has changed how it's memory mapping rules work, by default it's no longer possible for a page in memory to be set as both writable and executable. Code that tries to do this will abort, with a message along the lines of
exec_new_vmspace: mapping stack size 0x20000000 prot 0x7 failed mach error 2 errno 13 Abort trap

The elfctl command sets a flag on the binary that gives it an exception to that rule. Alternative seems to be rewrite your code to not write and execute to the same page, which would likely have a bad performance hit.

This all applies to OpenBSD as well, but I have no idea what the mitigation would be for that OS.

More details: https://ximalas.info/2021/04/15/freebsd-13-and-wx-memory-mapping-policy-for-user-processes/

@romkatv
Copy link
Owner

romkatv commented Sep 10, 2021

Thanks for the explanation.

gitstatusd doesn't requir memory to be executable and writable at the same time. It doesn't invoke mmap, doesn't employ JIT, or anything like that. It's a fairly boring binary, no fancy stuff at all. Maybe there is a compiler flag that causes this issue, or maybe a compiler flag can resolve it?

FWIW, you can build gitstatusd by cloning the repo and running ./build -w in its root directory. This will create ./usrbin/gitstatusd. I suppose ./usrbin/gitstatusd --help will crash.

@robotski
Copy link
Author

Just tried this, build -w still aborts. Did a bit of research, looks like it’s an upstream thing with gcc.
I think setting +wxneeded is the solution here, doesn’t seem like something that upstream is going to fix.

@romkatv
Copy link
Owner

romkatv commented Sep 12, 2021

Compiling with clang fixes the issue. I've release v1.5.3 with the fix. Please give it a try.

git -C /usr/home/arladmin/powerlevel10k pull && exec zsh

@robotski
Copy link
Author

Confirmed!
Thank you.

@romkatv
Copy link
Owner

romkatv commented Sep 14, 2021

Thanks for verifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants