{"action":"opened","issue":{"url":"https://api.github.com/repos/neovim/neovim/issues/8269","repository_url":"https://api.github.com/repos/neovim/neovim","labels_url":"https://api.github.com/repos/neovim/neovim/issues/8269/labels{/name}","comments_url":"https://api.github.com/repos/neovim/neovim/issues/8269/comments","events_url":"https://api.github.com/repos/neovim/neovim/issues/8269/events","html_url":"https://github.com/neovim/neovim/issues/8269","id":314026888,"number":8269,"title":"neovim kills arbitrary processes via `kill`","user":{"login":"typetetris","id":1983821,"avatar_url":"https://avatars2.githubusercontent.com/u/1983821?v=4","gravatar_id":"","url":"https://api.github.com/users/typetetris","html_url":"https://github.com/typetetris","followers_url":"https://api.github.com/users/typetetris/followers","following_url":"https://api.github.com/users/typetetris/following{/other_user}","gists_url":"https://api.github.com/users/typetetris/gists{/gist_id}","starred_url":"https://api.github.com/users/typetetris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/typetetris/subscriptions","organizations_url":"https://api.github.com/users/typetetris/orgs","repos_url":"https://api.github.com/users/typetetris/repos","events_url":"https://api.github.com/users/typetetris/events{/privacy}","received_events_url":"https://api.github.com/users/typetetris/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-04-13T09:07:36Z","updated_at":"2018-04-13T09:07:36Z","closed_at":null,"author_association":"NONE","body":"- `nvim --version`:\r\n```\r\nNVIM v0.2.2\r\nBuild type: Release\r\nLuaJIT 2.1.0-beta3\r\nCompilation: /nix/store/vmy9yzr09vmyq9k5nngf8lrhqmycffjy-gcc-wrapper-6.4.0/bin/gcc -Wconversion -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -DNDEBUG -DMIN_LOG_LEVEL=3 -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -I/build/source/build/config -I/build/source/src -I/nix/store/dq87ivd2w5xdcyd22w6iy83bxjk7yi43-libuv-1.19.1/include -I/nix/store/s3h7vixxz7drqyyaiashys7ad09rj0a2-libmsgpack-2.1.5/include -I/nix/store/3wd0r873rjygyvqn1mbxqq1l0m96l5v8-unibilium-1.2.1/include -I/nix/store/nkiwkhscyxxs69xd1xjz2cahpk354srp-libtermkey-0.19/include -I/nix/store/b9csm102k3vkmq6n738a64cvzrb98cvf-neovim-libvterm-2017-11-05/include -I/nix/store/v01nr904xlddbfcl4kay536xyn96z8k6-jemalloc-5.0.1/include -I/nix/store/4nva0c0qadvi2sjjirk0wg5vr2883xy3-glibc-2.26-131-dev/include -I/build/source/build/src/nvim/auto -I/build/source/build/include\r\nCompiled by nixbld\r\n\r\nFeatures: +acl +iconv +jemalloc +tui\r\nSee \":help feature-compile\"\r\n\r\n   system vimrc file: \"$VIM/sysinit.vim\"\r\n  fall-back for $VIM: \"\r\n/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/share/nvim\"\r\n\r\nRun :checkhealth for more info\r\n```\r\n- Vim (version: ) behaves differently? dunno\r\n- Operating system/version: linux / debian 8 / nix with nixpkgs\r\n- Terminal name/version: tmux inside suckless terminal\r\n- `$TERM`: tmux-256color\r\n\r\n### Steps to reproduce using `nvim -u NORC`\r\ndunno.\r\n\r\n### Actual behaviour\r\nneovim kills processes, which aren't child processes (any more?). Caught him with `auditd`:\r\n\r\n```\r\n\r\ntype=SYSCALL msg=audit(1523602917.447:6791): arch=c000003e syscall=62 success=no exit=-3 a0=5de7 a1=f a2=0 a3=7fffb5b05f6c items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:57 2018\r\ntype=PROCTITLE msg=audit(1523602917.447:6792): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=OBJ_PID msg=audit(1523602917.447:6792): opid=24040 oauid=840 ouid=840 oses=2 ocomm=\"bash\"\r\ntype=SYSCALL msg=audit(1523602917.447:6792): arch=c000003e syscall=62 success=yes exit=0 a0=5de8 a1=f a2=7faaabe9be78 a3=7fffb5b05f6c items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:59 2018\r\ntype=PROCTITLE msg=audit(1523602919.451:6793): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602919.451:6793): arch=c000003e syscall=62 success=no exit=-3 a0=5de7 a1=9 a2=7d1 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:59 2018\r\ntype=PROCTITLE msg=audit(1523602919.451:6794): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602919.451:6794): arch=c000003e syscall=62 success=no exit=-3 a0=5de8 a1=9 a2=7d1 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:59 2018\r\ntype=PROCTITLE msg=audit(1523602919.679:6795): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602919.679:6795): arch=c000003e syscall=62 success=no exit=-3 a0=5de9 a1=f a2=6a60b0c79b645 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:59 2018\r\ntype=PROCTITLE msg=audit(1523602919.691:6796): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602919.691:6796): arch=c000003e syscall=62 success=no exit=-3 a0=5dea a1=f a2=6a60b0d41e1db a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:01:59 2018\r\ntype=PROCTITLE msg=audit(1523602919.883:6797): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602919.883:6797): arch=c000003e syscall=62 success=no exit=-3 a0=5ded a1=f a2=6a60b18a9a2a4 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:02:08 2018\r\ntype=PROCTITLE msg=audit(1523602928.819:6804): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602928.819:6804): arch=c000003e syscall=62 success=no exit=-3 a0=5dfc a1=f a2=6a60d2d1dc3d1 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:02:08 2018\r\ntype=PROCTITLE msg=audit(1523602928.847:6805): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602928.847:6805): arch=c000003e syscall=62 success=no exit=-3 a0=5dfd a1=f a2=6a60d2eed5c0c a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n----\r\ntime->Fri Apr 13 09:02:09 2018\r\ntype=PROCTITLE msg=audit(1523602929.723:6806): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E646373762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73746F72652F78636A6A3733736E6D6631\r\ntype=SYSCALL msg=audit(1523602929.723:6806): arch=c000003e syscall=62 success=no exit=-3 a0=5dff a1=f a2=6a60d6358f0c8 a3=2 items=0 ppid=17465 pid=24036 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts15 ses=2 comm=\"nvim\" exe=\"/nix/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n\r\n----\r\ntime->Fri Apr 13 10:45:50 2018\r\ntype=PROCTITLE msg=audit(1523609150.313:10667): proctitle=2F6E69782F73746F72652F6B703836736E6763326367726E646E6D6D7377637A38707A3373306E64637\r\n3762D6E656F76696D2D756E777261707065642D302E322E322F62696E2F6E76696D002D2D636D64006C657420673A707974686F6E5F686F73745F70726F673D272F6E69782F73\r\n746F72652F78636A6A3733736E6D6631\r\ntype=OBJ_PID msg=audit(1523609150.313:10667): opid=29648 oauid=840 ouid=840 oses=2 ocomm=\"bash\"\r\ntype=SYSCALL msg=audit(1523609150.313:10667): arch=c000003e syscall=62 success=yes exit=0 a0=73d0 a1=f a2=7f30006a4e78 a3=7ffc5bc1e0ec items=\r\n0 ppid=30037 pid=29643 auid=840 uid=840 gid=100 euid=840 suid=840 fsuid=840 egid=100 sgid=100 fsgid=100 tty=pts19 ses=2 comm=\"nvim\" exe=\"/nix\r\n/store/kp86sngc2cgrndnmmswcz8pz3s0ndcsv-neovim-unwrapped-0.2.2/bin/nvim\" key=\"kill_sigterm\"\r\n\r\n\r\n```\r\n\r\nA lot of `exit=-3` which is `ESRCH` on my system with documentation\r\n\r\n>   ESRCH  The pid or process group does not exist.  Note that an existing process might be a zombie, a process which already committed termination, but has not yet been wait(2)ed for.\r\n\r\nwhich suggest something in jobcontrol is fishy. I am not an expert, but maybe `SIGCHLD` isn't handled correctly, otherwise, why doesn't notice its children dying and doesn't evict those pids from its jobcontrol management?\r\n\r\nI also observed killed unrelated processes running as the same user. So sometimes it really hits a process for me, which is extremly annoying. \r\n\r\n### Expected behaviour\r\n\r\nOnly calling `kill` (here probably `uv_kill`) with pids which are actual running child processes of neovim. Maybe check with `waitpid` or something? (Disclaimer: I am not an expert for this kind of stuff.)"}}
{"actor":{"display_login":"typetetris"}}