tmux-plugins/tmux-continuum

Auto restore via continuum-restore often failing

usbhub opened this issue · 2 comments

I recently updated to ubuntu 20.04 and it seems that the continuum-restore setting is now only working about 50% of the time. Even before it would fail on occasion but now it seems almost every other time I have to manually restore with ctrl+b, ctrl+r . It may be unrelated to the ubuntu upgrade but something seems to have caused a failure/race condition to happen more frequently on my machine.

My .tmux.conf:

set-environment -g TMUX_PLUGIN_MANAGER_PATH ~/.tmux/plugins

# List of 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 @resurrect-capture-pane-contents 'on'
set -g @continuum-restore 'on'

# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run -b '~/.tmux/plugins/tpm/tpm'

I also have this issue. I had to comment out @continuum-restore 'on'.

Config

... settings ...

# -- plugin management --------------------------------------------------------

set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'

set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'

# -- tmux-continuum settings --------------------------------------------------

set -g @continuum-boot 'off'
#set -g @continuum-restore 'on' # breaks layout + adds empty panes
set -g @continuum-save-interval '15'

# -- tmux-resurrect settings --------------------------------------------------

set -g @resurrect-capture-pane-contents 'on'

# -- loading configs

# load config for macOS
if-shell '[[ "${DOTFILES_OS}" == "macos" ]] && [[ -f ~/.tmux/conf/.tmux.macos.conf ]]' 'source ~/.tmux/conf/.tmux.macos.conf'

# load config for linux
if-shell '[[ "${DOTFILES_OS}" == "linux" ]] && [[ -f ~/.tmux/conf/.tmux.linux.conf ]]' 'source ~/.tmux/conf/.tmux.linux.conf'

# load config for AIX
if-shell '[[ "${DOTFILES_OS}" == "aix" ]] && [[ -f ~/.tmux/conf/.tmux.aix.conf ]]' 'source ~/.tmux/conf/.tmux.aix.conf'

# load local config
if-shell '[[ -f ~/.tmux.conf.local ]]' 'source ~/.tmux.conf.local'

# -- plugin manager initialization --------------------------------------------

# initialize TMUX plugin manager (keep this line at the very bottom of any tmux conf, that is ran on its own)
run -b '~/.tmux/plugins/tpm/tpm'

Environment

  • os: macOS 12.3
  • tmux: 3.2a
  • tmux-continuum: refc2f31d 2022-01-25 | Merge pull request #103 from mattkatz/fix-tmux-systemd-path (HEAD -> master, origin/master, origin/HEAD) [Bruno Sutic (signed: E)]
  • tmux-resurrect: 027960a 2021-12-19 | Explain delayed pane content cleanup (HEAD -> master, origin/master, origin/HEAD)

My case is a bit different as TMUX exits with information about Connection refused

client log:

