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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Firefox memory leak: Firefox crashing in some tests #40

Open
helkv opened this issue Mar 8, 2019 · 0 comments
Open

Firefox memory leak: Firefox crashing in some tests #40

helkv opened this issue Mar 8, 2019 · 0 comments

Comments

@helkv
Copy link

helkv commented Mar 8, 2019

Firefox memory leak:
If there are a lot of actions performed in Firefox without a break, Firefox consumes more and more memory without releasing it. This can lead to a crash of Firefox, if no more memory is available. Firefox releases the memory only after a certain downtime (when no actions are performed in Firefox).
At least the following Firefox versions are affected: 60.0 , 64.0 , ...

Issue for Selenium Tests:
Some Selenium Tests perform a lot of actions in a row without a longer break. These tests will fail if Firefox is used as the executing browser and Firefox crashes because of the described memory leak.

Also see: https://stackoverflow.com/questions/55072731/selenium-using-too-much-ram-with-firefox

Affected Selenium Tests:

  • In principle every test, if multiple tests are executed before without a break or a restart of the driver
  • The data driven tests (CreateDefaultStatementTest, ...)
  • The high volume tests (CreateMultipleStatements, ...)

Characteristics (Error messages which occur if Firefox crashes):

  • Jenkins crashes [does not respond anymore]
  • "... The forked VM terminated without properly saying goodbye. VM crash or System.exit called? ... Error occurred in starting fork, check output in log ..."
  • "###!!! [Parent][MessageChannel] Error: ... Channel error: cannot send/recv"
  • "org.openqa.selenium.NoSuchSessionException"

Workarounds:

  • Restart Firefox before/after the affected tests
    driver.quit();
    driver = new FirefoxDriver();
  • Wait a certain time before/after/within the affected tests
    Thread.sleep(30000);
  • Run tests in Chrome
helkv added a commit that referenced this issue Mar 11, 2019
- Bug 'Firefox crashing on Jenkins (NoSuchSessionException)' does not
appear on qa-imeji
- With the fix for ticket #40 Firefox should not crash on dev-imeji
anymore
helkv added a commit that referenced this issue Mar 11, 2019
- Added restartDriver() method, which closes the actual WebDriver
(browser) and opens a new WebDriver (browser) instance for the tests
- Added getBrwoserType() method
- Refactored SeleniumTestSuite class
helkv added a commit that referenced this issue Mar 11, 2019
- Restart Firefox before each test run of the data driven tests
(CreateDefaultStatementPrivate, CreateDefaultStatementTest,
CreateNewStatementPrivate, CreateNewStatementTest)
- This should fix Bug 'Firefox crashing on
Jenkins (NoSuchSessionException)' on dev-imeji
helkv added a commit that referenced this issue Mar 11, 2019
-> Restarting the webdriver (firefox) before each data driven test leads
to Jenkins crashing (Reason unknown)
- (Temporarily) Removed Restarting the drive before each data driven
test
- (Temporarily) Added Implicit Wait again
helkv added a commit that referenced this issue Mar 12, 2019
-> Restarting the webdriver (firefox) in CreateSubcollectionsTest and
the data driven tests should prevent Firefox/Jenkins crashing
- Reinsert Restarting the firefox drive before each data driven test
- Restarting the firefox drive before CreateSubcollectionsTest
helkv added a commit that referenced this issue Apr 30, 2019
-> Firefox/Jenkins crashed again because of the firefox memory leak.
This time caused by CreateMetadataFacetPrivate.
- Add Restarting the firefox drive to: CreateDefaultFacets,
CreateDefaultFacetsPrivate, CreateMetadataFacet,
CreateMetadataFacetPrivate
helkv added a commit that referenced this issue May 2, 2019
-> Add Restarting the firefox drive to MetadataSelectedItems to have a
additional restart when running all tests
-> Running MetadataSelectedItems alone would not lead to a firefox crash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant