-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
19.8.1 leaves dangling child processes on Windows #28207
Comments
Issue still present on 19.8.2, we've rolled back to 19.8.0 in the meantime. |
There is some nuance to this. The sub-processes you see are probably the plugin workers. Nx spawns them when calculating the project graph and their lifecycle is tied to the parent process. By default, this parent process is the nx daemon. So as long as the daemon is running, the plugin workers will be running. This is independent from the individual task execution and is expected behavior. It's very possible that there is still an issue stemming from Is there a difference between tasks that end by themselves (like |
@MaxKless Thanks for the reply!
And yes it's only with tasks the user kills. A I've confirmed that by doing a find/replace in all of the nx & @nx packages for |
yeah I can repro this and am working on a fix. I don't want to replace all instances of |
Anyone know in which version this issue was introduced? I'm currently on 19.6.6, and not sure to which version I'd have to update to avoid zombie processes. |
If you wait just a couple of hours, you should be fine to update to |
Looks like the PR to fix this is #28496 (just tagging to link the two). |
Thanks @MaxKless! @CreativeTechGuy do you see prompt windows popping up as a side effect? |
@lppedd The fixed version hasn't been released yet so I cannot test it. But when making the patch locally, yes a windows command prompt window will flash for a second and then close. Doesn't really bother me. |
20.0.2 is out! So please try this new version and confirm that it's fixed. Please let me know if you run into any windows popups after the update, I didn't locally, but it might still happen. We will have to take care of those manually. Thank you :) |
@MaxKless upgraded to 20.0.2 and it behaves as expected for me. No popups currently, I'll keep you posted. |
I don't think this is entirely fixed yet. I have constant CMD popups still, and Node.exe processes running in the background while using |
Node.exe processes running in the background are entirely normal, there's the daemon and plugin workers and the language server if using Nx Console. |
@MaxKless I know they are normal, but sometimes it feels like things are stuck in the background and taking up 1GB+ memory still. But I can't tell for sure if this is Nx related. Regarding popups, I got one step further now. It seems ,CMD is used through Windows Terminal, and then the Windows Terminal stays open without and CMD tab in it. After adjusting the CMD settings from Automatic to the popups at least close afterwards and won't stay open. I've created a reproducer, which is basically just a fresh workspace, the demo app duplicated and a few nx dependencies added, and my nx.json from my actual application. https://github.com/mklueh/nx-popup-reproducer/tree/test Running
will trigger the CMD popup. Although it opens a popup, it doesn't do it every time I run the command, contrary to my real project. Besides that I've found out that the vue-language-server is also leaving a cmd.exe popup open (or maybe the only process that leaves the popup open?). This is from the manual closing of the popup using https://learn.microsoft.com/en-us/sysinternals/downloads/procmon So after disabling the vue language service, I do not get popups that stay open anymore, only those that close right afterwards, independently from the terminal setting changes described above. |
Current Behavior
When pressing ctrl+c on windows to kill a NX command (eg: a dev server), it leaves all of the sub-processes (node, esbuild, vite, etc) running.
Expected Behavior
When pressing ctrl+c on windows to kill a NX command (eg: a dev server), it should kill all of the processes which were created.
GitHub Repo
No response
Steps to Reproduce
nx:run-commands
executorNx Report
Failure Logs
Package Manager Version
No response
Operating System
Additional Information
This is the commit which broke it: #28073
This is the NodeJS reference for why it's broken: nodejs/node#29837 (comment)
The text was updated successfully, but these errors were encountered: