-
Notifications
You must be signed in to change notification settings - Fork 27.9k
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
Endless CPU and memory occur in "node" when a symlink to / exists in the workspace #121854
Comments
Can you configure to exclude the folder under |
That does not fix it. |
Can you provide the output of |
/home/username/.vscode-server-insiders/bin/85f8ebf1687661c45fe2633bdd7f640164a20cc2/node/home/username/.vscode-server-insiders/bin/85f8ebf1687661c45fe2633bdd7f640164a20cc2/out/bootstrap-fork--type=watch |
Thanks, what is the version of remote wsl extension being used ? Can you check if the issue goes away with |
0.56.1 (latest version). remote.WSL.fileWatcher.polling is already set to false by default and explicitly setting it to false has no effect. |
/cc @aeschli for remote-wsl scenario based on microsoft/vscode-remote-release#4637 |
So it sounds like this is a Remote/WSL2-only issue? I could try the repro on a local Linux machine if you want. |
Yes that would be helpful if you can do it. |
Yeah, I don't repro it on my Linux arm64 machine when files.watcherExclude is set, but it repros when I set the path to false (which sounds like it's "by design", although it seems odd why files.watcherExclude doesn't inherit files.exclude like search.exclude does). So it looks like the bug is that files.watcherExclude isn't working in the remote WSL scenario (unless there's some other factor I'm not aware of). |
@sean-mcmanus still repros in insiders? |
@bpasero This bug still repros with today's Insiders. |
@sean-mcmanus can you set log level to Trace: And open the server output channel, open a file, make some changes, save and see what output you get from the file watcher. I am curious as to what file watcher is being used in your case. Should be prefixed with something like |
@bpasero It says [remoteagent] [trace] [File Watcher (node.js)]. |
@sean-mcmanus the Anyway, I just tried this out myself both on WSL1 and WSL2 and already found 2 issues:
As for the file watcher process: I see it running and I see it consuming around 20% of CPU (that is what Anyhow, once we introduce a different file watcher, I suspect this might change because the new file watcher will no longer automatically follow symbolic links when encountered. Instead, you have to explicitly configure |
@bpasero I see no nsfw logging messages. I'm using WSL2. I don't see a ripgrep process running. Yeah, I think the 200% in my repro description was supposed to be 20%, and it sounds like the new file watcher would fix it. It doesn't seem to "eventually settle down", but I assume that's because my root has too many files/folders. |
@sean-mcmanus but you don't have polling enabled right? |
Yes, no polling, "remote.WSL.fileWatcher.polling": false |
I am a bit confused by #121854 (comment) and I also think you referenced the wrong issue. Symbolic links are never automatically followed in the parcel watcher. But it is possible that the polling mode I implemented does actually follow symlinks and likely does not protect against circular symlinks. |
I verified that |
I didn't see any endless loops. I thought I saw a noticeable CPU uptick but measuring again today I cannot confirm that. So all is fine. |
Steps to Reproduce:
Bug: Node starts using 200% CPU and memory keeps increasing (slowly). Even adding test1 to files.exclude doesn't work. Using the Toggle Developer Tools->Performance logging shows no CPU usage.
Does this issue occur when all extensions are disabled?: Yes
The text was updated successfully, but these errors were encountered: