#74 tmux server crashes if a linked window is closed

Péter Juhász

Steps to reproduce:

  1. Open first terminal window
  2. Start tmux in first terminal window: tmux new -s 0
  3. Open second terminal window
  4. Resize second terminal window (so that its size is not the same as that of the first)
  5. Start tmux in second window: tmux new -s bar
  6. In the '0' session, link the window to the 'bar' session: tmux link-window -t bar
  7. In the 'bar' session, type exit

At this point tmux server crashes, both sessions are lost and I'm left with two useless terminals (until I reset them).

Interestingly, step 4. (resizing the window) seems critical: if the two terminals are of the same size, session 0 exits while session bar remains, as expected.

This was observed with tmux version 1.6 (default packaged with Ubuntu 12.04) and with version 1.8 (downloaded from SF and compiled locally).

Bash version: 4.2.25(1)
Gnome-terminal version:

uname -a: Linux **** 3.2.0-54-generic #82-Ubuntu SMP Tue Sep 10 20:08:42 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux


  • Does this happen with tmux from git?

  • Péter Juhász
    Péter Juhász

    Something even stranger happens with the git version.

    • In step 5, the second session doesn't seem to want to attach after creation: it throws me out after a split second. I have to 'tmux attach -t bar' separately.

    • It crashes right after I issue the 'tmux link-window' command. Or more precisely, I got the 'lost server' message in session bar, while the rirst '0' session seemed to persist - until I issued 'tmux ls' to see what's up: at that point I got the 'lost server' message there as well.

  • Thomas Adam
    Thomas Adam

    Which platform is this on?

    I've fixed this in Git for some time now.

    Can you please obtain a corefile from this, and hence a backtrace? I can't reproduce any crash with your instructions.

  • Péter Juhász
    Péter Juhász

    OK, the important thing is that I couldn't reproduce the originaly reported issue with the latest git version.

    The two other phenomena reported above happened because my .bashrc executes 'tmux display-message #I" to obtain the window number (to display it in the prompt), and apparently this caused a problem when I ran a newer tmux from a local directory.

    When I removed the offending line, the crashes ceased.

    You might want to look into this (that an older version of tmux can crash a newer version of tmux server running if there are more than one sessions), but this is a less severe issue.

    • status: open --> closed
    • Milestone: -->
  • mixing tmux versions is not supported, please let me know if you still see issues when client and server are the same version