28

I am trying to shift from using VNC to tmux. My tmux keeps crashing at least once in a week and I am clueless why this happens. VNC rarely crashed and this weekly crash is a strong detrimental for me to completely switch.

Is there a way I can find out the reason tmux crashes ? My .tmux.conf is pretty simple

 #Don't show the green ribbon below set -g status off #Select panes by mouse click set -g mouse-select-pane on #enable scrolling by mouse in tmux set-window-option -g mode-mouse on #enable resize of pane by mouse set -g mouse-resize-pane on 

I use iterm2 with terminal mode set to 256 color and heavily use vim plugins and colorschemes(Lid, nerdtree, tagbar, indentLine, molokai etc.,). To adjust terminal color I had following setting in my .vimrc but I am not sure if these are in any way related to tmux crash

set t_ut= set t_Co=256 

Also, I have enabled mouse in my vim set mouse=a

Is there a way to find why my tmux session is crashing ?

EDIT: Attaching the final logs from my tmux-server

found key 0x1001: "" input_parse: ' ground input_c0_dispatch: ' input_parse: ' ' ground input_parse: ' ground input_c0_dispatch: ' keys are 1 () complete key 0x1001 writing key 0x1001 found key 0x1001: "" input_parse: ' ground input_c0_dispatch: ' input_parse: ' ' ground input_parse: ' ground input_c0_dispatch: ' keys are 1 () complete key 0x1001 writing key 0x1001 found key 0x1001: "" input_parse: ' ground input_c0_dispatch: ' input_parse: ' ' ground input_parse: ' ground input_c0_dispatch: ' keys are 1 () complete key 0x1001 writing key 0x1001 found key 0x1001: "" input_parse: '' ground input_c0_dispatch: ' got 5 from client 6 writing 4 to client 6 got 13 from client 6 
6
  • 7
    Can you start tmux using tmux -vvvv ? It will give you a logfile in the same directory called tmux-[...].log. Try to reproduce the crash and as soon as it crashes, post the last X lines of your error log here :)! Commented Jul 24, 2014 at 0:19
  • @polym I have started tmux as follows tmux -vvv -S default new-session -s $USER I will paste the log during the next crash Commented Jul 24, 2014 at 1:02
  • @polym Here is the output of tmux server after it crashed. user@server> tail tmux-server-33131.log input_parse: ' ' ground keys are 1 () complete key 0x2 keys are 1 (d) complete key d 0x64 cmdq 0x12c4460: detach-client (client 8) writing 1 to client 8 got 5 from client 8 writing 4 to client 8 lost client 8 user@server> Commented Jul 24, 2014 at 18:14
  • can you edit your question and put more of the logs (server and client) e.g. tail -n200 ? Commented Jul 24, 2014 at 20:04
  • @polym I have attached the logs to the question after tmux has crashed Commented Jul 28, 2014 at 22:22

4 Answers 4

25

I found this in the readme on the tmux GitHub page.

For debugging, running tmux with -v or -vv will generate server and client log files in the current directory.

In other words, unless you explicitly told it to log, it won't.

3

I was experiencing crashes related to my .tmux.conf, this is what I did to figure out:

Run tmux to get client, server and output log files.

tmux -vv

cat tmux-out-*.log

This will give you a hint of what is going on, if for example your config file wasn't parsed properly and the program has crashed before you were able read something.

Client and server logs could be accessed this way:

cat tmux-client-*.log

cat tmux-server-*.log

1
1

This may/will depend on the distro you're using, and whether or not debug/dev packages for tmux are installed, and whether or not it would dump core (if the OS settings permit it to). If it dumps core, and you have a debug version, you should be able to narrow the reason for the failure down quite nicely.

1

My tmux session just crashed when I changed the status bar settings (set -g status off ) Apparently there is some instability related to the status bar reconfiguration. c.f https://github.com/tmux/tmux/issues/1854

3
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review Commented Jul 13, 2022 at 16:07
  • @athul: Welcome to the Stack Exchange “Late answers” review queues! … I agree that the above is a weak answer because it is an ‘‘I’m having this problem, too’’ comment with a guess as to the cause and no remedy.  But it’s not a link-only answer.  A rule of thumb is to imagine the post with the link(s) removed.  If there’s nothing left but fluff (like “See this”), then it’s a link-only answer.  But the above is what “include the essential parts of the answer here and provide the link for reference” looks like. Commented Jul 13, 2022 at 18:35
  • okay understood.But only thing other than the link is i am too facing issue but not sure same.So i thought link only answer may be the right one. Commented Jul 14, 2022 at 9:58

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.