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

Chromium Renderer process crashes on every Jenkins run #7200

Closed
zac11 opened this issue May 1, 2020 · 5 comments
Closed

Chromium Renderer process crashes on every Jenkins run #7200

zac11 opened this issue May 1, 2020 · 5 comments

Comments

@zac11
Copy link

zac11 commented May 1, 2020

Current behavior:

Running Cypress Tests on local Jenkins installation is failing, and the Chromium render process crashes with this following error-

[745:0429/144950.758921:FATAL:memory.cc(22)] Out of memory. size=96002048

We detected that the Chromium Renderer process just crashed.

All the tests are passing as expected on local machine.

Desired behavior:

Tests should run without any issue, and mochawesome report generated

Test code to reproduce

To reproduce this steps, use the Jenkinsfile from this repo -Git Repo

  • Clone repository

  • run npm i from project root.

  • cd client and then do a npm i

  • Run npm start to start server.

  • Run npm test:ci for all tests

Versions

Cypress Version - 4.4.0

Additional Information

Jenkins installation has been done through docker with the steps mentioned in this file from the Kitchen Sink CI link

Command to install Jenkins. -

docker run --ipc=host --shm-size=512M -u root -d --name blue-ocean -p 8080:8080 -v jenkins-data:/var/jenkins_home -v npm-cache:/root/.npm -v cypress-cache:/root/.cache -v /var/run/docker.sock:/var/run/docker.sock jenkinsci/blueocean:latest

I have added --ipc=host as mentioned By Brian in this issue here and changed the --shm-size as mentioned in the same issue here

I have also changed the base cypress image to cypress/browsers:node12.13.0-chrome80-ff74 and the added the solution mentioned here to disable shm usage. But none of them work.

Log

The terminal output from the failed run is given here in this gist - https://gist.github.com/zac11/f899c8e95c095c606b2c12db4c952d0e

@jennifer-shehane
Copy link
Member

Can you try to disable-dev-shm-usage as described here? https://on.cypress.io/continuous-integration#In-Docker

@cypress-bot cypress-bot bot added the stage: awaiting response Potential fix was proposed; awaiting response label May 4, 2020
@zac11
Copy link
Author

zac11 commented May 4, 2020

Thanks for the response Jennifer. I have implemented a portion of the solution mentioned in the cypress/plugins directory but I see that it is checking for Chrome browser only.
I'll try the solution mention and update the story.

@zac11
Copy link
Author

zac11 commented May 5, 2020

I'm still getting the same error as before after adding the command mentioned.

Landing on the Dashboard

[761:0504/172331.870341:FATAL:memory.cc(22)] Out of memory. size=96002048

We detected that the Chromium Renderer process just crashed.

I have added this in the cypress/plugins/index.js -->

module.exports = (on, config) => {
  on('before:browser:launch', (browser = {}, launchOptions) => {
    if (browser.family === 'chromium' && browser.name !== 'electron') {
      launchOptions.args.push('--disable-dev-shm-usage')
    }

    return launchOptions
  })
  // `on` is used to hook into various events Cypress emits
  // `config` is the resolved Cypress config
}

If I change the browser to Chrome in the cypress run command to
cypress run --headless --browser chrome --spec cypress/integration/cinema/*.js

Then I am able to see that the above error is not happening and the tests are run in the Jenkins pipeline.

@moncapitaine
Copy link

Worked for me. I guess this one can be closed?

@jennifer-shehane
Copy link
Member

Closing as resolved.

If you're experiencing a bug similar to this in Cypress, please open a new issue with a fully reproducible example that we can run. There may be a specific edge case with the issue that we need more detail to fix.

@jennifer-shehane jennifer-shehane removed the stage: awaiting response Potential fix was proposed; awaiting response label Aug 21, 2020
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

3 participants