-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
Chromedriver quit() method doesn't close all chrome.exe processes #6317
Comments
Also having similar issue with seleniumJS 4 / Chrome 68 / chromedriver 2.38 & 2.41 via headless where
|
We opened a similar type issue (6314) yesterday except for IE. I can't guarantee its the same issue, but the resulting behavior seems to be the same. This issue started about a week ago after taking a MS update. Otherwise, wish I could be more helpful! |
We met same issue,On chrome and chromedriver |
I have the same issue, both on Windows 7 and Windows 10 since a few weeks. I already tried a lot of things, nothing worked yet. For instance I tried dozens of ways to terminate chromedriver.exe, as an administrator, on commandline with various commands, with PowerShell and with tools from Sysinternals. Only a Windows reboot kills these processes, log off and log on does not terminate them. Also I disabled the virus scanner and reverted to previous versions of Selenium and webdrivers, but it did not help. It happens with webdrivers for Chrome, IE and Edge (we do not use other browsers), apparently only since a few weeks. Sometimes the processes can be terminated however when ¨driver.quit()¨ is executed. Maybe it has to do with an automatically installed Windows update? In a forum someone wrote that he uninstalled More and more zombie processes slow down the test execution performance and tests fail because of timeouts then. There is a blog https://blogs.technet.microsoft.com/markrussinovich/2005/08/17/unkillable-processes/ which explains the reasons for that in Windows and how it can be analyzed by debugging. But I am no expert on this and I do not know yet if the Windows administators will allow to install the ¨Windows Debugging Tools¨. But maybe someone else is familiar with this and can install them in order to investigate the reason? Also interesting seemed to be this page: https://randomascii.wordpress.com/2018/02/11/zombie-processes-are-eating-your-memory/ It mentions a tool called ¨FindZombieHandles¨, but our very secured system prevents me to use such a tool. Maybe someone else has the oppurtunity and can report if it helps to understand why exactly the webdriver processes cannot be terminated? In a forum which I cannot find anymore someone wrote that after uninstalling a recent Windows update (KB something with 818 I think at the end) the problem with webdriver zombie processes could be solved. But that update was not installed on our computer. Now I see here #6314 which says that it occured after KB4339093, which is installed on our machine since a few weeks. I maybe try to convince the admins to uninstall it. |
As far as it hits three drivers (IEDriverServer, chromedriver and geckodriver) developed independently by different people, and taking into account the fact that we did not touch OS subsystem of Java binding for half a year, the issue must be caused by a change in operating system. I suppose Selenium can't kill a driver process for the same (unknown yet) reason that you can't kill it from the task manager. Something prevents the process from being stopped. Try to check if reverting KB4339093 actually resolves the issue. Of course it's just a workaround, but we have to identify the root cause before trying to fix the issue. |
In our case the problem seems to be gone since last week. Maybe there was some Windows update which fixed it. |
We are facing identically same issue with |
Facing a similar issue: Using an async function in an express get method in node, after running successfully once and calling driver.quit() cannot call again due to chromedriver still running |
Hi all |
We are encountering the same issue. 3 Google Chrome (chrome.exe) process still sits in memory after calling driver.quit(). They tend to take between 25-30% CPU and roughly 20-25 MB in memory each. Currently, calling taskkill on chrome.exe is the only way to get rid of em. Selenium 3.12.1 |
I have the same issue when page timeout reached and there is no exception for Webdriver.Quit() and does not kill the processes. |
I have same issue, lot of chrome cause my test server freeze because runs out of ram. |
Same here. |
We have been able to fix the issue of the chrome.exe zombie processes being left over. We were passing "--no-sandbox" argument to the ChromeDirver. Removing this argument from the driver initialization solved the issue. We no longer have the zombie processes left over after calling driver.quit |
In our code we always had "--no-sandbox" COMMENTED OUT and the problem is still there. I'm wondering why no one addresses this issue in the Selenium code; here is a scriplet from org.openqa.selenium.os.OsProcess class; have a look at the comment:
|
@spetrovas Try removing the "no-sandbox" argument |
My headless chrome cannot run without --no-sandbox flag. |
Sorry, about confusion - I meant to say "In our code we always had "--no-sandbox" COMMENTED OUT and the problem is still there." I corrected my previous comment. The error in the node log file: is coming from this class and method: What I was trying to point out is this comment in the code: // I literally have no idea why we don't try and kill the process nicely on Windows. If you do, if (isRunning()) { Our Se Grid runs on Windows 10 (AWS WS): It might be the problem related to Windows but it still can be the problem in Selenium code as well. From the code it is apparently seen that there is no proper process.destroy implemented for Windows platform, and then the process is simply tried to be destroyed forcibly. And my question is - is anyone going to look into that problem? |
We are having this same issue as well. Why was this closed? |
please submit all ChromeDriver issues to: https://bugs.chromium.org/p/chromedriver/issues/ |
https://stackoverflow.com/questions/10752512/get-pid-of-browser-launched-by-selenium/13650111 |
That does not help when using remote web driver with Se Grid which provides remote service. |
Just noting for anyone caught out by a similar experience. I found a number of zombie instances of chrome persisted after I aborted builds running on jenkins. Naturally, if they are aborted mid flight, they don't hit the teardown method and terminate processes using .close and/or .quit Taskkill mopped them up but maybe worth bearing in mind |
We moved to using the standalone-chrome docker container for testing. This allowed us to have timeouts on the docker container when tests seemed to either escape all the catches for .close() or didn't work. It has been a bit difficult to work into codeception integration but for standalone selenium tests with python or node it has been great |
OS: Windows 7 (64-bit)
Selenium Version: 3.14
Browser: Chrome, Firefox
Browser Version:
Google Chrome 68.0.3440.106 (Official Build) (64-bit)
Expected Behavior -
chromedriver.exe processes to be closed.
geckodriver.exe processes to be closed.
Actual Behavior -
Hello guys, since a month ago, we're expecting some kind of problems trying to kill the chromedriver.exe and geckodriver.exe processes.
We usually run several tests simultaneously and when the TestSuite ends, many chromedriver.exe / geckodriver.exe processes still there on the system.
This problem causes the system goes slower and slower, causing at the end the system crashes.
This is the message we're receiving from the driver:
Trace init:
When we try to quit() the driver:
This is not happening every single time, for example, if we try to reproduce the error in oir IDE's it is almost impossible. It seems that is something related whith too many chrome processes running at the same time (My guess).
This is the method we call in every single test we run (in @after ) we close and quit the driver:
And this is the way we start the driver:
We have tried almost everything (we are 5 testing engineers working on the same project) and the processes are still there.
Windows can't kill the process with taskkill /f /im chromedriver.exe
So.... Please, if someone have some idea, we would appreciate it. We have read a lot, before opening this issue.
Thank you guys! Thank you community!
The text was updated successfully, but these errors were encountered: