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

V8 process OOM (Oilpan: Reserving memory.) and Chromium Renderer process just crashed #30054

Open
Autobots631 opened this issue Aug 19, 2024 · 9 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@Autobots631
Copy link

Test code to reproduce

  • Total spec 200+
  • After 80th spec few spec started failing

Cypress Mode

cypress run

Cypress Version

12.9.0

Browser Version

Chrome 107

Node version

v14.18.3

Operating System

ubuntu 20.04

Memory Debug Logs

<--- Last few GCs --->
[1333187:0x1570003e8000]   445088 ms: Scavenge 136.4 (160.0) -> 135.8 (160.0) MB, 1.9 / 0.0 ms  (average mu = 0.987, current mu = 0.985) allocation failure; 
[1333187:0x1570003e8000]   445105 ms: Scavenge 136.6 (160.0) -> 136.0 (160.0) MB, 1.9 / 0.0 ms  (average mu = 0.987, current mu = 0.985) allocation failure; 
[1333187:0x1570003e8000]   446837 ms: Scavenge 136.7 (160.0) -> 136.2 (160.0) MB, 2.1 / 0.0 ms  (average mu = 0.987, current mu = 0.985) allocation failure; 
<--- JS stacktrace --->
[1333187:0816/144406.986275:ERROR:v8_initializer.cc(730)] V8 process OOM (Oilpan: Reserving memory.).
We detected that the Chromium Renderer process just crashed.
This is the equivalent to seeing the 'sad face' when Chrome dies.
This can happen for a number of different reasons:
- You wrote an endless loop and you must fix your own code
- You are running Docker (there is an easy fix for this: see link below)
- You are running lots of tests on a memory intense application.
    - Try enabling experimentalMemoryManagement in your config file.
    - Try lowering numTestsKeptInMemory in your config file.
- You are running in a memory starved VM environment.
    - Try enabling experimentalMemoryManagement in your config file.
    - Try lowering numTestsKeptInMemory in your config file.
- There are problems with your GPU / GPU drivers
- There are browser bugs in Chromium
You can learn more including how to fix Docker here:
https://on.cypress.io/renderer-process-crashed

Other

experimentalMemoryManagement : true
numTestsKeptInMemory : 0
testisolation : false
--disable-dev-shm-usage for chrome

on('before:browser:launch', (browser = {}, launchOptions) => {
  if (browser.family === 'chrome' && browser.name !== 'electron')  {
    launchOptions.args = launchOptions.args.filter(arg => arg !== '--disable-dev-shm-usage')
  // launchOptions.args.push('--shm-size=1G') // maybe increase the shared memory size instead

    return launchOptions
  }
})

I have tried all these but still facing same issue

@MikeMcC399
Copy link
Contributor

@Autobots631

It may not help, but you should at least be running on a supported version of Node.js, which means a minimum of 18.x.

@jennifer-shehane
Copy link
Member

@Autobots631 Please also update to the latest version of Cypress.

@jennifer-shehane jennifer-shehane added the stage: awaiting response Potential fix was proposed; awaiting response label Aug 19, 2024
@Autobots631
Copy link
Author

@MikeMcC399
I have retested with below configure but still am facing same issue .
Cypress: 12.9.0
Browser: Chrome 102 (headless)
Node Version: v20.17.0 (/usr/bin/node)
experimentalMemoryManagement=true
numTestsKeptInMemory: 1

@MikeMcC399
Copy link
Contributor

@Autobots631

Cypress 12.9.0 is not the latest version.
The latest version is 13.14.2, which @jennifer-shehane asked you to update to.

You can find the latest version of Cypress on https://on.cypress.io/changelog or if you execute

npm show cypress version

@Autobots631
Copy link
Author

I tried again on different VM with below configuration and found same issue
Cypress: 13.14.2
Browser: Chrome 102 (headless)
Node Version: v18.17.1 (/usr/bin/node)

I have tried Chrome 126 as well but same issue

@ohlori
Copy link

ohlori commented Oct 2, 2024

Any updates on this?

@natalyayyad
Copy link

natalyayyad commented Oct 7, 2024

Hello,
I have encountered this issue when attempting to validate each row in a table with 15+ rows

@jennifer-shehane jennifer-shehane added stage: needs investigating Someone from Cypress needs to look at this and removed stage: awaiting response Potential fix was proposed; awaiting response labels Oct 7, 2024
@Autobots631
Copy link
Author

I’m still experiencing the issue, but after cleaning up and removing stale processes in Jenkins, we were able to reduce it somewhat.

@shlomi-lr
Copy link

shlomi-lr commented Oct 15, 2024

I have experienced the same on all versions including latest 13.15.0 (Mac M2, Sonoma 14.6.1, node v20.12.1).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

6 participants