1687852941.183664 client started (7142): version 3.0a, socket /tmp/tmux-1354770099/default, protocol 8
1687852941.183702 on Linux 5.4.0-152-generic #169-Ubuntu SMP Tue Jun 6 22:23:09 UTC 2023; libevent 2.1.11-stable (poll)
1687852941.183733 socket is /tmp/tmux-1354770099/default
1687852941.183753 trying connect
1687852941.183776 connect failed: Connection refused
1687852941.183793 lock file is /tmp/tmux-1354770099/default.lock
1687852941.183834 flock succeeded
1687852941.183843 got lock (6)
1687852941.183854 trying connect
1687852941.183870 connect failed: Connection refused
1687852941.184103 add peer 0x557d88a29b10: 7 ((nil))
1687852941.184294 sending message 100 to peer 0x557d88a29b10 (4 bytes)
1687852941.184310 sending message 101 to peer 0x557d88a29b10 (6 bytes)
1687852941.184320 sending message 102 to peer 0x557d88a29b10 (11 bytes)
1687852941.184329 sending message 108 to peer 0x557d88a29b10 (17 bytes)
1687852941.184341 sending message 104 to peer 0x557d88a29b10 (0 bytes)
1687852941.184351 sending message 107 to peer 0x557d88a29b10 (4 bytes)
1687852941.184360 sending message 105 to peer 0x557d88a29b10 (16 bytes)
1687852941.184369 sending message 105 to peer 0x557d88a29b10 (19 bytes)
1687852941.184378 sending message 105 to peer 0x557d88a29b10 (22 bytes)
1687852941.184388 sending message 105 to peer 0x557d88a29b10 (130 bytes)
1687852941.184397 sending message 105 to peer 0x557d88a29b10 (15 bytes)
1687852941.184407 sending message 105 to peer 0x557d88a29b10 (11 bytes)
1687852941.184416 sending message 105 to peer 0x557d88a29b10 (36 bytes)
1687852941.184425 sending message 105 to peer 0x557d88a29b10 (36 bytes)
1687852941.184434 sending message 105 to peer 0x557d88a29b10 (23 bytes)
1687852941.184447 sending message 105 to peer 0x557d88a29b10 (20 bytes)
1687852941.184457 sending message 105 to peer 0x557d88a29b10 (32 bytes)
1687852941.184466 sending message 105 to peer 0x557d88a29b10 (39 bytes)
1687852941.184475 sending message 105 to peer 0x557d88a29b10 (45 bytes)
1687852941.184485 sending message 105 to peer 0x557d88a29b10 (56 bytes)
1687852941.184494 sending message 105 to peer 0x557d88a29b10 (17 bytes)
1687852941.184503 sending message 105 to peer 0x557d88a29b10 (37 bytes)
1687852941.184511 sending message 105 to peer 0x557d88a29b10 (60 bytes)
1687852941.184520 sending message 105 to peer 0x557d88a29b10 (21 bytes)
1687852941.184529 sending message 105 to peer 0x557d88a29b10 (23 bytes)
1687852941.184538 sending message 105 to peer 0x557d88a29b10 (15 bytes)
1687852941.184547 sending message 105 to peer 0x557d88a29b10 (17 bytes)
1687852941.184556 sending message 105 to peer 0x557d88a29b10 (34 bytes)
1687852941.184565 sending message 105 to peer 0x557d88a29b10 (52 bytes)
1687852941.184574 sending message 105 to peer 0x557d88a29b10 (19 bytes)
1687852941.184583 sending message 105 to peer 0x557d88a29b10 (8 bytes)
1687852941.184592 sending message 105 to peer 0x557d88a29b10 (21 bytes)
1687852941.184601 sending message 105 to peer 0x557d88a29b10 (30 bytes)
1687852941.184610 sending message 105 to peer 0x557d88a29b10 (32 bytes)
1687852941.184619 sending message 105 to peer 0x557d88a29b10 (11 bytes)
1687852941.184631 sending message 105 to peer 0x557d88a29b10 (8 bytes)
1687852941.184641 sending message 105 to peer 0x557d88a29b10 (32 bytes)
1687852941.184650 sending message 105 to peer 0x557d88a29b10 (1506 bytes)
1687852941.184671 sending message 105 to peer 0x557d88a29b10 (21 bytes)
1687852941.184686 sending message 105 to peer 0x557d88a29b10 (44 bytes)
1687852941.184696 sending message 105 to peer 0x557d88a29b10 (80 bytes)
1687852941.184705 sending message 105 to peer 0x557d88a29b10 (16 bytes)
1687852941.184715 sending message 106 to peer 0x557d88a29b10 (0 bytes)
1687852941.184733 sending message 200 to peer 0x557d88a29b10 (4 bytes)
1687852941.184744 client loop enter
1687852941.836677 peer 0x557d88a29b10 message 207
1687852941.836712 sending message 208 to peer 0x557d88a29b10 (0 bytes)
1687852942.899467 peer 0x557d88a29b10 message 203
1687852942.899494 sending message 205 to peer 0x557d88a29b10 (0 bytes)
1687852942.901161 peer 0x557d88a29b10 message 204
1687852942.901199 client loop exit

server error:

1687852941.868716 remove peer 0x557d88c23ec0
1687852941.868734 unref client 0x557d88c46130 (1 references)
1687852941.868743 recalculate_sizes: @0 is 239,62
1687852941.868759 job error 0x557d88aabd70: /home/user/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh, pid 7370
1687852941.868766 server_signal: Child exited
1687852941.868791 job died 0x557d88aabd70: /home/user/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh, pid 7370
1687852941.868801 format_job_complete: 0x557d88a44930 /home/user/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh:
1687852941.868808 free job 0x557d88aabd70: /home/user/.tmux/plugins/tmux-continuum/scripts/continuum_save.sh
1687852941.868822 free client 0x557d88c46130 (0 references)
1687852941.868831 cmdq_next <global>: empty
1687852941.868837 cmdq_next </dev/pts/1>: empty

[...]

1687852942.889668 cmd_find_target: idx=1
1687852942.889674 cmdq_error: can't find next session
1687852942.889682 sending message 211 to peer 0x557d88c34a70 (8200 bytes)
1687852942.889696 server_client_push_stderr: client 0x557d88c259c0, sent 24, left 0

[...]
1687852942.901414 cmd_find_target: error
1687852942.901422 cmd_find_best_session: 0 sessions to try
1687852942.901431 cmd_find_current_client: no target, return (nil)
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'tmux-plugins/tmux-cpu'

set -g @continuum-restore 'on'
set -g @continuum-boot 'on'
set -g status-right '#{cpu_bg_color} CPU: #{cpu_icon} #{cpu_percentage} | RAM: #{ram_icon} #{ram_percentage} | %a %d-%m-%y %H:%M '
set -g status-right-length 60

# Start windows and panes at 1, not 0
set -g base-index 1
setw -g pane-base-index 1

# Excape-time
set-option -sg escape-time 10

# Terminal colors
set-option -g default-terminal "screen-256color"

run '~/.tmux/plugins/tpm/tpm'

but when I comment out #set -g @continuum-restore 'on' it works well.