ycm-core / YouCompleteMe

A code-completion engine for Vim
http://ycm-core.github.io/YouCompleteMe/
GNU General Public License v3.0
25.42k stars 2.8k forks source link

vim opening tons of TCP connections to localhost #2755

Closed squalou closed 7 years ago

squalou commented 7 years ago

Issue Prelude

Please complete these steps and check these boxes (by putting an x inside the brackets) before filing your issue:

Thank you for adhering to this process! It ensures your issue is resolved quickly and that neither your nor our time is needlessly wasted.

Issue Details

Rather than a bug, I noticed a eally, really weird behaviour. When using YouCopleteMe (installed by Vundle), whenever I run vim, a netwprk monitor tells me vim is opening tons of TCP connections to 127.0.0.1:

open vim

have 'opensnitch' in the background to monitor network activity (other tools works probably)

Well ... nothing

Lots of weird activity reported

[2017-08-21 14:59:58,020] (WARNING) Could not find process for tcp connection 127.0.0.1:46818 -> 127.0.0.1:49831
[2017-08-21 14:59:58,159] (WARNING) Could not find process for tcp connection 127.0.0.1:46820 -> 127.0.0.1:49831
[2017-08-21 14:59:58,255] (WARNING) Could not find process for tcp connection 127.0.0.1:46822 -> 127.0.0.1:49831
[2017-08-21 14:59:58,377] (WARNING) Could not find process for tcp connection 127.0.0.1:46824 -> 127.0.0.1:49831
[2017-08-21 14:59:58,480] (WARNING) Could not find process for tcp connection 127.0.0.1:46826 -> 127.0.0.1:49831
[2017-08-21 14:59:58,604] (WARNING) Could not find process for tcp connection 127.0.0.1:46828 -> 127.0.0.1:49831
[2017-08-21 14:59:58,724] (WARNING) Could not find process for tcp connection 127.0.0.1:46830 -> 127.0.0.1:49831
[2017-08-21 14:59:58,848] (WARNING) Could not find process for tcp connection 127.0.0.1:46832 -> 127.0.0.1:49831
[2017-08-21 14:59:58,936] (WARNING) Could not find process for tcp connection 127.0.0.1:46834 -> 127.0.0.1:49831
[2017-08-21 14:59:59,077] (WARNING) Could not find process for tcp connection 127.0.0.1:46836 -> 127.0.0.1:49831

Diagnostic data

Output of vim --version

VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 24 2016 16:44:48)
Included patches: 1-1689
Extra patches: 8.0.0056
Modified by pkg-vim-maintainers@lists.alioth.debian.org
Compiled by pkg-vim-maintainers@lists.alioth.debian.org
Huge version without GUI.  Features included (+) or not (-):
+acl             +farsi           +mouse_netterm   +tag_binary
+arabic          +file_in_path    +mouse_sgr       +tag_old_static
+autocmd         +find_in_path    -mouse_sysmouse  -tag_any_white
-balloon_eval    +float           +mouse_urxvt     -tcl
-browse          +folding         +mouse_xterm     +terminfo
++builtin_terms  -footer          +multi_byte      +termresponse
+byte_offset     +fork()          +multi_lang      +textobjects
+channel         +gettext         -mzscheme        +timers
+cindent         -hangul_input    +netbeans_intg   +title
-clientserver    +iconv           +packages        -toolbar
-clipboard       +insert_expand   +path_extra      +user_commands
+cmdline_compl   +job             -perl            +vertsplit
+cmdline_hist    +jumplist        +persistent_undo +virtualedit
+cmdline_info    +keymap          +postscript      +visual
+comments        +langmap         +printer         +visualextra
+conceal         +libcall         +profile         +viminfo
+cryptv          +linebreak       -python          +vreplace
+cscope          +lispindent      +python3         +wildignore
+cursorbind      +listcmds        +quickfix        +wildmenu
+cursorshape     +localmap        +reltime         +windows
+dialog_con      -lua             +rightleft       +writebackup
+diff            +menu            -ruby            -X11
+digraphs        +mksession       +scrollbind      -xfontset
-dnd             +modify_fname    +signs           -xim
-ebcdic          +mouse           +smartindent     -xsmp
+emacs_tags      -mouseshape      +startuptime     -xterm_clipboard
+eval            +mouse_dec       +statusline      -xterm_save
+ex_extra        +mouse_gpm       -sun_workshop    -xpm
+extra_search    -mouse_jsbterm   +syntax          
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
 2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
  fall-back for $VIM: "/usr/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H   -Wdate-time  -g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1      
Linking: gcc   -Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim        -lm -ltinfo -lnsl  -lselinux  -lacl -lattr -lgpm -ldl     -L/usr/lib/python3.5/config-3.5m-x86_64-linux-gnu -lpython3.5m -lpthread -ldl -lutil -lm     

Output of YcmDebugInfo

Place the output here, or a link to a [gist][].

Contents of YCM, ycmd and completion engine logfiles

not available (yeah, i know, ... it's bad. I'll add it if required, for now I'm merely looking for an explanation, maybe it's normal)

OS version, distribution, etc.

Ubuntu 16.04 with kernel 4.12.5

puremourning commented 7 years ago

YCM communicates with its server, ycmd over TCP loopback, and indeed ycmd comminicates with other processes in a similar way, so this is entirely expected.

It doesn't appear that this is causing any actual problem, and is nonetheless the design of the system, so closing. If this is actually causing a problem, let us know; I did at one point implement communication over unix domain sockets due to a foible of our corporate IT, but that is no longer a problem.

squalou commented 7 years ago

Thanks for the explanation ! It's perfectly fine then (call it paranoïa ;) )