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

More than 10 spec files: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory #5614

Closed
LoaderB0T opened this issue Nov 6, 2019 · 1 comment

Comments

@LoaderB0T
Copy link

Hi

Current behavior:

When I execute "cypress run --browser chrome" with eleven .spec files in the integration folder I get this issue. As soon as I use less than 10 files it works again.
You can see the following log that I copied after the 10th test execution started.
Test 1 to 9 worked just fine.

Running:  PBI_49705.spec.ts                                              (10 of 11)
(node:25740) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 preprocessor:close listeners added. 
Use emitter.setMaxListeners() to increase limit
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 00007FF6246A07BF uv_open_osfhandle+479
2: 00007FF623419786 node::Abort+22
3: 00007FF623419DA3 node::Abort+1587
4: 00007FF6219E64F8 v8::RetainedObjectInfo::GetElementCount+808
5: 00007FF6219E6493 v8::RetainedObjectInfo::GetElementCount+707
6: 00007FF621A5F133 std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+255075
7: 00007FF621A5E05B std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+250763
8: 00007FF621A5B6BF std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+240111
9: 00007FF621A65409 std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+280377
10: 00007FF621A65A8E std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+282046
11: 00007FF621E2F067 std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+4252567
12: 00007FF6220120A9 std::_Vector_alloc<std::_Vec_base_types<v8::CpuProfileDeoptInfo,std::allocator<v8::CpuProfileDeoptInfo> 
> >::_Make_iterator+6231001
13: 00007FF62236AFAF v8::WasmStreaming::Unpack+2677935


 0 passing (1ms)


 (Results)

 ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Tests:        0                                                                                │
 │ Passing:      0                                                                                │
 │ Failing:      0                                                                                │
 │ Pending:      0                                                                                │
 │ Skipped:      0                                                                                │
 │ Screenshots:  0                                                                                │
 │ Video:        false                                                                            │
 │ Duration:     0 seconds                                                                        │
 │ Spec Ran:     PBI_49705.spec.ts                                                 │
 └────────────────────────────────────────────────────────────────────────────────────────────────┘


The following error was thrown by a plugin. We've stopped running your tests because a plugin crashed.

Error [ERR_IPC_CHANNEL_CLOSED] [ERR_IPC_CHANNEL_CLOSED]: Channel closed
   at ChildProcess.target.send (internal/child_process.js:651:16)
   at Object.send (C:\Users\Janik.Schumacher\AppData\Local\Cypress\Cache\3.6.0\Cypress\resources\app\packages\server\lib\plugins\util.js:34:27)
   at EventEmitter.<anonymous> (C:\Users\Janik.Schumacher\AppData\Local\Cypress\Cache\3.6.0\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:60:18)
   at EventEmitter.emit (events.js:199:15)
   at Object.removeFile (C:\Users\Janik.Schumacher\AppData\Local\Cypress\Cache\3.6.0\Cypress\resources\app\packages\server\lib\plugins\preprocessor.js:108:19)
   at Object.options.onBrowserClose (C:\Users\Janik.Schumacher\AppData\Local\Cypress\Cache\3.6.0\Cypress\resources\app\packages\server\lib\open_project.js:100:30)
   at ChildProcess.<anonymous> (C:\Users\Janik.Schumacher\AppData\Local\Cypress\Cache\3.6.0\Cypress\resources\app\packages\server\lib\browsers\index.js:141:21)
   at Object.onceWrapper (events.js:282:20)
   at ChildProcess.emit (events.js:199:15)
   at Process.ChildProcess._handle.onexit (internal/child_process.js:254:12)


────────────────────────────────────────────────────────────────────────────────────────────────────

 Running:  PBI_50389.spec.ts                                                (11 of 11)

Timed out waiting for the browser to connect. Retrying...

Timed out waiting for the browser to connect. Retrying again...

The browser never connected. Something is wrong. The tests cannot run. Aborting...

 (Results)

 ┌────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Tests:        0                                                                                │
 │ Passing:      0                                                                                │
 │ Failing:      1                                                                                │
 │ Pending:      0                                                                                │
 │ Skipped:      0                                                                                │
 │ Screenshots:  0                                                                                │
 │ Video:        false                                                                            │
 │ Duration:     0 seconds                                                                        │
 │ Spec Ran:     PBI_50389.spec.ts                                                   │
 └────────────────────────────────────────────────────────────────────────────────────────────────┘


====================================================================================================

 (Run Finished)

As you can see I also get the "expected" MaxListenersExceededWarning that was described harmless several times in different issues here on github, but in my case it is followed by that Fatal Error, that I could not find an issue about yet.

Desired behavior:

Well I would like to be able to run the tests with more than 10 Test files.
Running the tests one by one works without problems. Only using "yarn cypress run" crashes the test execution during the 10th test.

Steps to reproduce: (app code and test code)

I can not share my app code, but maybe I have time to find a simple example to reproduce this in the future.

Versions

Cypress 3.6.0 (With 3.4.0 and 3.5.0 the tests also fail, but I am not sure if the exception is the same)
Chrome 77
Windows 10 Enterprise x64 1903
Yarn 1.19.1

Cypress Config:

{
animationDistanceThreshold: 5,
baseUrl: null,
blacklistHosts: null,
chromeWebSecurity: true,
defaultCommandTimeout: 10000,
env: {},
execTimeout: 60000,
fileServerFolder: '',
fixturesFolder: 'cypress/fixtures',
hosts: null,
ignoreTestFiles: '*.hot-update.js',
integrationFolder: 'cypress/integration',
modifyObstructiveCode: true,
numTestsKeptInMemory: 50,
pageLoadTimeout: 60000,
pluginsFile: 'cypress/plugins',
port: null,
projectId: '158cvi',
reporter: 'mocha-multi-reporters',
reporterOptions: {
configFile: 'reporter-config.json'},
requestTimeout: 5000,
responseTimeout: 30000,
screenshotsFolder: 'cypress/screenshots',
supportFile: 'cypress/support',
taskTimeout: 60000,
testFiles: '**/*.*',
trashAssetsBeforeRuns: true,
userAgent: null,
video: false,
videoCompression: 32,
videoUploadOnPasses: true,
videosFolder: 'cypress/videos',
viewportHeight: 660,
viewportWidth: 1000,
waitForAnimations: true,
watchForFileChanges: true}
@LoaderB0T
Copy link
Author

Okay, I found a fix here

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