codeium.vim icon indicating copy to clipboard operation
codeium.vim copied to clipboard

[Bug] Neovim hangs on :wq (possible race condition)

Open Lattay opened this issue 1 year ago • 0 comments

Description

I hit a bug with codeium that prevent neovim from closing and let it hang indefinitely. It is not easy to determine exactly the required condition but here is what I found:

  • the filetype needs to be ignored
  • you don't need to modify the file in the current session but the file cannot be empty for the whole session

Repro

  1. disable codeium for python. For me using lazy.nvim that looks like that (init is executed before loading codeium):
{
        "Exafunction/codeium.vim",
        init = function()
            vim.g.codeium_filetypes = { python = false }
        end,
}
  1. open a new python file
  2. write something in the file
def fib():
  pass
  1. Quit with :wq
  2. Sometime neovim doesn't hang on this one, reopen the file, and quit right away with :wq

As far as I can tell :wqa and :q do not trigger the bug.

Other interesting informations

  • I use Neovim v0.9.5 on Archlinux
  • Codeium.vim is on commit 31dd296
  • when the file is opened ps -e shows one language_server process, but when the editor is hanging ps -e shows 2 processes. Both processes are new as their PID is greater the initial language_server

Lattay avatar Apr 30 '24 16:04 Lattay