Re: Tmux hangs after a while

2012-12-19 Thread Guang-Nan Cheng
Thanks for the tip. It seems related with epoll_wait. I have no idea what
it is.


> strace -p 578
Process 578 attached
*epoll_wait(3, *

> gdb
Missing separate debuginfos, use: debuginfo-install tmux-1.6-1.fc17.x86_64
(gdb) bt
*#0  0x7f18e7b9dc53 in __epoll_wait_nocancel () from /lib64/libc.so.6*
#1  0x7f18e82a8223 in ?? () from /lib64/libevent-2.0.so.5
#2  0x7f18e8293e00 in event_base_loop () from /lib64/libevent-2.0.so.5
#3  0x00404d20 in ?? ()
#4  0x00403537 in ?? ()
#5  0x7f18e7acd735 in __libc_start_main () from /lib64/libc.so.6
#6  0x0040374d in ?? ()
#7  0x7fff70392898 in ?? ()
#8  0x001c in ?? ()
#9  0x0002 in ?? ()
#10 0x7fff70393bd2 in ?? ()
#11 0x7fff70393bd7 in ?? ()
#12 0x in ?? ()

On Wed, Dec 19, 2012 at 12:59 AM, Thomas Adam  wrote:

> On 18 December 2012 16:11, Guang-Nan Cheng  wrote:
> > It happend again. This time, I don't even have a .tmux.conf file.
> >
> > Is there any trick so that I can send a signal to the PID and tmux will
> > print the stack so we know why it hangs?
>
> Attach strace to the server pid of tmux.  Or better yet, gdb, and
> issue "bt" to see if that helps any.
>
> -- Thomas Adam
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Tmux hangs after a while

2012-12-19 Thread Guang-Nan Cheng
Okay, PID 578 is the hanging attaching tmux clients. Here is the backtrace
for the original tmux server.

(gdb) bt
#0  0x7f8696181950 in __write_nocancel () at
../sysdeps/unix/syscall-template.S:82
#1  0x0042d1c0 in tty_stop_tty (tty=tty@entry=0xe12c68) at tty.c:242
#2  0x0042d35c in tty_close (tty=tty@entry=0xe12c68) at tty.c:272
#3  0x00423490 in server_client_msg_dispatch (c=0xe02b60) at
server-client.c:776
#4  0x0042372d in server_client_callback (fd=22, events=2,
data=0x7) at server-client.c:213
#5  0x7f86968850c2 in event_process_active_single_queue
(activeq=, base=) at event.c:1340
#6  event_process_active (base=) at event.c:1407
#7  event_base_loop (base=, flags=flags@entry=1) at
event.c:1604
#8  0x7f8696886131 in event_loop (flags=flags@entry=1) at event.c:1518
#9  0x00424f2a in server_loop () at server.c:210
#10 0x0042549f in server_start () at server.c:201
#11 0x00404829 in client_connect (path=0x66fc80
"/tmp//tmux-0/default", start_server=1) at client.c:80
#12 0x00404ca9 in client_main (argc=argc@entry=0,
argv=argv@entry=0x7fff03c09050,
flags=flags@entry=1) at client.c:152
#13 0x00403537 in main (argc=0, argv=0x7fff03c09050) at tmux.c:406

On Wed, Dec 19, 2012 at 7:39 PM, Guang-Nan Cheng  wrote:

