Skip to content

Visual Studio Code eats up all the CPU memory. #247310

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

Open
MoskalenkoM opened this issue Apr 24, 2025 · 6 comments
Open

Visual Studio Code eats up all the CPU memory. #247310

MoskalenkoM opened this issue Apr 24, 2025 · 6 comments
Assignees

Comments

@MoskalenkoM
Copy link

Does this issue occur when all extensions are disabled?: Yes/No

  • VS Code Version: 1.99.3
  • OS Version: Ubuntu 24.04.2 LTS

Steps to Reproduce:

  1. Run VS Code.
  2. Wait for a while.
  3. You no longer have any memory in the CPU.
  4. This has been going on for more than six months.

Image

@albertosantini
Copy link

Did you start VSCode with all the extensions disabled?
If the issue is still there, find the offending extension with F1 and Help: Start Extension Bisect

@MoskalenkoM
Copy link
Author

Did you start VSCode with all the extensions disabled? If the issue is still there, find the offending extension with F1 and Help: Start Extension Bisect

No, but I'll try to do it. This problem does not always manifest itself, but with some frequency. Sometimes 5-10 times a day, and sometimes 1 time a day.
If you think about the fact that some kind of extension eats up all the memory, then the question arises, why does the VS Code allow to do this and does not provide protection against malicious extensions that could have been with good intentions for a long time?

@albertosantini
Copy link

Hope you find the cause of your issue.

About the question.

why does the VS Code allow to do this and does not provide protection against malicious extensions that could have been with good intentions for a long time?

See https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox

Enabling the sandbox in Electron renderer processes is a critical requirement for secure and reliable Electron applications such as Visual Studio Code. The sandbox reduces the harm that malicious code can cause by limiting access to most system resources.

Generally speaking, it is always a tradeoff when you have an "open" environment, read "marketplace", between reliability and security.

@MoskalenkoM
Copy link
Author

Hope you find the cause of your issue.

I hope too..

About the question.

why does the VS Code allow to do this and does not provide protection against malicious extensions that could have been with good intentions for a long time?

See https://code.visualstudio.com/blogs/2022/11/28/vscode-sandbox

Enabling the sandbox in Electron renderer processes is a critical requirement for secure and reliable Electron applications such as Visual Studio Code. The sandbox reduces the harm that malicious code can cause by limiting access to most system resources.

Would it be unnecessary to control the studio's memory abuse?

Generally speaking, it is always a tradeoff when you have an "open" environment, read "marketplace", between reliability and security.

@MoskalenkoM
Copy link
Author

Image

@legomushroom
Copy link
Member

Hey @MoskalenkoM, thanks for reporting this!
Do I read your last comment with the screenshot correctly as disabling all the extensions did not help? Did you notice any similar issues on other platforms beside Linux by chance?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants