Subject: vim: Random crashes due to some memory corruption

From: Konstantin Khomoutov <[email-masked]>
Date: Mon, 13 Nov 2017 19:56:30 +0300

Package: vim
Version: 2:8.0.0197-4+deb9u1
Severity: normal
Tags: upstream

I use console Vim at an rxvt-unicode console with the support of 256
colors.  (I use the "Zenburn" colour theme with Vim, FWIW.)
That is, I have:

  $ echo $TERM
  rxvt-unicode-256color

I'm experience sporadic (but rare) crashes which basically come in two
flavours:

- One manifestation is that the output at the lower part of the window
  becomes garbled when scrolling (upwards).
  Pressin Ctrl-L fixes the problem.

  When I start seeing this, this is a symptom of an imminent crash which
  will happen withing minutes to a hour or two.

- Invoking Vim from a stopped background job using the "fg" command
  of my shell (which is bash).

No matter what the apparent cause, the crash always looks like Vim
getting the SIGABRT signal:

  Vim: Caught deadly signal ABRT
  
  Vim: Finished.
  Aborted.

In either case, I think this problem looks like some slow memory
corruption so the real trigger can be any action.

I have arranger for Vim to drop the core when crashing, and installed
the debug symbols package, so I have the output of the "bt" command in
a post-mortem GDB session, attached.

Please let me know if I can help more (it's okay for me to install
an instrumented version of Vim if needed.)

-- Package-specific info:

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

-- System Information:
Debian Release: 9.1
  APT prefers stable-debug
  APT policy: (500, 'stable-debug'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages vim depends on:
ii  libacl1      2.2.52-3+b1
ii  libc6        2.24-11+deb9u1
ii  libgpm2      1.20.4-6.2+b1
ii  libselinux1  2.6-3+b3
ii  libtinfo5    6.0+20161126-1+deb9u1
ii  vim-common   2:8.0.0197-4+deb9u1
ii  vim-runtime  2:8.0.0197-4+deb9u1

vim recommends no packages.

Versions of packages vim suggests:
pn  ctags        <none>
pn  vim-doc      <none>
pn  vim-scripts  <none>

-- no debconf information