-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Memory Leak on MacOS. Using +7gb Memory on Empty Project #16140
Comments
The steps to recreate
|
Can't reproduce on Linux. |
Can't repro this on windows either |
@Veykril is this something that got fixed or just was not reproducible? i'm getting around 40gb of memory usage on macOS, with an M2 mbp. 16gb of actual ram, so it's filling up all my swap too. this has been happening pretty consistently working on a specific project, most recently when i changed git branches. I had also changed to the prerelease version, and had the same issue. happy to help try to find the source of this. ![]() ![]() ![]() ![]() edit; i think it has to do with the format-on-save functionality. i save a file, and sometimes it hangs, i get a notification in vs code that it's trying to run the formatter before saving. i have to cancel that to save the file, and then the memory usage quickly balloons. here's a screenshot. |
Not reproducible, if you have a leak problem please update to the latest release and check again |
@Veykril , the example I provided may indeed be reproducible—just not on other OS's. The issue is still present on the latest release, and considering somebody else has bumped into the same issue on MacOS, it might be a mac-specific bug. I appreciate your help though. @DrewMcArthur , if you're open to it, it would be awesome if you could let us know if the example in the original post will cause a leak for you too; this way, we can verify the issue is reproducible on other mac machines. |
Then someone with a mac will have to investigate as I don't have such a machine. |
i think #16935 fixed my issue but i'll see if i can reproduce |
Hello, I have this problem too, my M1 mac has crashed multiple times due to rust-analyzer using up more than 30 gigs of ram and it running out. I am now required to keep task manager open while I use it so that I can kill rust-analyzer when it lags for a while before it crashes my whole system again. I only have this on my macbook, on linux and windows I have not had this issue. I don't want to put any pressure here, it is manageable, but I would love to help diagnose the issue in any way I could. Is there anything I can provide to help? One thing I can say is that I love doing insane stuff with macros and usually the worse my macros get the worse the problem gets, so maybe it has something to do with that? |
Can you run the command: |
Closing as this is too unclear and given the salsa rewrite is coming up, things here might change drastically |
When I open the parent dir of any rust project, it looks like there is some sort of memory leak; the "rust-analyzer" icon spins indefinitely as memory racks up.
I'm on macOS Ventura 13.1 on M1 (macbook air 2020). I have no issues whatsoever when I open the crate's directory directly.
I really like this plugin, so I hope this helps. Good luck!
rust-analyzer version: v0.4.1773 (plus whatever the main release is)
rustc version: rustc 1.73.0 (cc66ad468 2023-10-03)
relevant settings: Everything vanilla. No env vars set.
The text was updated successfully, but these errors were encountered: