James McCoy wrote: > On Mon, Sep 02, 2013 at 06:47:59AM -0700, Daniel Hahler wrote: > > I sometimes experience an issue, where gVim crashes and freezes when > > switching tabs. > > > > It appears to select the new tab, but then crashes during re-drawing of the > > window(s), and freezes after going through "Vim: Caught deadly signal". > > The window becomes unresponsive, and Unity asks to force-quit it. > > > > (gdb) where > > #0 __lll_lock_wait_private () at > > ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95 > > #1 0x00007f52143b8f2c in _L_lock_11850 () at malloc.c:5130 > > #2 0x00007f52143b6575 in __GI___libc_malloc (bytes=57) at malloc.c:2856 > > [snip] > > #7 <signal handler called> > > #8 0x00007f52143b3460 in _int_free (av=0x7f52146f4740 <main_arena>, > > p=0x4278b00, have_lock=0) at malloc.c:3912 > > #9 0x000000000050ac09 in vim_free (x=0x4278b10) at misc2.c:1744 > > #10 0x0000000000585dc2 in free_screenlines () at screen.c:8439 > > The reason that Vim freezes is because the signal handler is called > while Vim is holding a lock in libc from the call to free() and then the > signal handler tries to acquire the same lock when gettext calls malloc. > > There is a lot going on in the signal handler (probably too much). > Without completely changing how Vim's signal handling is performed, a > basic fix (attached) would be to not translate the messages that are > emitted in the signal handler. > > That doesn't address the core crash itself, though. Looking at the > stack trace, are you switching to a new tab page (thus forcing the > creation of the tabline) or switching to an existing tab page? > > Even if you're not able to reliably reproduce it, a core file would > likely help track down the problem.
Thanks for pointing this out. I was recently looking into signal handling and unsafe functions for garbage collection in Zimbu. It's quite a mess, you can't do much in a signal handler without taking the risk that an unsafe function was interrupted and most things will fail. At least avoiding gettext() would reduce the risk a bit. -- hundred-and-one symptoms of being an internet addict: 167. You have more than 200 websites bookmarked. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