> Thanks for the tip. It seems related with epoll_wait. I have no idea what
> it is.
>
>
> > strace -p 578
> Process 578 attached
> *epoll_wait(3, *
>
>  > gdb
> Missing separate debuginfos, use: debuginfo-install tmux-1.6-1.fc17.x86_64
> (gdb) bt
> *#0  0x7f18e7b9dc53 in __epoll_wait_nocancel () from /lib64/libc.so.6*
> #1  0x7f18e82a8223 in ?? () from /lib64/libevent-2.0.so.5
> #2  0x7f18e8293e00 in event_base_loop () from /lib64/libevent-2.0.so.5
> #3  0x00404d20 in ?? ()
> #4  0x00403537 in ?? ()
> #5  0x7f18e7acd735 in __libc_start_main () from /lib64/libc.so.6
> #6  0x0040374d in ?? ()
> #7  0x7fff70392898 in ?? ()
> #8  0x001c in ?? ()
> #9  0x0002 in ?? ()
> #10 0x7fff70393bd2 in ?? ()
> #11 0x7fff70393bd7 in ?? ()
> #12 0x in ?? ()
>
> On Wed, Dec 19, 2012 at 12:59 AM, Thomas Adam  wrote:
>
>> On 18 December 2012 16:11, Guang-Nan Cheng  wrote:
>> > It happend again. This time, I don't even have a .tmux.conf file.
>> >
>> > Is there any trick so that I can send a signal to the PID and tmux will
>> > print the stack so we know why it hangs?
>>
>> Attach strace to the server pid of tmux.  Or better yet, gdb, and
>> issue "bt" to see if that helps any.
>>
>> -- Thomas Adam
>>
>
>
--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Tmux hangs after a while

2012-12-19 Thread Nicholas Marriott

What tmux and libevent versions are you using?


On Wed, Dec 19, 2012 at 07:39:14PM +0800, Guang-Nan Cheng wrote:
>Thanks for the tip. It seems**related**with epoll_wait. I have no idea
>what it is.
>> strace -p 578
>Process 578 attached
>epoll_wait(3,**
>> gdb
>Missing separate debuginfos, use: debuginfo-install tmux-1.6-1.fc17.x86_64
>(gdb) bt
>#0 **0x7f18e7b9dc53 in __epoll_wait_nocancel () from /lib64/libc.so.6
>#1 **0x7f18e82a8223 in ?? () from /lib64/libevent-2.0.so.5
>#2 **0x7f18e8293e00 in event_base_loop () from
>/lib64/libevent-2.0.so.5
>#3 **0x00404d20 in ?? ()
>#4 **0x00403537 in ?? ()
>#5 **0x7f18e7acd735 in __libc_start_main () from /lib64/libc.so.6
>#6 **0x0040374d in ?? ()
>#7 **0x7fff70392898 in ?? ()
>#8 **0x001c in ?? ()
>#9 **0x0002 in ?? ()
>#10 0x7fff70393bd2 in ?? ()
>#11 0x7fff70393bd7 in ?? ()
>#12 0x in ?? ()
>On Wed, Dec 19, 2012 at 12:59 AM, Thomas Adam <[1]tho...@xteddy.org>
>wrote:
> 
>  On 18 December 2012 16:11, Guang-Nan Cheng <[2]chen...@gmail.com> wrote:
>  > It happend again. This time, I don't even have a .tmux.conf file.
>  >
>  > Is there any trick so that I can send a signal to the PID and tmux
>  will
>  > print the stack so we know why it hangs?
> 
>  Attach strace to the server pid of tmux. **Or better yet, gdb, and
>  issue "bt" to see if that helps any.
>  -- Thomas Adam
> 
> References
> 
>Visible links
>1. mailto:tho...@xteddy.org
>2. mailto:chen...@gmail.com

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Tmux hangs after a while

2012-12-19 Thread Nicholas Marriott
What happens if you kill the tmux client or close the terminal it is in?
Does the server recover?



On Wed, Dec 19, 2012 at 07:54:28PM +0800, Guang-Nan Cheng wrote:
>Okay, PID 578 is the hanging attaching tmux clients. Here is the backtrace
>for the original tmux server.
>(gdb) bt
>#0 **0x7f8696181950 in __write_nocancel () at
>../sysdeps/unix/syscall-template.S:82
>#1 **0x0042d1c0 in tty_stop_tty (tty=tty@entry=0xe12c68) at
>tty.c:242
>#2 **0x0042d35c in tty_close (tty=tty@entry=0xe12c68) at tty.c:272
>#3 **0x00423490 in server_client_msg_dispatch (c=0xe02b60) at
>server-client.c:776
>#4 **0x0042372d in server_client_callback (fd=22, events=2,
>data=0x7) at server-client.c:213
>#5 **0x7f86968850c2 in event_process_active_single_queue
>(activeq=, base=) at event.c:1340
>#6 **event_process_active (base=) at event.c:1407
>#7 **event_base_loop (base=, flags=flags@entry=1) at
>event.c:1604
>#8 **0x7f8696886131 in event_loop (flags=flags@entry=1) at
>event.c:1518
>#9 **0x00424f2a in server_loop () at server.c:210
>#10 0x0042549f in server_start () at server.c:201
>#11 0x00404829 in client_connect (path=0x66fc80
>"/tmp//tmux-0/default", start_server=1) at client.c:80
>#12 0x00404ca9 in client_main (argc=argc@entry=0,
>argv=argv@entry=0x7fff03c09050, flags=flags@entry=1) at client.c:152
>#13 0x00403537 in main (argc=0, argv=0x7fff03c09050) at tmux.c:406
>On Wed, Dec 19, 2012 at 7:39 PM, Guang-Nan Cheng <[1]chen...@gmail.com>
>wrote:
> 
>  Thanks for the tip. It seems**related**with epoll_wait. I have no idea
>  what it is.
>  > strace -p 578
>  Process 578 attached
>  epoll_wait(3,**
>  > gdb
>  Missing separate debuginfos, use: debuginfo-install
>  tmux-1.6-1.fc17.x86_64
>  (gdb) bt
>  #0 **0x7f18e7b9dc53 in __epoll_wait_nocancel () from
>  /lib64/libc.so.6
>  #1 **0x7f18e82a8223 in ?? () from /lib64/libevent-2.0.so.5
>  #2 **0x7f18e8293e00 in event_base_loop () from
>  /lib64/libevent-2.0.so.5
>  #3 **0x00404d20 in ?? ()
>  #4 **0x00403537 in ?? ()
>  #5 **0x7f18e7acd735 in __libc_start_main () from /lib64/libc.so.6
>  #6 **0x0040374d in ?? ()
>  #7 **0x7fff70392898 in ?? ()
>  #8 **0x001c in ?? ()
>  #9 **0x0002 in ?? ()
>  #10 0x7fff70393bd2 in ?? ()
>  #11 0x7fff70393bd7 in ?? ()
>  #12 0x in ?? ()
>  On Wed, Dec 19, 2012 at 12:59 AM, Thomas Adam <[2]tho...@xteddy.org>
>  wrote:
> 
>On 18 December 2012 16:11, Guang-Nan Cheng <[3]chen...@gmail.com>
>wrote:
>> It happend again. This time, I don't even have a .tmux.conf file.
>>
>> Is there any trick so that I can send a signal to the PID and tmux
>will
>> print the stack so we know why it hangs?
> 
>Attach strace to the server pid of tmux. **Or better yet, gdb, and
>issue "bt" to see if that helps any.
>-- Thomas Adam
> 
> References
> 
>Visible links
>1. mailto:chen...@gmail.com
>2. mailto:tho...@xteddy.org
>3. mailto:chen...@gmail.com

--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Tmux hangs after a while

2012-12-19 Thread Guang-Nan Cheng
No the server did not recover.

Here is some addition info that I found. It seems that tmux lost it's TTY?

 9655 *?*Ss   101:03 tmux


I tried the tip
here
but doesn't resolve my problem.

killall -s SIGUSR1 tmux


Here is the lsof -n -p 9655

COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
tmux9655 root  cwdDIR  253,1 4096 25690113 /root
tmux9655 root  rtdDIR  253,1 40962 /
tmux9655 root  txtREG  253,1   359328  2885247
/usr/bin/tmux
tmux9655 root  memREG  253,162464  2884171
/usr/lib64/libnss_files-2.15.so
tmux9655 root  memREG  253,1   141264  2884179
/usr/lib64/libpthread-2.15.so
tmux9655 root  memREG  253,119552  2884159
/usr/lib64/libdl-2.15.so
tmux9655 root  memREG  253,1  2062152  2884153
/usr/lib64/libc-2.15.so
tmux9655 root  memREG  253,1   106632  2884181
/usr/lib64/libresolv-2.15.so
tmux9655 root  memREG  253,144320  2884183
/usr/lib64/librt-2.15.so
tmux9655 root  memREG  253,1   287944  2883599
/usr/lib64/libevent-2.0.so.5.1.6
tmux9655 root  memREG  253,1   167608  2884216
/usr/lib64/libtinfo.so.5.9
tmux9655 root  memREG  253,1   147096  2884206
/usr/lib64/libncurses.so.5.9
tmux9655 root  memREG  253,114648  2884187
/usr/lib64/libutil-2.15.so
tmux9655 root  memREG  253,1   156160  2884146
/usr/lib64/ld-2.15.so
tmux9655 root0u   CHR1,3  0t0 1028 /dev/null
tmux9655 root1u   CHR1,3  0t0 1028 /dev/null
tmux9655 root2u   CHR1,3  0t0 1028 /dev/null
tmux9655 root3u  0,90 5608
anon_inode
tmux9655 root4u  unix 0x88090d3a16c0  0t040187 socket
tmux9655 root5u  unix 0x88090d3a1a00  0t040188 socket
tmux9655 root6u  unix 0x88090ed4db00  0t027332 socket
tmux9655 root7u  unix 0x88090d3a6800  0t040189
/tmp//tmux-0/default
tmux9655 root8u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root9u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   10u  unix 0x881017c75480  0t0 11670475
/tmp//tmux-0/default
tmux9655 root   11u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   12u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   13u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   14u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   15u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   16u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   17u  unix 0x88090d3a5140  0t0 11522912
/tmp//tmux-0/default
tmux9655 root   18u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   19u   CHR  136,6  0t09
/dev/pts/6
tmux9655 root   20u   CHR  136,0  0t03
/dev/pts/0
tmux9655 root   21u   CHR  136,0  0t03
/dev/pts/0
tmux9655 root   22u   CHR  136,0  0t03
/dev/pts/0
tmux9655 root   23u   CHR  136,0  0t03
/dev/pts/0
tmux9655 root   24u   CHR  136,6  0t09
/dev/pts/6
tmux9655 root   25u   CHR  136,6  0t09
/dev/pts/6
tmux9655 root   26u   CHR5,2  0t0 1158 /dev/ptmx
tmux9655 root   27u   CHR  136,6  0t09
/dev/pts/6



On Wed, Dec 19, 2012 at 8:13 PM, Nicholas Marriott <
nicholas.marri...@gmail.com> wrote:

> What happens if you kill the tmux client or close the terminal it is in?
> Does the server recover?
>
>
>
> On Wed, Dec 19, 2012 at 07:54:28PM +0800, Guang-Nan Cheng wrote:
> >Okay, PID 578 is the hanging attaching tmux clients. Here is the
> backtrace
> >for the original tmux server.
> >(gdb) bt
> >#0 **0x7f8696181950 in __write_nocancel () at
> >../sysdeps/unix/syscall-template.S:82
> >#1 **0x0042d1c0 in tty_stop_tty (tty=tty@entry=0xe12c68) at
> >tty.c:242
> >#2 **0x0042d35c in tty_close (tty=tty@entry=0xe12c68) at
> tty.c:272
> >#3 **0x00423490 in server_client_msg_dispatch (c=0xe02b60) at
> >server-client.c:776
> >#4 **0x0042372d in server_client_callback (fd=22, events=2,
> >data=0x7) at server-client.c:213
> >#5 **0x7f86968850c2 in event_process_active_single_queue
> >(activeq=, base=) at event.c:1340
> >#6 **event_process_active (base=) at event.c:1407
> >#7 **event_base_loop (base=, flags=flag

Re: status bar variables

2012-12-19 Thread Adrian Luff
tmux names are a not well understood feature it seems. A few details…

#T (Pane Title) is not used anywhere by default. You can manually add it to the 
status line.
#W (Window Name) is what's displayed in the status line by default.

These names can be set in tmux or using escape sequences. The tmux window name 
is set with
printf '\ek%s\e\\' "Window Name"

The pane title is the same as the xterm set terminal tab name sequence; you can 
use a single command to name your pane or terminal tab (depending on whether 
you're in tmux or not).
printf '\e]2;%s\e\\' "My Pane Title or Term Title"

Finally, since tmux uses the title sequence for panes you'll need a different 
(DCS) sequence to pass through a terminal tab title.
printf '\ePtmux;\e\e]2;%s\e\e\\' "Terminal Title"


I use these features in a few different ways via a bash alias functions…
* Terminal title to "tmux - ${HOSTNAME}" upon entering tmux.
* Pane Title (#T) to "ssh-user@ssh-host" and Window Name (#W) to "ssh host…" 
(abbreviated) when using ssh. Keeps the status line short.
* Reset the Pane Title (#T) to default after exiting vim, which is configured 
to show the current file in the #T field.
* I have a tmux window with several panes open tailing logs on several hosts. I 
set the Pane Title to the name of each log being viewed (in case I forget!).

These are some practical uses for Pane Titles and Window Names I've found. I'm 
sure there are more.

-Adrian

On Dec 18, 2012, at 1:42 AM, Thomas Adam  wrote:

> On 18 December 2012 02:36, Mark Volkmann  wrote:
>> I'm trying to understand the difference between #T and #W.
> 
> #T is the pane title, #W the window title.
> 
> The pane title will default to the hostname, or if that's not set the
> empty string -- when creating the pane (screen.c:screen_init()).  The
> pane title can still be changed after this point though.
> 
>> The PragProg tmux book says #T is the window title and #W is the window
>> name.
> 
> Yet another example from that book which is inaccurate then.  I'd
> contact the author if possible and mention that to him/her.
> 
> -- Thomas Adam
> 
> --
> LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
> Remotely access PCs and mobile devices and provide instant support
> Improve your efficiency, and focus on delivering more value-add services
> Discover what IT Professionals Know. Rescue delivers
> http://p.sf.net/sfu/logmein_12329d2d
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


--
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users