Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[馃悰 Bug]: v4.3.1 Terminate orphan process: pid (1729) (chromedriver) loop #10863

Closed
MarkusJLechner opened this issue Jul 11, 2022 · 3 comments

Comments

@MarkusJLechner
Copy link

MarkusJLechner commented Jul 11, 2022

What happened?

We run selenium in github actions, when not killing the process properly, github action has problems of getting rid ot the test runner, leading to a timeout. driver.quit do not kill the process like it is needed (see #10795).
This issue is handled with the PR #10796 which removes the functions getDefaultService and setDefaultService. Unfortunally this PR includes breaking changes and made it into version ^4.

Previously the functions where used like this when starting a service:

  if (seleniumChrome.getDefaultService().isRunning()) {
    await seleniumChrome.getDefaultService().kill()
  }
  const service = new seleniumChrome.ServiceBuilder(chromedriver.path).build()
  seleniumChrome.setDefaultService(service)

We use mocha as a test runner (yarn test triggers it), which will opens a chrome browser in the before hook.

In github actions under Complete job this will be logged:

1 Cleaning up orphan processes
2 Terminate orphan process: pid (1701) (node)
3 Terminate orphan process: pid (1712) (sh)
4 Terminate orphan process: pid (1713) (node)
5 Terminate orphan process: pid (1720) (node)
6 Terminate orphan process: pid (1729) (chromedriver)
7 Terminate orphan process: pid (1808) (chromedriver)
8 Terminate orphan process: pid (1885) (chromedriver)
...
76 Terminate orphan process: pid (7060) (chrome)

How can we reproduce the issue?

A github action runner running selenium 4.3.1.
Inside yarn test we simply use mocha to start the browser and close/quit it.

name: Test Runner

on:
  workflow_dispatch:
  repository_dispatch:
    types: [test]

jobs:
  e2e_chrome:
    runs-on: ubuntu-latest
    timeout-minutes: 20

    steps:
      - uses: actions/setup-node@v1
        with:
          node-version: 16.13.2

      - uses: actions/checkout@v2
        with:
          ref: ${{ github.event.pull_request.head.ref }}
      - uses: bahmutov/npm-install@v1

      - run: yarn test


### Relevant log output

```shell
Cleaning up orphan processes
Terminate orphan process: pid (1701) (node)
Terminate orphan process: pid (1712) (sh)
Terminate orphan process: pid (1713) (node)
Terminate orphan process: pid (1720) (node)
Terminate orphan process: pid (1729) (chromedriver)
Terminate orphan process: pid (1808) (chromedriver)
Terminate orphan process: pid (1885) (chromedriver)
Terminate orphan process: pid (1965) (chromedriver)
Terminate orphan process: pid (2051) (chromedriver)
Terminate orphan process: pid (2123) (chromedriver)
Terminate orphan process: pid (2201) (chromedriver)
Terminate orphan process: pid (2281) (chromedriver)
Terminate orphan process: pid (2354) (chromedriver)
Terminate orphan process: pid (2427) (chromedriver)
Terminate orphan process: pid (2505) (chromedriver)
Terminate orphan process: pid (2581) (chromedriver)
Terminate orphan process: pid (2669) (chromedriver)
Terminate orphan process: pid (2754) (chromedriver)
Terminate orphan process: pid (2831) (chromedriver)
Terminate orphan process: pid (2915) (chromedriver)
Terminate orphan process: pid (2994) (chromedriver)
Terminate orphan process: pid (3070) (chromedriver)
Terminate orphan process: pid (3146) (chromedriver)
Terminate orphan process: pid (3220) (chromedriver)
Terminate orphan process: pid (3299) (chromedriver)
Terminate orphan process: pid (3390) (chromedriver)
Terminate orphan process: pid (3467) (chromedriver)
Terminate orphan process: pid (3543) (chromedriver)
Terminate orphan process: pid (3622) (chromedriver)
Terminate orphan process: pid (3699) (chromedriver)
Terminate orphan process: pid (3770) (chromedriver)
Terminate orphan process: pid (3845) (chromedriver)
Terminate orphan process: pid (3925) (chromedriver)
Terminate orphan process: pid (4003) (chromedriver)
Terminate orphan process: pid (4077) (chromedriver)
Terminate orphan process: pid (4152) (chromedriver)
Terminate orphan process: pid (4226) (chromedriver)
Terminate orphan process: pid (4303) (chromedriver)
Terminate orphan process: pid (4380) (chromedriver)
Terminate orphan process: pid (4450) (chromedriver)
Terminate orphan process: pid (4523) (chromedriver)
Terminate orphan process: pid (4601) (chromedriver)
Terminate orphan process: pid (4674) (chromedriver)
Terminate orphan process: pid (4748) (chromedriver)
Terminate orphan process: pid (4836) (chromedriver)
Terminate orphan process: pid (4908) (chromedriver)
Terminate orphan process: pid (4980) (chromedriver)
Terminate orphan process: pid (5053) (chromedriver)
Terminate orphan process: pid (5141) (chromedriver)
Terminate orphan process: pid (5220) (chromedriver)
Terminate orphan process: pid (5294) (chromedriver)
Terminate orphan process: pid (5368) (chromedriver)
Terminate orphan process: pid (5445) (chromedriver)
Terminate orphan process: pid (5517) (chromedriver)
Terminate orphan process: pid (5593) (chromedriver)
Terminate orphan process: pid (5671) (chromedriver)
Terminate orphan process: pid (5753) (chromedriver)
Terminate orphan process: pid (5830) (chromedriver)
Terminate orphan process: pid (5912) (chromedriver)
Terminate orphan process: pid (5986) (chromedriver)
Terminate orphan process: pid (6062) (chromedriver)
Terminate orphan process: pid (6135) (chromedriver)
Terminate orphan process: pid (6209) (chromedriver)
Terminate orphan process: pid (6286) (chromedriver)
Terminate orphan process: pid (6361) (chromedriver)
Terminate orphan process: pid (6439) (chromedriver)
Terminate orphan process: pid (6516) (chromedriver)
Terminate orphan process: pid (6591) (chromedriver)
Terminate orphan process: pid (6670) (chromedriver)
Terminate orphan process: pid (6745) (chromedriver)
Terminate orphan process: pid (6817) (chromedriver)
Terminate orphan process: pid (6896) (chromedriver)
Terminate orphan process: pid (6978) (chromedriver)
Terminate orphan process: pid (7054) (chromedriver)
Terminate orphan process: pid (7060) (chrome)

Operating System

Ubuntu latest

Selenium version

4.3.1

What are the browser(s) and version(s) where you see this issue?

Chrome 99

What are the browser driver(s) and version(s) where you see this issue?

ChromeDriver 99

Are you using Selenium Grid?

No response

@github-actions
Copy link

@MarkusJLechner, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@MarkusJLechner
Copy link
Author

Like explained in 632849c#r78417173
and that I do not have an easily available reproduction setup, i close this issue for now

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants