-
Notifications
You must be signed in to change notification settings - Fork 229
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
[Bug]: Node and Chromium processes remain despite calling IPlaywright.Dispose() #1749
Comments
Can you reproduce this outside K8S? |
I have a similar issue where node isn't closing and it creates a new process each time it creates a new instance. I'm using Firefox though and that seems to be closing fine. I'm running this on a standard Windows machine |
I have not tried outside of K8S, though I do occasionally see a stuck Chromium window when running on my local Windows machine (non-headless mode). Will try to test against a Linux VM without K8S. |
Still haven't played with this outside of Kubernetes, but I came across an article discussing this: https://www.back2code.me/2020/02/zombie-processes-back-in-k8s/ The short version is: adding I also came across a Stack Overflow post with a similar issue: I do notice that |
We have same problem on Windows 10 / Windows Server 2019 - node.exe process remain detached from parent process besides
node.exe processes are closed automatically after main process is closed. |
I can repro this on my developer machine as well (Windows). I'm having a hard time telling if this issue is actually resolved in my K8 cluster per my comments above as well. I no longer see defunct processes, but there are several which still appear to be running (I think this might be expected due to sharing processes across the namespace?) Meanwhile, they seem to be getting |
Same issue here.
Node processes are left behind until main program closed. Verified on Windows 10, Ubuntu 20 and OSX 11 I assume this is because in StdIOTransport.cs we start _process playwright.sh which opens in bash, later we kill this _process but it only kills the bash process. |
First of all it might be I'm doing something wrong, if so please let me know.. Without any K8s looping the frontpage sample with added close/dispose like this:
Number of node processes will keep growing until exiting main.. Problem might lay elsewhere (node + cli.js not exiting cleanly) but adding a dispose before the kill in StdIOTransport.cs fixes it .
|
BTW @kababoom
IMO |
It's just to illustrate dispose does release the child node processes. |
On this version it works - #1813 (comment) It adds process?.Dispose(); as mentioned by @kababoom |
I'm also seeing zombie node processes depsite calling Dispose() and DisposeAsync() methods |
Playwright version
1.14.1
Operating system
Linux
What browsers are you seeing the problem on?
Chromium
Other information
.NET 5; Ubuntu Server 18.04 (Azure Kubernetes).
What happened? / Describe the bug
Despite calling
IBrowserContext.DisposeAsync()
andIPlaywright.Dispose()
, I see zombie processes on my Linux host - one Node process paired with two Chromium instances (see the Log Output).My service is a .NET Console Application which runs indefinitely (until terminated by the Kubernetes host). and needs to tear down the
IDriver
after my service finishes processing a request.Code snippet to reproduce your bug
Relevant log output
The text was updated successfully, but these errors were encountered: