Closed harshasrisri closed 4 years ago
I am seeing this behavior on OSX (10.14.6) as well (tmux 3.1b).
I am also experiencing hanging issues on Ubuntu 16.04.2, although they aren't the same as yours. I can start a new tmux session, but none of the plugins are loaded. Furthermore, if I run tmux source ~/.tmux.conf
outside of tmux, it hangs when the last line of ~/.tmux.conf
is run '~/.tmux/plugins/tpm/tpm'
. (It doesn't hang with the -b
flag, but the current README says to remove the flag. Either way, plugins aren't loaded in a new tmux session.)
@harshasrisri, how did you trace your issue?
I traced the good old way using some echo statements to see at what point the statements stop showing. The last line in tmux.conf
is invoking the tpm shell script.
run -b
simply runs the script in the background, so tmux can start in that case, but the plugins may not load. At least, thats what happened when I used run -b
I tried echo statements, but am not seeing any at all (even at the beginning of the main function).
I reproduced the hanging issue after disabling my ~/.zshrc, deleting my ~/.tmux/plugins and installing a fresh copy of tpm, and using a .tmux.conf that only loads and runs the tpm plugin:
set -g @plugin 'tmux-plugins/tpm'
run '~/.tmux/plugins/tpm/tpm'
Here is an example of a session:
$ tmux -V
tmux 3.1b
$ tmux ls
no server running on /tmp/tmux-16655/default
$ tmux
^\zsh: quit (core dumped)
$ tmux ls
$ tmux
[exited]
$ tmux ls
$ tmux kill-server
$ tmux ls
no server running on /tmp/tmux-16655/default
$ tmux
^\zsh: quit (core dumped)
Some notable behaviors are:
I can confirm that this reflects my experience too. I forgot to mention earlier that I ran the tpm script directly from the shell to trace.
Installing a tmux binary using the zinit plugin manager resolved this issue for me, but I have no idea why.
Could you please share how you installed a tmux binary using zinit?
Check out the installation instructions on the page. The relevant snippets in my .zshrc are:
### Added by Zinit's installer
if [[ ! -f $HOME/.zinit/bin/zinit.zsh ]]; then
print -P "%F{33}▓▒░ %F{220}Installing %F{33}DHARMA%F{220} Initiative Plugin Manager (%F{33}zdharma/zinit%F{220})…%f"
command mkdir -p "$HOME/.zinit" && command chmod g-rwX "$HOME/.zinit"
command git clone https://github.com/zdharma/zinit "$HOME/.zinit/bin" && \
print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b" || \
print -P "%F{160}▓▒░ The clone has failed.%f%b"
fi
source "$HOME/.zinit/bin/zinit.zsh"
autoload -Uz _zinit
(( ${+_comps} )) && _comps[zinit]=_zinit
# Load a few important annexes, without Turbo
# (this is currently required for annexes)
zinit light-mode for \
zinit-zsh/z-a-rust \
zinit-zsh/z-a-as-monitor \
zinit-zsh/z-a-patch-dl \
zinit-zsh/z-a-bin-gem-node
### End of Zinit's installer chunk
zinit ice from"gh-r" as"program" mv"tmux* -> tmux"
zinit light tmux/tmux
Issue couldn't be reproduced from tmux master branch. https://github.com/tmux/tmux/issues/2360
I use the same tmux.conf on 4 different hosts, 3 of which aren't posing this problem. On the problematic host, however, starting a new session is hanging. I don't have any existing sessions to test attach. I tried to trace the issue and found that line ~/.tmux/plugins/tpm/tpm:21 is freezing when tpm is starting up. I don't know what to do further. OS: Ubuntu 20.04 Tmux versions tried: 3.0a(Ubuntu) and 3.1b(linuxbrew)