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.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <[email protected]>
diff --git a/src/os_unix.c b/src/os_unix.c
--- a/src/os_unix.c
+++ b/src/os_unix.c
@@ -1090,16 +1090,16 @@
     }
     if (entered == 2)
     {
-	OUT_STR(_("Vim: Double signal, exiting\n"));
+	OUT_STR("Vim: Double signal, exiting\n");
 	out_flush();
 	getout(1);
     }
 
 #ifdef SIGHASARG
-    sprintf((char *)IObuff, _("Vim: Caught deadly signal %s\n"),
+    sprintf((char *)IObuff, "Vim: Caught deadly signal %s\n",
 							 signal_info[i].name);
 #else
-    sprintf((char *)IObuff, _("Vim: Caught deadly signal\n"));
+    sprintf((char *)IObuff, "Vim: Caught deadly signal\n");
 #endif
     preserve_exit();		    /* preserve files and exit */
 

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui