Bug#778821: vim: SEGV in lua plugin

Török Edwin edwin at etorok.net
Fri Feb 20 10:29:00 UTC 2015


Package: vim
Version: 2:7.4.488-4
Severity: normal

Dear Maintainer,

   * What led up to the situation?

    Run Vim (both console and gvim) and after some time got a crash:
        Vim: Caught deadly signal SEGV
        Vim: Finished.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

    I don't have an exact testcase, it seems to happen after vim was left idle
    for some time and I start typing again.
    Yesterday Vim crashed again after several months, so I enabled core dumps and today it crashed again.

   * What was the outcome of this action?

[ The coredump below was for gvim but yesterday plain vim crashed too, so it looks like a
bug in core vim, not the GUI part hence reporting it on the vim package ]

Core was generated by `gvim'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f71b0e653d7 in kill () at ../sysdeps/unix/syscall-template.S:81
81  ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0  0x00007f71b0e653d7 in kill () at ../sysdeps/unix/syscall-template.S:81
#1  0x00007f71b5cb212f in mch_exit ()
#2  <signal handler called>
#3  0x00007f71b5be2ac8 in set_ref_in_item ()
#4  0x00007f71b5d5b58d in ?? ()
#5  0x00007f71b258cc3d in luaD_precall (L=L at entry=0x7f71b83cac80,
func=<optimized out>, nresults=0) at ldo.c:319
#6  0x00007f71b258cf72 in luaD_call (L=L at entry=0x7f71b83cac80, func=<optimized
out>, nResults=nResults at entry=0, allowyield=allowyield at entry=0) at ldo.c:401
#7  0x00007f71b25890ab in lua_callk (L=0x7f71b83cac80, nargs=<optimized out>,
nresults=0, ctx=<optimized out>, k=<optimized out>) at lapi.c:905
#8  0x00007f71b5bec243 in garbage_collect ()
#9  0x00007f71b5d46671 in gui_wait_for_chars ()
#10 0x00007f71b5d32cac in ui_inchar ()
#11 0x00007f71b5c4217f in inchar ()
#12 0x00007f71b5c4422e in ?? ()
#13 0x00007f71b5c449f3 in vgetc ()
#14 0x00007f71b5c44e59 in safe_vgetc ()
#15 0x00007f71b5c93bbc in normal_cmd ()
#16 0x00007f71b5d7877d in main_loop ()
#17 0x00007f71b5bb8a51 in main ()

I have several vim plugins, but only one uses lua AFAICT (rgrep 'lua ' ~/.vim/bundle): https://github.com/Shougo/neocomplete.vim
I have installed that plugin since October 2014 (I was using neocomplcache before, which doesn't use lua).

In my vimrc I have these neocomplete settings:
let g:neocomplete#enable_at_startup = 1
if !exists('g:neocomplete#force_omni_input_patterns')
    let g:neocomplete#force_omni_input_patterns = {}
endif
let g:neocomplete#force_omni_input_patterns.ocaml = '[^. *\t]\.\w*\|\h\w*|#'

My full .vimrc and .vim directory is available at https://gist.github.com/edwintorok/d74a3dd0aa71a840b7d2

Here is the full backtrace as well:

[New LWP 28948]
[New LWP 28949]
[New LWP 28950]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `gvim'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f71b0e653d7 in kill () at ../sysdeps/unix/syscall-template.S:81

Thread 3 (Thread 0x7f71a516f700 (LWP 28950)):
#0  0x00007f71b0f0d18d in poll () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1  0x00007f71b4691ee4 in g_main_context_poll (priority=2147483647, n_fds=2, fds=0x7f71a00010c0, timeout=-1, context=0x7f71b8209fb0) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:4076
        poll_func = 0x7f71b46a1310 <g_poll>
#2  g_main_context_iterate (context=0x7f71b8209fb0, block=block at entry=1, dispatch=dispatch at entry=1, self=<optimized out>) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3776
        max_priority = 2147483647
        timeout = -1
        some_ready = <optimized out>
        nfds = 2
        allocated_nfds = 2
        fds = 0x7f71a00010c0
#3  0x00007f71b4692272 in g_main_loop_run (loop=0x7f71b8209f40) at /tmp/buildd/glib2.0-2.42.1/./glib/gmain.c:3975
        __FUNCTION__ = "g_main_loop_run"
#4  0x00007f71afc1af76 in gdbus_shared_thread_func (user_data=0x7f71b8209f80) at /tmp/buildd/glib2.0-2.42.1/./gio/gdbusprivate.c:273
        data = 0x7f71b8209f80
#5  0x00007f71b46b8935 in g_thread_proxy (data=0x7f71b81a54a0) at /tmp/buildd/glib2.0-2.42.1/./glib/gthread.c:764
        thread = 0x7f71b81a54a0
#6  0x00007f71b1fa80a4 in start_thread (arg=0x7f71a516f700) at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7f71a516f700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140126077777664, 5676593371248834010, 0, 140126356574304, 140126334978272, 140126077777664, -5754468145790208550, -5754425575544080934}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#7  0x00007f71b0f15ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 2 (Thread 0x7f71a705f700 (LWP 28949)):
#0  0x00007f71b0f0ef33 in select () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1  0x00007f71b17aa0bd in NotifierThreadProc (clientData=<optimized out>) at /tmp/buildd/tcl8.6-8.6.2+dfsg/unix/tclUnixNotfy.c:1216
        tsdPtr = 0x0
        readableMask = {__fds_bits = {32, 0 <repeats 15 times>}}
        writableMask = {__fds_bits = {0 <repeats 16 times>}}
        exceptionMask = {__fds_bits = {0 <repeats 16 times>}}
        fds = {5, 8}
        i = <optimized out>
        numFdBits = 6
        receivePipe = 5
        found = <optimized out>
        poll = {tv_sec = 0, tv_usec = 0}
        timePtr = <optimized out>
        buf = "\000"
#2  0x00007f71b1fa80a4 in start_thread (arg=0x7f71a705f700) at pthread_create.c:309
        __res = <optimized out>
        pd = 0x7f71a705f700
        now = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {140126110217984, 5676593371248834010, 0, 140126391467232, 18, 140126110217984, -5754472689865607718, -5754425575544080934}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x0}, data = {prev = 0x0, cleanup = 0x0, canceltype = 0}}}
        not_first_call = <optimized out>
        pagesize_m1 = <optimized out>
        sp = <optimized out>
        freesize = <optimized out>
        __PRETTY_FUNCTION__ = "start_thread"
#3  0x00007f71b0f15ccd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:111
No locals.

Thread 1 (Thread 0x7f71b5b079c0 (LWP 28948)):
#0  0x00007f71b0e653d7 in kill () at ../sysdeps/unix/syscall-template.S:81
No locals.
#1  0x00007f71b5cb212f in mch_exit ()
No symbol table info available.
#2  <signal handler called>
No locals.
#3  0x00007f71b5be2ac8 in set_ref_in_item ()
No symbol table info available.
#4  0x00007f71b5d5b58d in ?? ()
No symbol table info available.
#5  0x00007f71b258cc3d in luaD_precall (L=L at entry=0x7f71b83cac80, func=<optimized out>, nresults=0) at ldo.c:319
        f = 0x7f71b5d5b4f0
        ci = <optimized out>
        n = <optimized out>
        funcr = <optimized out>
#6  0x00007f71b258cf72 in luaD_call (L=L at entry=0x7f71b83cac80, func=<optimized out>, nResults=nResults at entry=0, allowyield=allowyield at entry=0) at ldo.c:401
No locals.
#7  0x00007f71b25890ab in lua_callk (L=0x7f71b83cac80, nargs=<optimized out>, nresults=0, ctx=<optimized out>, k=<optimized out>) at lapi.c:905
        func = <optimized out>
#8  0x00007f71b5bec243 in garbage_collect ()
No symbol table info available.
#9  0x00007f71b5d46671 in gui_wait_for_chars ()
No symbol table info available.
#10 0x00007f71b5d32cac in ui_inchar ()
No symbol table info available.
#11 0x00007f71b5c4217f in inchar ()
No symbol table info available.
#12 0x00007f71b5c4422e in ?? ()
No symbol table info available.
#13 0x00007f71b5c449f3 in vgetc ()
No symbol table info available.
#14 0x00007f71b5c44e59 in safe_vgetc ()
No symbol table info available.
#15 0x00007f71b5c93bbc in normal_cmd ()
No symbol table info available.
#16 0x00007f71b5d7877d in main_loop ()
No symbol table info available.
#17 0x00007f71b5bb8a51 in main ()
No symbol table info available.

$ vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Dec 30 2014 04:22:27)
Included patches: 1-488
Modified by pkg-vim-maintainers at lists.alioth.debian.org
Compiled by jamessan@
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +syntax
+arabic          +file_in_path    +mouse_sgr       +tag_binary
+autocmd         +find_in_path    -mouse_sysmouse  +tag_old_static
+balloon_eval    +float           +mouse_urxvt     -tag_any_white
+browse          +folding         +mouse_xterm     +tcl
++builtin_terms  -footer          +multi_byte      +terminfo
+byte_offset     +fork()          +multi_lang      +termresponse
+cindent         +gettext         -mzscheme        +textobjects
+clientserver    -hangul_input    +netbeans_intg   +title
+clipboard       +iconv           +path_extra      +toolbar
+cmdline_compl   +insert_expand   +perl            +user_commands
+cmdline_hist    +jumplist        +persistent_undo +vertsplit
+cmdline_info    +keymap          +postscript      +virtualedit
+comments        +langmap         +printer         +visual
+conceal         +libcall         +profile         +visualextra
+cryptv          +linebreak       +python          +viminfo
+cscope          +lispindent      -python3         +vreplace
+cursorbind      +listcmds        +quickfix        +wildignore
+cursorshape     +localmap        +reltime         +wildmenu
+dialog_con_gui  +lua             +rightleft       +windows
+diff            +menu            +ruby            +writebackup
+digraphs        +mksession       +scrollbind      +X11
+dnd             +modify_fname    +signs           -xfontset
-ebcdic          +mouse           +smartindent     +xim
+emacs_tags      +mouseshape      -sniff           +xsmp_interact
+eval            +mouse_dec       +startuptime     +xterm_clipboard
+ex_extra        +mouse_gpm       +statusline      -xterm_save
+extra_search    -mouse_jsbterm   -sun_workshop    +xpm
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2  -D_REENTRANT -DORBIT2=1 -pthread -I/usr/include/libgnomeui-2.0 -I/usr/include/gnome-keyring-1 -I/usr/include/libbonoboui-2.0 -I/usr/include/libxml2 -I/usr/include/libgnome-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/bonobo-activation-2.0 -I/usr/include/orbit-2.0 -I/usr/include/libgnomecanvas-2.0 -I/usr/include/gail-1.0 -I/usr/include/libart-2.0 -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -
I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/x86_64-linux-gnu/gnome-vfs-2.0/include -I/usr/include/gconf/2 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include    -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1     -I/usr/include/tcl8.6  -D_REENTRANT=1  -D_THREAD_SAFE=1  -D_LARGEFILE64_SOURCE=1  
Linking: gcc   -L. -Wl,-z,relro -L/build/ruby2.1-64qTCU/ruby2.1-2.1.5/debian/lib -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E  -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim   -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype   -lgnomeui-2 -lSM -lICE -lbonoboui-2 -lgnome-2 -lpopt -lbonobo-2 -lbonobo-activation -lORBit-2 -lgnomecanvas-2 -lart_lgpl_2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfontconfig -lfreetype -lgdk_pixbuf-2.0 -lgnomevfs-2 -lgconf-2 -lgthread-2.0 -lgmodule-2.0 -lgobject-2.0 -lglib-2.0  -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE  -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl  -L/usr/lib -llua5.2 -Wl,-E  -fstack-protector -L/usr/local/lib  -L/usr/lib/x86_64-linux-gnu/perl/5.20/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python2.7/config-x86_64-linux-gnu -lpy
thon2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions  -L/usr/lib/x86_64-linux-gnu -ltcl8.6 -ldl -lz -lpthread -lieee -lm -lruby-2.1 -lpthread -lgmp -ldl -lcrypt -lm    

-- Package-specific info:

--- real paths of main Vim binaries ---
/usr/bin/vi is /usr/bin/vim.gnome
/usr/bin/vim is /usr/bin/vim.gnome
/usr/bin/gvim is /usr/bin/vim.gnome

-- System Information:
Debian Release: 8.0
  APT prefers testing-updates
  APT policy: (500, 'testing-updates'), (500, 'testing'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages vim depends on:
ii  libacl1      2.2.52-2
ii  libc6        2.19-13
ii  libgpm2      1.20.4-6.1+b2
ii  libselinux1  2.3-2
ii  libtinfo5    5.9+20140913-1+b1
ii  vim-common   2:7.4.488-4
ii  vim-runtime  2:7.4.488-4

vim recommends no packages.

Versions of packages vim suggests:
ii  exuberant-ctags [ctags]  1:5.9~svn20110310-8
pn  vim-doc                  <none>
ii  vim-scripts              20130814

-- no debconf information



More information about the pkg-vim-maintainers mailing list