Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Background process with high CPU usage #5612

Open
benwaffle opened this issue Nov 15, 2016 · 1 comment
Open

Background process with high CPU usage #5612

benwaffle opened this issue Nov 15, 2016 · 1 comment
Labels
bug issues reporting wrong behavior clipboard clipboard, paste io job-control OS processes, spawn
Milestone

Comments

@benwaffle
Copy link

  • nvim --version:
NVIM 0.1.6
Build type: RelWithDebInfo
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wconversion -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.1.6/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser

Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui      
For differences from Vim, see :help vim-differences

   system vimrc file: "$VIM/sysinit.vim"
  fall-back for $VIM: "/usr/share/nvim"
  • Operating system/version: Linux 4.8.6, Arch

Actual behaviour

The process is running in the background, at 100% cpu usage, without a terminal. I believe I closed the terminal while a paste was in progress (ctrl-shift-v in insert mode, not "+p). The orphaned process was reparented to PID1

Expected behaviour

nvim quits when you close the terminal

Steps to reproduce using nvim -u NORC

Copy a large file, paste it in (ctrl-shift-v), and close your terminal while it's pasting. Unfortunately, I can't reproduce.

I ran perf record before I killed the process: perf.zip. You can unzip the file and run perf report to see the data. tl;dr input_enqueue and rbuffer_get take up all of the time

@justinmk
Copy link
Member

justinmk commented Nov 15, 2016

Thanks for the thorough report!

Could be helped by #4448.

nvim quits when you close the terminal

Nvim calls preserve_exit() on SIGHUP, setting got_int and mapped_ctrl_c=0 in there may avoid this issue.

@justinmk justinmk added the clipboard clipboard, paste label Nov 15, 2016
@justinmk justinmk added this to the 0.3 milestone Nov 15, 2016
@justinmk justinmk added performance issues reporting performance problems io bug issues reporting wrong behavior and removed performance issues reporting performance problems labels Nov 15, 2016
@justinmk justinmk added the job-control OS processes, spawn label Aug 20, 2017
@clason clason modified the milestones: 0.6, 0.7 Nov 30, 2021
@bfredl bfredl modified the milestones: 0.9, 0.10 Feb 2, 2023
@dundargoc dundargoc modified the milestones: 0.10, backlog Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issues reporting wrong behavior clipboard clipboard, paste io job-control OS processes, spawn
Projects
None yet
Development

No branches or pull requests

5 participants