-
-
Notifications
You must be signed in to change notification settings - Fork 224
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
Windows: Execa is leaking processes when used with readline #429
Comments
Can you check whether the problem is also reproducible on Node.js 14? I don't have a Windows VM right now, so I cannot test. Can you also try replacing |
I can't reproduce it with PowerShell (v5.1.19041.1) Node.js v12.14.0 on Windows 10 (version 2004 OS build 19041.264). In this environment it succesfully killed the process. |
@MatejBransky interesting. Notice that for me it has behaved like this: It worked e.g. 10 times a row and then it stopped working for a while etc. That is the reason I suspect there is race condition. |
@Ciantic Ok and how to reproduce it? I've tried it multiple times and it still worked. |
@MatejBransky if there is a race condition, it might not be reproducible on all systems and setups. Because something is delayed just enough in my machine, or works faster in yours. |
@MatejBransky If it works for you, you shouldn't waste more time with this. I have to investigate further if it's reproducible only on my setup for some reason. You can see from here: https://www.pika.dev/npm/snowpack/discuss/295 it's been a painful to debug. |
@Ciantic I've come here from your pika discussion and I would like to help but unfortunately I don't know how. 😒 |
I tested this in the VM. The Windows Sandbox with Windows 10 2004. It's still reproducible with this setup, so yes I would conclude it's broken somehow. Tested node versions: I updated my repository with repro, nothing that changes the behavior. |
I can also reproduce this, Windows 10 1909 Tried from both bash and powershell |
Worth noting, I can't reproduce this using the same example code with execa 1.0.0. |
It's sometimes not reproducible, so if you managed to reproduce it once, it might still be reproducible. |
More information in #433 (which seems to be a duplicate issue). Could you try to pass the |
I just tested this specific issue with windowsHide: false and it fixed this one too, so #433 and this issue do appear to be duplicates. |
Thanks for checking this out @ManiacDC! Closing this issue as duplicate then. |
Repro is here: https://github.com/Ciantic/execa-readline-problems
There is also a long spanning discussion because it leads to snowpack leaking processes in Windows: https://www.pika.dev/npm/snowpack/discuss/295
It seems like the cleanup is not working correctly when readline is used. Also I think there is some race condition here, because I have managed to make scripts where the execa cleanup happens sometimes, but sometimes not. So it's not deterministic.
node --version: v12.18.0
The text was updated successfully, but these errors were encountered: