-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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]: Program exit is slow only on Windows #13850
Comments
@marvelm, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
Would you like to help us and send a PR? |
This issue is looking for contributors. Please comment below or reach out to us through our IRC/Slack/Matrix channels if you are interested. |
I have started to have this issue on my repo about two weeks ago too - https://github.com/ptrdom/scalajs-esbuild/actions/runs/8969102614. Only Windows jobs fail, and it seems to be related to timeouts on quitting the driver. The project with this issue is JVM-based. |
Might also be a bug with some recent release of chromedriver v124. |
This issue is stale because it has been open 280 days with no activity. Remove stale label or comment or this will be closed in 14 days. |
This issue was reported almost a year ago and no one else seems to have run into it. I'm closing this issue because there's a viable workaround. |
What happened?
Hello,
Apologies for the vague title, but it completely summarizes what we've been experiencing.
When running this code with a profiler, we discovered that
send_remote_shutdown_command
is taking >30 seconds to finish.To get to the bottom of the issue, we monkey-patched this function. This gave us an unexpected output.
.quit()
was only called 3 times, but the output shows thatsend_remote_shutdown_command
was called 6 times. I think it's because__exit__
is being called by thewith
statement.selenium/py/selenium/webdriver/remote/webdriver.py
Lines 216 to 222 in ba27d0f
On macOS and Linux, calling
quit()
twice is quick because the default TCP socket timeout is low. However on Windows, the default timeout is long.selenium/py/selenium/webdriver/common/service.py
Line 126 in ba27d0f
Solution
We're working around this issue on Windows by monkey-patching the function and setting the timeout to a small value.
How can we reproduce the issue?
Relevant log output
Operating System
Windows 10
Selenium version
4.19.0
What are the browser(s) and version(s) where you see this issue?
124.0.6367.60
What are the browser driver(s) and version(s) where you see this issue?
ChromeDriver 123.0.6312.122
Are you using Selenium Grid?
No response
The text was updated successfully, but these errors were encountered: