-
Notifications
You must be signed in to change notification settings - Fork 1.7k
rust-analyzer triggers the OOM killer (on a machine with 32GB RAM) #16908
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
Comments
Might be that VSCode leaves the LSP processes around if they don't shut down by themselves after receiving a shutdown request (which would be the case if r-a hangs up for some reason). Just to check, you are not using the new test explorer feature right? (it's opt-in and has some known perf problems). I don't see anything special that we added in last stable release that could explain this 😕 https://rust-analyzer.github.io/thisweek/2024/03/18/changelog-225.html |
Just to double check, are you sure you are not on a nightly r-a version? Because if yes then this is most likely the same issue as #16902 |
I copied the RA version that vscode reports. I never intentionally opted-in to a nightly version. I am using vscodium with its open-source extension store; not sure if that would make a difference?
I have no idea what a test explorer is so I think I am not using it. :D |
I'm also experiencing this. Using nightly rust analyzer |
|
I was previously running the nightly from March 3rd I think, and it was not exhibiting this. |
I'm also experiencing this with |
It might just be #16907, I experienced OOMs after upgrading my nightly toolchain today as well |
Just had another OOM take down my entire Gnome session.
I guess the OOM killer was too late and that's why the gnome shell died as well, or something like that. |
I'm running into this too. To ensure that not the entire system gets bogged down and instead only vscode gets killed I start it with systemd-run --user -p "MemoryMax=40G" vscode to constrain the memory of the entire process tree via cgroups (this requires cgroups v2 and delegation of the memory controller). Pointing |
|
RA uses a lot of RAM. I know there are existing issues for that, but recently it seems to have gotten a lot worse. In the last 2 days I had two situations where my machine would freeze. In one case my entire session got restarted, in one case only RA got killed. This is the first time ever that happened since I got this machine about a year ago -- usually, 32GB of RAM is plenty enough. And it always was enough for RA as well, even when working on rustc. But now, not any more:
I have also seen the RA extension lose track of RA processes -- there was a single vscode window open with a Rust project, and yet
pidof rust-analyzer
would report two processes. Closing the window would only terminate one of these processes, the other had to be killed by hand. And it seems like that was the case above as well, according to the task list printed by the OOM killer. However, in the past I had 3 vscode windows open with RA (2 times rustc and one time Miri) and didn't run into freezes, so just having two instances (i.e., double the RAM usage) doesn't suffice to explain this.rust-analyzer version: rust-analyzer version: 0.3.1885-standalone (b6d1887 2024-03-17)
The text was updated successfully, but these errors were encountered: