Re: Tmux unexpectedly crashed
Hi Can you reproduce this problem? On Tue, Aug 14, 2012 at 04:01:04PM -0700, John Magolske wrote: > * Nicholas Marriott [120814 15:46]: > > Type "bt" at the (gdb) prompt and show me the output please. > > Ah, sorry...thought I was missing something there. > > [...] > Core was generated by `tmux'. > Program terminated with signal 6, Aborted. > #0 0xb74f7667 in *__GI_raise (sig=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:64 > 64 ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory. > (gdb) bt > #0 0xb74f7667 in *__GI_raise (sig=6) at > ../nptl/sysdeps/unix/sysv/linux/raise.c:64 > #1 0xb74faa52 in *__GI_abort () at abort.c:92 > #2 0xb753114d in __libc_message (do_abort=2, fmt=0xb75f4c30 "*** glibc > detected *** %s: %s: 0x%s ***\n") > at ../sysdeps/unix/sysv/linux/libc_fatal.c:189 > #3 0xb753b24a in malloc_printerr (action=, str=0x6 0x6 out of bounds>, ptr=0xb87b33e8) at malloc.c:6283 > #4 0xb753e3c2 in _int_malloc (av=, bytes=) at > malloc.c:4308 > #5 0xb753f3da in __libc_calloc (n=18, elem_size=1) at malloc.c:4065 > #6 0xb77001a0 in ?? () > #7 0xb770024a in ?? () > #8 0xb7700312 in ?? () > #9 0xb7708910 in ?? () > #10 0xb7701f9f in ?? () > #11 0xb7701ffc in ?? () > #12 0xb77045ce in ?? () > #13 0xb7704b4e in ?? () > #14 0xb76e07e5 in ?? () > #15 0xb76e0e00 in ?? () > #16 0xb76df2fb in main () > (gdb) > > John > > -- > John Magolske > http://B79.net/contact > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > ___ > tmux-users mailing list > tmux-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/tmux-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
join-pane crashes with revision 2860
After updating tmux-1.7 to revision 2860 join-pane doesn't work any longer. One can reproduce it (without any ~/.tmux.conf file) with % tmux-1.7 new \; neww -d \; joinp -s 1 -t 0 [lost server] and tmux-1.7 dumps core. % gdb -q tmux-1.7 tmux-1.7.core Core was generated by `tmux-1.7'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libutil.so.9...done. Loaded symbols for /lib/libutil.so.9 Reading symbols from /lib/libncurses.so.8...done. Loaded symbols for /lib/libncurses.so.8 Reading symbols from /usr/local/lib/libevent-1.4.so.4...done. Loaded symbols for /usr/local/lib/libevent-1.4.so.4 Reading symbols from /lib/libc.so.7...done. Loaded symbols for /lib/libc.so.7 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 0x004306bf in window_name_callback (fd=-1, events=1, data=0x8014173c0) at /usr/opt/cvs/tmux/trunk/names.c:60 60 if (w->active->screen != &w->active->base) (gdb) bt #0 0x004306bf in window_name_callback (fd=-1, events=1, data=0x8014173c0) at /usr/opt/cvs/tmux/trunk/names.c:60 #1 0x7fffc8a0 in ?? () Current language: auto; currently minimal (gdb) q % uname -a FreeBSD pumpkin.fth-devel.net 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 r239174: Fri Aug 10 15:06:57 CEST 2012 r...@pumpkin.fth-devel.net:/usr/obj/usr/src/sys/PUMPKIN amd64 % cd /usr/opt/cvs/tmux && svn info Path: . Working Copy Root Path: /usr/opt/cvs/tmux URL: https://tmux.svn.sourceforge.net/svnroot/tmux Repository Root: https://tmux.svn.sourceforge.net/svnroot/tmux Repository UUID: 303bd1e2-03bb-47f1-b221-2a0928954661 Revision: 2860 Node Kind: directory Schedule: normal Last Changed Author: nicm Last Changed Rev: 2860 Last Changed Date: 2012-08-14 11:38:34 +0200 (Tue, 14 Aug 2012) Mike -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: join-pane crashes with revision 2860
You're right. This is cos windows can now stick around w/o having any panes or winlinks. This is the fix: Index: names.c === --- names.c (revision 2860) +++ names.c (working copy) @@ -50,6 +50,9 @@ struct window *w = data; char*name, *wname; + if (w->active == NULL) + return; + if (!options_get_number(&w->options, "automatic-rename")) { if (event_initialized(&w->name_timer)) event_del(&w->name_timer); Index: tmux.h === --- tmux.h (revision 2860) +++ tmux.h (working copy) @@ -2086,6 +2086,7 @@ struct window_pane *window_pane_find_left(struct window_pane *); struct window_pane *window_pane_find_right(struct window_pane *); voidwindow_set_name(struct window *, const char *); +voidwindow_remove_ref(struct window *); voidwinlink_clear_flags(struct winlink *); voidwindow_mode_attrs(struct grid_cell *, struct options *); Index: window.c === --- window.c(revision 2860) +++ window.c(working copy) @@ -179,13 +179,8 @@ free(wl->status_text); free(wl); - if (w != NULL) { - if (w->references == 0) - fatal("bad reference count"); - w->references--; - if (w->references == 0) - window_destroy(w); - } + if (w != NULL) + window_remove_ref(w); } struct winlink * @@ -360,6 +355,16 @@ } void +window_remove_ref(struct window *w) +{ + if (w->references == 0) + fatal("bad reference count"); + w->references--; + if (w->references == 0) + window_destroy(w); +} + +void window_set_name(struct window *w, const char *new_name) { free(w->name); Index: notify.c === --- notify.c(revision 2860) +++ notify.c(working copy) @@ -124,7 +124,8 @@ if (ne->session != NULL) ne->session->references--; if (ne->window != NULL) - ne->window->references--; + window_remove_ref(ne->window); + TAILQ_REMOVE(¬ify_queue, ne, entry); free(ne); } On Thu, Aug 16, 2012 at 04:06:30PM +0200, Michael Scholz wrote: > After updating tmux-1.7 to revision 2860 join-pane doesn't work any > longer. One can reproduce it (without any ~/.tmux.conf file) with > > % tmux-1.7 new \; neww -d \; joinp -s 1 -t 0 > [lost server] > > and tmux-1.7 dumps core. > > % gdb -q tmux-1.7 tmux-1.7.core > Core was generated by `tmux-1.7'. > Program terminated with signal 11, Segmentation fault. > Reading symbols from /lib/libutil.so.9...done. > Loaded symbols for /lib/libutil.so.9 > Reading symbols from /lib/libncurses.so.8...done. > Loaded symbols for /lib/libncurses.so.8 > Reading symbols from /usr/local/lib/libevent-1.4.so.4...done. > Loaded symbols for /usr/local/lib/libevent-1.4.so.4 > Reading symbols from /lib/libc.so.7...done. > Loaded symbols for /lib/libc.so.7 > Reading symbols from /libexec/ld-elf.so.1...done. > Loaded symbols for /libexec/ld-elf.so.1 > #0 0x004306bf in window_name_callback (fd=-1, events=1, > data=0x8014173c0) at /usr/opt/cvs/tmux/trunk/names.c:60 > 60if (w->active->screen != &w->active->base) > (gdb) bt > #0 0x004306bf in window_name_callback (fd=-1, events=1, > data=0x8014173c0) at /usr/opt/cvs/tmux/trunk/names.c:60 > #1 0x7fffc8a0 in ?? () > Current language: auto; currently minimal > (gdb) q > > % uname -a > FreeBSD pumpkin.fth-devel.net 9.1-PRERELEASE FreeBSD 9.1-PRERELEASE #0 > r239174: Fri Aug 10 15:06:57 CEST 2012 > r...@pumpkin.fth-devel.net:/usr/obj/usr/src/sys/PUMPKIN amd64 > > % cd /usr/opt/cvs/tmux && svn info > Path: . > Working Copy Root Path: /usr/opt/cvs/tmux > URL: https://tmux.svn.sourceforge.net/svnroot/tmux > Repository Root: https://tmux.svn.sourceforge.net/svnroot/tmux > Repository UUID: 303bd1e2-03bb-47f1-b221-2a0928954661 > Revision: 2860 > Node Kind: directory > Schedule: normal > Last Changed Author: nicm > Last Changed Rev: 2860 > Last Changed Date: 2012-08-14 11:38:34 +0200 (Tue, 14 Aug 2012) > > Mike > > -- > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > ___ > tmux-users mailing list > tmux-users@lists.s
Re: join-pane crashes with revision 2860
Hi, On 16 August 2012 15:06, Michael Scholz wrote: > After updating tmux-1.7 to revision 2860 join-pane doesn't work any > longer. One can reproduce it (without any ~/.tmux.conf file) with > > % tmux-1.7 new \; neww -d \; joinp -s 1 -t 0 > [lost server] > > and tmux-1.7 dumps core. Now that is interesting because this area of tmux hasn't changed in a while. Hmm. Does the following resolve the issue for you? diff --git a/trunk/names.c b/trunk/names.c index 11baae3..44b96ab 100644 --- a/trunk/names.c +++ b/trunk/names.c @@ -55,6 +55,10 @@ window_name_callback(unused int fd, unused short events, void *data) event_del(&w->name_timer); return; } + + if (w->active == NULL) + return; + queue_window_name(w); if (w->active->screen != &w->active->base) -- Thomas Adam -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: join-pane crashes with revision 2860
On Thu, 16 Aug 2012, Nicholas Marriott wrote: > You're right. This is cos windows can now stick around w/o having any > panes or winlinks. This is the fix: Yes, it fixes the crash. Thank you very much for your fast fix! Mike -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: join-pane crashes with revision 2860
> Now that is interesting because this area of tmux hasn't changed in a > while. Hmm. Does the following resolve the issue for you? > > diff --git a/trunk/names.c b/trunk/names.c > index 11baae3..44b96ab 100644 > --- a/trunk/names.c > +++ b/trunk/names.c > @@ -55,6 +55,10 @@ window_name_callback(unused int fd, unused short > events, void *data) >event_del(&w->name_timer); >return; >} > + > + if (w->active == NULL) > + return; > + >queue_window_name(w); > >if (w->active->screen != &w->active->base) Yes, this fixes the crash. I added the more elaborated diffs from Nicholas Marriott but the check for w->active for NULL does essentially the job. Thank you very much! Mike -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users
Re: Tmux unexpectedly crashed
* Nicholas Marriott [120816 06:35]: > Can you reproduce this problem? I was not able to reproduce this. At the time of the crash I had this in my ~/.zshrc: export BROWSER='TERM=screen.linux /usr/bin/elinks' which I changed to: export BROWSER='/usr/local/bin/elinks %s' Then I switched to another window and sourced ~/.zshrc, at which point tmux crashed. There were about 5 windows open at that time, one of them with a Vim session of about 25 (not very big) files, and the rest with just a Zsh shell each. I've not rebooted this machine since the crash (suspending to ram), and am wondering if there could be something in a log file or dmesg that might provide some clues. This is tmux 1.6 on Debian Sid running the 3.4.0-8.dmz.1-liquorix-686 kernel. John -- John Magolske http://B79.net/contact -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ tmux-users mailing list tmux-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tmux-users