Comment 7 for bug 1812387

Revision history for this message
Prasanna Loganathar (pvl) wrote : Re: tmux crash while installing tmux plugin manager

Hi Karl,

I've been able to reproduce it accurately, although the cause, now that I looked in a little closer is a little more intricate. Sometimes, the UI seems to recover behind the scenes hiding the crash, and sometimes it doesn't. Also ubuntu's default has a coredump limit set to 0, hiding the crashes even further.

I ran it as a full blown VM just so that I could duplicate the conditions of my initial crash more closely. (But it likely should work with lxc as well)

1. apt update && apt dist-upgrade -y && apt install tmux git
2. git clone https://github.com/tmux-plugins/tpm "$HOME/.config/tmux-plugins/tpm"
3. create tmux config

Here's my config (modified to reproduce this error):

```
# set prefix: Alt + e
set -g prefix M-e
# Let's bind this too, so that repeated
# presses work, esp. when nesting.
bind -n M-e send-prefix

# start window numbering at 1
set -g base-index 1
# start pane numbering at 1
set -g pane-base-index 1

# use mouse
set -g mouse on
setw -g mode-keys vi

# Use Alt-arrow keys WITHOUT PREFIX KEY to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D

set -g @scroll-down-exit-copy-mode off
set -g @scroll-without-changing-pane on
set -g @emulate-scroll-for-no-mouse-alternate-buffer on

# plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-pain-control'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'nhdaly/tmux-better-mouse-mode'
set -g @plugin 'tmux-plugins/tmux-logging'

## --------
## BUG-NOTE: This is the line that triggers the crash.
## While tpm is anyway set into .tmux/plugins/tpm, using that
## is probably the better config -- which works without the crash
## however, setting it to a different location like this, makes
## tmux crash
## --------
TPM_BIN='~/.config/tmux-plugins/tpm/tpm'
# && test -f "$TPM_DIR" && "$TPM_DIR"
run -b "test -f $TPM_BIN && $TPM_BIN || true"

```

4. Open tmux. Hit Alt+I (initializing tpm, that causes tmux to crash)
5. tree /var/crash -a
/var/crash/
├── .lock
└── _usr_bin_tmux.1000.crash