Since upgrading to the latest VS Code (1.53.2) on my CentOS 7 host recently (64-bit x86), code chews up 100% of a core, indefinitely, every time I ran it (no extension installed).
When I downgraded code to 1.52.0 everything was fine again, CPU utilisation was normal; but when I upgraded again to 1.53.2 (or 1.53.0), the same 100% CPU utilisation problem reemerged.
See the problem in action here: https://www.youtube.com/watch?v=kicUYrwSY-A
Sounds like either something was broken in code 1.53.X, or could it be CentOS, now that Redhat is deprecating it. Hope someone has a solution, other than downgrading Code that is.
3
Answers
VS Code as of 1.53 no longer supports the default C++ ABI of CentOS 7.
See https://github.com/microsoft/vscode/issues/115784
Work arounds are:
The linked issue discusses these.
In an unfortunately short-sighted move, in VSCode 1.53, Microsoft has dropped support for RHEL 7 and CentOS 7, the only LTS release for CentOS.
As I posted in the GitHub issue comments, as an awkward workaround, you can lock VS Code to the last compatible version. Of course this means you won’t get any upgrades for VS code on that machine (but you’ll have the latest version that is still compatible with the machine).
Here are the specific steps for anyone else finding this problem and needing to pin VS Code to 1.52 in order to not have their toolchain completely disrupted:
sudo yum downgrade code-1.52.1-1608137084.el7.x86_64
or if you don’t have VS Code installed yet:
sudo yum install code-1.52.1-1608137084.el7.x86_64
sudo yum install yum-plugin-versionlock
(if the versionlock plugin isn’t already installed)
sudo yum versionlock code
(to lock it at 1.52)
Note that it’s still possible to test more recent versions alongside 1.52 by installing the nightly "insiders" build, which installs a separate
code-insiders
command.UPDATE: Microsoft claims to have resolved this in the latest code-insiders release (1.60.0), which should make it’s way to the usual releases soon (probably in the "August" release about a week into September). In the meantime, you can install the code-insiders release as a workaround.
We have a working solution on our side with:
Instead of installing it with yum package manager, we install it through snapcraft.io
First, install Snap on CentOS:
https://snapcraft.io/docs/installing-snap-on-centos
And then, install Visual Studio Code through Snap: