-
Notifications
You must be signed in to change notification settings - Fork 29.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
Remote development: Zombie file watcher processes not cleaned up on remote host #156690
Comments
Updated to indicate that I tested w/ extensions disabled. |
Validated that this does not happen when VS Code is open locally. Will update title/description to reflect that this is a remote development issue. |
The processes do seem to go away eventually, but it takes many minutes. Due to the size of our monorepo, having just a few of these around can cause all inotify watches to be exhausted. |
@alexdima can you chime in, my understanding is that each client starts a management process and an extension host process which both should go away when the client disconnects (closes window, quits or reloads window). Did something change here?
It is possible to configure excludes in settings (via |
@bpasero Yup, I have already configured excludes to remove all third-party and codegenned artifacts in the repo. There's no more clear fat to trim there. VS Code watches far fewer files than Watchman or Bazel (which also run in the monorepo), but due to the size of our monorepo it is still a fair number of files. As an aside, I wish we could just have VS Code use watchman for notifications to reduce the file watching duplication here. EDIT: I know I say "just", but I understand that this would be a real feature undertaking -- not something that would take 5 minutes of time. I should be more careful with my wording! |
Its funny you mention that because under the hood we do use https://github.com/parcel-bundler/watcher and that has support for Watchman as a backend, we just never allowed to enable this because we have literally 0 testing on this backend since nobody is using Watchman here and could say if it actually works or not... |
@bpasero Oh, you are? For some reason, I thought I saw some commits by you that replaced this with some other watcher by default? Well, if there is a way to somehow experiment with using watchman as the backend, please let me know! |
Bisect points to e71b610...e775136 , with the most likely culprit being 9396199 which fixes leaking extension host connections (and most likely introduces leaking management connections). |
…tion before killing the local extension host
Thank you all for your quick response to this issue! I look forward to the next stable release with this fix. :) |
@alexdima can you also put this to the |
Done! --> #157557 |
Steps to verify:
|
I could reproduce the leaked watcher processes in VS Code 1.70 and I've verified that no watcher processes are leaked with the fix. |
…ling the local extension host (microsoft#157557) Send a disconnection message via the management connection before killing the local extension host (microsoft#157269) Fixes microsoft#156690: Send a disconnection message via the management connection before killing the local extension host
Does this issue occur when all extensions are disabled?: Yes
Steps to Reproduce:
--disable-extensions
.Here's the proof of them still consuming watches via this script:
They both have the same parent process:
If you reload 5 times, you end up with 5 processes.
In 1.68, the fileWatcher process closes when the window is reloaded or closed. This appears to be a new bug.
This bug is causing Stripe engineers to consume all inotify watches on their development machines.
The text was updated successfully, but these errors were encountered: