Skip to content

"Connection to server got closed. Server will not be restarted." after update to 0.26.3insiderX #4770

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

Closed
jwierzbi opened this issue Dec 19, 2019 · 20 comments
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. insiders Currently only repros with our latest Insiders release. Language Service regression A bug that didn't exist in a previous release reliability Visual Studio Inherited from Visual Studio
Milestone

Comments

@jwierzbi
Copy link

Issue Type: Bug

Hard for me to say what are the reproduction steps for this issue. It just happens when I have a C project opened. The message pops up periodically every few minutes.

This specifically appears after updating to 0.26.3. I had an 0.26.3-insiders version before and I reverted it to 0.26.2 and the error was gone. Now I updated again because the insiders2 version rolled out and the error is back.

I know there's already #4714 but it was raised against an earlier version which I had no problems with so this might be a different issue.

Extension version: 0.26.3-insiders2
VS Code version: Code 1.41.0 (9579eda04fdb3a9bba2750f15193e5fafe16b959, 2019-12-11T18:32:17.711Z)
OS version: Linux x64 4.15.0-73-generic

System Info
Item Value
CPUs Intel(R) Core(TM) i7-3770 CPU @ 3.40GHz (8 x 2948)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
metal: disabled_off
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
protected_video_decode: unavailable_off
rasterization: disabled_software
skia_renderer: disabled_off
surface_control: disabled_off
surface_synchronization: enabled_on
video_decode: unavailable_off
viz_display_compositor: enabled_on
viz_hit_test_surface_layer: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) 2, 2, 2
Memory (System) 15.54GB (1.08GB free)
Process Argv --unity-launch
Screen Reader no
VM 0%

Note: The memory above shows that I have 1.08GB free but it's actually more. I'm on Linux and most of the memory is taken by caches. The actual value for free is around 10GB.

@sean-mcmanus sean-mcmanus added bug insiders Currently only repros with our latest Insiders release. Language Service more info needed The issue report is not actionable in its current state regression A bug that didn't exist in a previous release reliability labels Dec 19, 2019
@sean-mcmanus
Copy link
Contributor

The crash we fixed with 0.26.3-insiders2 was with the IntelliSense process, but you're hitting a main process crash. We aren't aware of any high hitting main process crash, except for an out of memory crash on Windows -- does it appear like the process keeps growing memory usage till it runs out?

Doing a Reset IntelliSense Database might fix things if the database is corrupt in some way.

Can you attach a debugger before the process crashes to get a call stack?

@jwierzbi
Copy link
Author

jwierzbi commented Dec 20, 2019

does it appear like the process keeps growing memory usage till it runs out?

I haven't noticed anything out of the ordinary regarding memory usage in my system when this issue happens.

Doing a Reset IntelliSense Database might fix things if the database is corrupt in some way.

Tried twice and sadly I can still see the error message.

Can you attach a debugger before the process crashes to get a call stack?

I'm not overly familiar with debugging Electron apps but I dumped the developer tools' console (attached). Hope that helps but if it's not enough I'll try and figure out how to fire up the debugger later.

vscode_console.log

@jwierzbi
Copy link
Author

jwierzbi commented Dec 20, 2019

I attached GDB to the Microsoft.VSCode.CPP.Extension.linux process and this is the stack trace from the crash: vscode_bt.log.

@saidganim
Copy link

saidganim commented Dec 20, 2019

Having the same issue here. Last night I updated the VSCode C/C++ IntelliSense cpptools and then started getting the "Connection to server got closed. Server will not be restarted." message periodically with my C project.

@sean-mcmanus sean-mcmanus added this to the 0.26.3 milestone Dec 21, 2019
@sean-mcmanus sean-mcmanus added Visual Studio Inherited from Visual Studio investigate: repro This issue's repro steps needs to be investigated/confirmed and removed more info needed The issue report is not actionable in its current state labels Dec 21, 2019
@sean-mcmanus
Copy link
Contributor

@jwierzbi Thanks a lot for providing that call stack -- that looks like our top hitting main process crash, and it's a regression with 0.26.3-insiders2, but it was below our "crash bar threshold", so we had not investigated it further yet.

But now that it's been user reported we'll try to dig into it next week :)

@saidganim Are you on 0.26.3-insiders2?

@saidganim
Copy link

@sean-mcmanus yes, my version is 0.26.3-insiders2

@sean-mcmanus
Copy link
Contributor

Setting C_Cpp.updateChannel to "Default" is a workaround until we're able to get a fix.

@jwierzbi Can you set your C_Cpp.loggingLevel to "Debug" and see what file is being parsed when the crash occurs in the output "tag parsing file: ..." in the C/C++ pane? Does the crash happen repeatedly on the same file? We have code that is supposed to skip parsing files that cause parsing crashes the 2nd time, but it's possible that might not be working if the database ends up getting reset from the crash.

@saidganim Without a crash call stack or more repro details, I can't be sure if you're hitting the same crash or a different one.

@jwierzbi
Copy link
Author

Does the crash happen repeatedly on the same file?

Yes it does and I have a very simple way to reproduce it now:

$ wget http://llvm.org/releases/9.0.0/cfe-9.0.0.src.tar.xz
$ tar xf cfe-9.0.0.src.tar.xz

Then Open Folder... cfe-9.0.0.src in VS Code and open has_include.c file. It should crash instantly.

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Dec 24, 2019

@jwierzbi Thanks a lot for the repro! It crashes VS as well -- I've filed a bug at https://developercommunity.visualstudio.com/content/problem/866100/vs-crashes-due-to-a-cc-tag-parser-crash-when-openi.html .

I've emailed the developer responsible, but they're OOF for a couple weeks, so I'm not sure if anyone else would be able to fix it before then.

As mentioned previously, our workspace parsing code that runs on startup should avoid auto-parsing that file after the initial crash, but explicitly opening that file will re-trigger the parsing/crash.

@jwierzbi
Copy link
Author

I've emailed the developer responsible, but they're OOF for a couple weeks, so I'm not sure if anyone else would be able to fix it before then.

Thanks! It's Christmas after all so that totally expected :).

As mentioned previously, our workspace parsing code that runs on startup should avoid auto-parsing that file after the initial crash, but explicitly opening that file will re-trigger the parsing/crash.

Sadly but it doesn't seem to work like that in my case. When I open VS Code and load any other C file then I can see the initial error message printed periodically. It seems that the extension restarts the parsing process from the very beginning each time and goes through the whole project again and again.

I think that you should be able to reproduce this behaviour as well. Just open any other file than has_include.c. It repeats in less than 60s in my case.

@sean-mcmanus
Copy link
Contributor

Yeah, I checked the logs -- the crash occurs too soon after modifying our database, causing our "database safety check" to fail, so on restart we reset the database instead. We'd need to delay the crash long enough for the other thread to pass it's safety check or move the parsing to a different process.

@sean-mcmanus sean-mcmanus removed the investigate: repro This issue's repro steps needs to be investigated/confirmed label Dec 30, 2019
@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jan 8, 2020
@sean-mcmanus
Copy link
Contributor

@jwierzbi
Copy link
Author

jwierzbi commented Jan 9, 2020

I can confirm that the issue is gone in my case.

Thank you very much for fixing it. Feel free to close the issue when you see fit.

@MarkAllenPhillips
Copy link

Having same issue with VSCode Puppet.
C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in mkdir': Invalid argument @ dir_s_mkdir - H:/.puppetlabs/var (Errno::EINVAL) from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:404:in create_ancestors'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:389:in block in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:163:in do_initialize_settings_for_run_mode'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:155:in initialize_settings' from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/lib/puppet_languageserver.rb:222:in init_puppet'
from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/puppet-languageserver:13:in <main>' [Info - 10:08:42 AM] Connection to server got closed. Server will restart. C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in mkdir': Invalid argument @ dir_s_mkdir - H:/.puppetlabs/var (Errno::EINVAL)
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:404:in create_ancestors' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:389:in block in initialize_app_defaults'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in initialize_app_defaults'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:163:in do_initialize_settings_for_run_mode' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:155:in initialize_settings'
from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/lib/puppet_languageserver.rb:222:in init_puppet' from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/puppet-languageserver:13:in

'
[Info - 10:08:47 AM] Connection to server got closed. Server will restart.
C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in mkdir': Invalid argument @ dir_s_mkdir - H:/.puppetlabs/var (Errno::EINVAL) from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:404:in create_ancestors'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:389:in block in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:163:in do_initialize_settings_for_run_mode'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:155:in initialize_settings' from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/lib/puppet_languageserver.rb:222:in init_puppet'
from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/puppet-languageserver:13:in <main>' [Info - 10:08:52 AM] Connection to server got closed. Server will restart. ERROR: 2020-05-17T14:08:56.953Z Error: connect ETIMEDOUT 10.71.6.18:9119 C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in mkdir': Invalid argument @ dir_s_mkdir - H:/.puppetlabs/var (Errno::EINVAL)
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:404:in create_ancestors' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:389:in block in initialize_app_defaults'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in each' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in initialize_app_defaults'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:163:in do_initialize_settings_for_run_mode' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:155:in initialize_settings'
from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/lib/puppet_languageserver.rb:222:in init_puppet' from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/puppet-languageserver:13:in '
[Info - 10:08:58 AM] Connection to server got closed. Server will restart.
C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in mkdir': Invalid argument @ dir_s_mkdir - H:/.puppetlabs/var (Errno::EINVAL) from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:232:in fu_mkdir'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:210:in block (2 levels) in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in reverse_each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:208:in block in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/ruby/2.5.8/lib/ruby/2.5.0/fileutils.rb:193:in mkdir_p' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:404:in create_ancestors'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:389:in block in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in each'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet/settings.rb:388:in initialize_app_defaults' from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:163:in do_initialize_settings_for_run_mode'
from C:/Program Files/Puppet Labs/DevelopmentKit/private/puppet/ruby/2.5.0/gems/puppet-6.15.0-x64-mingw32/lib/puppet.rb:155:in initialize_settings' from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/lib/puppet_languageserver.rb:222:in init_puppet'
from c:/Users/A375484/.vscode/extensions/puppet.puppet-vscode-0.26.1/vendor/languageserver/puppet-languageserver:13:in `'
[Error - 10:09:03 AM] Connection to server got closed. Server will not be restarted.

@LIUHUANUCAS
Copy link

I have the same problem

  • version:April 2020 (version 1.45)
  • macos ,clang-format version 10.0.0
  • I don't confirm the exactly steps to reproduce it, but the happened time is that I use the clang-format extension to format my cpp files on save.what's more ,I can not use the format on save when the error has happened.
  • the error information as follows:
    image

@michelleangela
Copy link
Contributor

@MarkAllenPhillips this repository is for the C/C++ extension. From your logs it looks like the issue is with extension Puppet https://github.com/puppetlabs/puppet-vscode

@michelleangela
Copy link
Contributor

@LIUHUANUCAS can you try uninstalling and re-installing the extension with the latest version 0.28.0? If that does not fix the issue, please create a new issue for the latest version of the extension.

@LIUHUANUCAS
Copy link

@LIUHUANUCAS can you try uninstalling and re-installing the extension with the latest version 0.28.0? If that does not fix the issue, please create a new issue for the latest version of the extension.

  • yeah: sometimes ,I uninstall and re-install the Clang-Format and cpptools extension, the issue can be solved for a while after un-re install the extension, but the issue happens after a while.
  • the Clang-Format extension version is 1.9.0
  • the cpptools extension version is 0.28.0

image
image

@MarkAllenPhillips
Copy link

MarkAllenPhillips commented May 19, 2020 via email

@michelleangela
Copy link
Contributor

@LIUHUANUCAS I created a new issue at #5528 for your issue. Please continue to provide info at the thread.

@microsoft microsoft locked as resolved and limited conversation to collaborators May 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug fixed Check the Milestone for the release in which the fix is or will be available. insiders Currently only repros with our latest Insiders release. Language Service regression A bug that didn't exist in a previous release reliability Visual Studio Inherited from Visual Studio
Projects
None yet
Development

No branches or pull requests

6 participants