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

SIGABRT exit a the end of CI run #5965

Closed
znarf opened this issue Dec 16, 2019 · 50 comments
Closed

SIGABRT exit a the end of CI run #5965

znarf opened this issue Dec 16, 2019 · 50 comments
Labels
topic: SIG errors Program error signals, ie SIGILL, SIGSEGV, SIGBUS, SIGABRT type: duplicate This issue or pull request already exists

Comments

@znarf
Copy link

znarf commented Dec 16, 2019

Cypress is randomly crashing at the end of normally successful runs.

In Cypress 3.7:

/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress[13137]: ../../third_party/electron_node/src/node_platform.cc:435:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
 1: 0x564e854d6d85 node::Abort() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 2: 0x564e854d664f  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 3: 0x564e8552249b  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 4: 0x564e81ab798c  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 5: 0x564e81b04835 v8::internal::PagedSpace::RefillLinearAllocationAreaFromFreeList(unsigned long) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 6: 0x564e81b0763c v8::internal::PagedSpace::RawSlowRefillLinearAllocationArea(int) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 7: 0x564e81b075c9 v8::internal::PagedSpace::SlowRefillLinearAllocationArea(int) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 8: 0x564e816bd913  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
 9: 0x564e81a9882a v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::PretenureFlag) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
10: 0x564e8181c406  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
11: 0x564e8181c262  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
12: 0x564e819aae42  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
13: 0x564e819a13b0  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
14: 0x564e819a12c4  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
15: 0x564e8180d4a8 v8::internal::Compiler::FinalizeOptimizedCompilationJob(v8::internal::OptimizedCompilationJob*, v8::internal::Isolate*) [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
16: 0x564e8180d0eb v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
17: 0x564e81a7678f v8::internal::StackGuard::HandleInterrupts() [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
18: 0x564e81ca2566  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
19: 0x564e81fabfab  [/home/runner/.cache/Cypress/3.7.0/Cypress/Cypress]
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

In Cypress 3.8:

/home/runner/.cache/Cypress/3.8.0/Cypress/Cypress[7074]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Versions

  • Cypress 3.7, Cypress 3.8
  • Reproduced in GitHub Actions and CircleCI
@znarf znarf changed the title Randomly crashing a the end of GitHub Actions run Randomly crashing a the end of CI run Dec 16, 2019
@jennifer-shehane
Copy link
Member

We've never seen a SIGABRT error before in Cypress.

Could you run Cypress in debug mode mode and print the entire set of logs here?

@znarf
Copy link
Author

znarf commented Dec 17, 2019

Thank you, it's really happening a lot on our side. I'm gonna try the DEBUG mode and also check if there is a difference between node 12.x and node 13.x.

@znarf
Copy link
Author

znarf commented Dec 17, 2019

node 13.x doesn't make a difference

DEBUG=cypress:* is making some of our tests failing, so we can't reproduce the issue with it, all tests needs to pass for the issue to happen.

DEBUG=cypress:cli is not helping much:

2019-12-17T10:31:01.7270128Z /home/runner/.cache/Cypress/3.8.0/Cypress/Cypress[7683]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
2019-12-17T10:31:02.0300655Z 2019-12-17T10:31:02.029Z cypress:cli child event fired { event: 'exit', code: null, signal: 'SIGABRT' }
2019-12-17T10:31:02.0304727Z 2019-12-17T10:31:02.030Z cypress:cli child event fired { event: 'close', code: null, signal: 'SIGABRT' }
2019-12-17T10:31:02.0341279Z 2019-12-17T10:31:02.033Z cypress:cli Stopping Xvfb
2019-12-17T10:31:02.0664786Z The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Given the error, do you have a more specific DEBUG prefix to suggest?

@tomatobrown
Copy link

The same exact issue started happeneing for me today also. I'm also using CircleCI and running with electron

@znarf

This comment has been minimized.

@flotwig
Copy link
Contributor

flotwig commented Dec 18, 2019

I believe @bahmutov ran into a SIGABRT in macOS Catalina during debugging, but he got past it somehow. This is happening in Linux right?

@tomatobrown
Copy link

tomatobrown commented Dec 18, 2019 via email

@znarf
Copy link
Author

znarf commented Dec 18, 2019

It used to work fine in Cypress 3.7 for weeks but it's currently also happening when downgrading to Cypress 3.7 (the error message is slightly different). On our side, the first occurrences of SIGABRT errors were seen 6 days ago.

I tried to downgrade Node and Ubuntu without success.

@znarf znarf changed the title Randomly crashing a the end of CI run SIGABRT exit a the end of CI run Dec 19, 2019
@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label Dec 19, 2019
@baconjulie
Copy link

baconjulie commented Dec 20, 2019

We are experiencing this same issue consistently as of today 11am EST. There is very little information provided and all tests appear to pass, the failure at the very end of the build. @jennifer-shehane any update?

Versions

Cypress: 3.8.0
Reproduced in CircleCI

Error

The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Ubuntu Linux - 14.04)
Cypress Version: 3.8.0

@jennifer-shehane
Copy link
Member

We'll really need more information. Ideally tracking down exactly what changed that is causing this error. Are you all using CircleCI Server? Did you upgrade by chance?

The fact that downgrading to 3.7 does not resolve the issue leads me to believe there's another factor involved.

@tomatobrown
Copy link

@jennifer-shehane thanks for being so responsive, unfortunately I don't have much more info. Looks like we are all using CircleCI. I'm using the base 'machine' image that Circle maintains, maybe circle changed that image? I'll try defining it to something like ubuntu-1604:201903-01 and let you know.

Currently I'm just using..
int: machine: docker_layer_caching: true shell: /bin/bash working_directory: ~/app

It was working for weeks and then stopped with this SIGABRT error

I'll try defining the image

@tomatobrown
Copy link

@jennifer-shehane when setting the image to ubuntu-1604:201903-01 I've been unable to duplicate the SIGABRT error. I'll get it merged and hence trigger more executions with it, I'll post an update after more runs have occurred.

@TheRusskiy
Copy link

TheRusskiy commented Jan 15, 2020

The same issue is happening to us after upgrading from Cypress 3.4.1 to 3.8.2.
Cypress: 3.8.2
Browser: Electron 78 (headless)
Node Version: v12.13.1
Ubuntu 18.10

Happens on older node versions as well.

Docker container inside Google cloud.

@znarf
Copy link
Author

znarf commented Jan 15, 2020

@TheRusskiy which docker image are you using? A cypress one or a custom one, if using a custom do you have the extra apt packages installed?

On our side, we're not seeing the errors anymore since we made this change opencollective/opencollective-api@1fd1f94#diff-8e9db7c3471e6c0ca16bd70456b7fffcR50 Not sure if it's a coincidence or not but worth checking.

@TheRusskiy
Copy link

@znarf custom one based on ubuntu:18.10,
it has cypress deps installed (at least they were enough on older cypress versions).

@guyisra
Copy link

guyisra commented Jan 15, 2020

I had the same issue, was solved by using cypress/browsers:node11.13.0-chrome73

@znarf
Copy link
Author

znarf commented Jan 15, 2020

@TheRusskiy can you double check a recent dependency list and/or try switching to a cypress image?

@TheRusskiy
Copy link

@znarf, indeed, there were a couple of packages missing,
but unfortunately, it still fails sometimes (3 out of 10).
I haven't installed Chinese fonts though, hope it's not critical.

@TheRusskiy
Copy link

I ran our test suite 20 times using Chrome instead of Electron and it seems to be working, so it looks like an Electron issue.

@AlexSwtlsk
Copy link

AlexSwtlsk commented Jan 27, 2020

Hi, i'm still having this issue.
I've changed my docker image version from cypress/browsers:node12.8.1-chrome78-ff70 to cypress/browsers:node12.14.0-chrome79-ff71 and cypress from 3.8.1 to 3.8.2.

@TheRusskiy how did you manage to drop the error ?

The output error

     ✔  All specs passed!                        00:26        2        2        -        -        -  
 /builds/dejbox/e2e/cache/Cypress/3.8.2/Cypress/Cypress --no-sandbox -- --run-project /builds/dejbox/e2e --cwd /builds/dejbox/e2e[92]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
 The Test Runner unexpectedly exited via a exit event with signal SIGABRT
 Please search Cypress documentation for possible solutions:
 https://on.cypress.io
 Check if there is a GitHub issue describing this crash:
 https://github.com/cypress-io/cypress/issues
 Consider opening a new issue.

E2E tests are integrated in each merge request from back & middle & front stacks. Having this issue blocks everything :)

@TheRusskiy
Copy link

@AlexSwtlsk I ended up using headless chrome instead of Electron.

pierrebeitz added a commit to dcos/dcos-ui that referenced this issue Feb 4, 2020
@jennifer-shehane
Copy link
Member

SIGABRT error codes generally happen when there are out-of-memory conditions. This seems related to something within Electron.

Current Workaround

Run cypress run using the --browser flag to run in an installed version of a Chrome or Firefox browser (not Electron). https://on.cypress.io/command-line#cypress-run-browser-lt-browser-name-or-path-gt

@muhroots
Copy link

muhroots commented Mar 27, 2020

SIGABRT error codes generally happen when there are out-of-memory conditions. This seems related to something within Electron.

Current Workaround

Run cypress run using the --browser flag to run in an installed version of a Chrome or Firefox browser (not Electron). https://on.cypress.io/command-line#cypress-run-browser-lt-browser-name-or-path-gt

it worked here (cypress run --browser chrome). I'm using github actions.
thank you <3

@eladcandroid
Copy link

@jennifer-shehane Can you check if bumping up the Electron deps versions fixes this issue?

@melibe23
Copy link

melibe23 commented Apr 5, 2020

Same issue here using headleass
The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Platform: darwin (19.2.0)
Cypress Version: 4.3.0

@barnabas-szekeres
Copy link

barnabas-szekeres commented Apr 25, 2020

The issue came up right after when we upgrade from 4.1 to 4.2 and only when we run test via Electron.

The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: darwin (19.4.0)
Cypress Version: 4.2.0

Maybe the issue connected to the updated Electron deps what's mentioned by @eladcandroid also! :)

@daraclare
Copy link

I have a very similar issue after upgrading from 3.8 to 4.5, my runs always fail, but on different tests each time, with the error "The Test Runner unexpectedly exited via a exit event with signal SIGSEGV"

@barnabas-szekeres
Copy link

barnabas-szekeres commented Apr 30, 2020

The latest release (4.5) contains Electron deps update which solved the issue for us.

Ps.: Our test coverage currently very small so maybe the problem exist yet.

@laiscoolblue
Copy link
Contributor

We are having the same issue, updating to version 4.5 did not fix it.

@skyred
Copy link

skyred commented Jun 17, 2020

4.8.0 has this problem on hello world type of test, here is how to reproduce it:

On Linux,

  1. make an empty folder temp
  2. cd temp
  3. docker run -it --rm --privileged -v $PWD:/e2e -v /tmp/.X11-unix:/tmp/.X11-unix -w /e2e -e DISPLAY=unix$DISPLAY --entrypoint cypress cypress/included:4.8.0 open --project .
  4. cypress will fill the folder with example tests, click any of them, you will see Chrome or Electron crashing with the same error code.

@oneumyvakin
Copy link

We have got this error

../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.

The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Is it possible that this issue caused by lack of resources like free memory?

@zenefits-brody
Copy link

Sharing my error message here and will try the workaround posted above by Jennifer.

    ✔  All specs passed!                        00:09        1        1        -        -        -  

/root/.cache/Cypress/4.1.0/Cypress/Cypress[5055]: ../../third_party/electron_node/src/node_platform.cc:444:std::shared_ptr<PerIsolatePlatformData> node::NodePlatform::ForIsolate(v8::Isolate *): Assertion `data' failed.
The Test Runner unexpectedly exited via a exit event with signal SIGABRT

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Ubuntu Linux - 18.04)
Cypress Version: 4.1.0
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

exited with code 1

@jarretmoses
Copy link

jarretmoses commented Oct 22, 2020

Since this is still open Ill post my specs too. I just started running into this issue using the Cypress Github action. The workaround above mentions its potentially due to memory issues in electron and to use chrome but I am already using chrome


[6117:0x72400000000]   298749 ms: Mark-sweep (reduce) 2046.8 (2050.9) -> 2046.0 (2054.2) MB, 2607.8 / 0.0 ms  (average mu = 0.083, current mu = 0.010) allocation failure scavenge might not succeed
[6117:0x72400000000]   301384 ms: Mark-sweep (reduce) 2047.0 (2051.2) -> 2046.3 (2052.4) MB, 2627.8 / 0.0 ms  (+ 0.0 ms in 16 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 2635 ms) (average mu = 0.044, current mu = 0.0

<--- JS stacktrace --->

Error: The Test Runner unexpectedly exited via a exit event with signal SIGSEGV
Error: The Test Runner unexpectedly exited via a exit event with signal SIGSEGV

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Ubuntu - 16.04)
Cypress Version: 5.4.0
    at /home/runner/work/web/web/node_modules/cypress/lib/errors.js:346:15
    at tryCatcher (/home/runner/work/web/web/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:547:31)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18)
    at Promise._settlePromise0 (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:649:10)
    at Promise._settlePromises (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:729:18)
    at Promise._fulfill (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:673:18)
    at Promise._resolveCallback (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:466:57)
    at Promise._settlePromiseFromHandler (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:559:17)
    at Promise._settlePromise (/home/runner/work/web/web/node_modules/bluebird/js/release/promise.js:604:18) {
  known: true
}```

@jennifer-shehane jennifer-shehane added the topic: SIG errors Program error signals, ie SIGILL, SIGSEGV, SIGBUS, SIGABRT label Nov 2, 2020
@lasanders
Copy link

lasanders commented Nov 2, 2020

This just started happening for us after upgrading to 5.5. I also tried passing the --browser flag with chrome, but didn't fix the issue. Any other workarounds for this?

    ✔  All specs passed!                        07:12      211      199        -       12        -  

/root/.cache/Cypress/5.5.0/Cypress/Cypress[609]: ../../third_party/electron_node/src/api/callback.cc:226:MaybeLocal<v8::Value> node::MakeCallback(v8::Isolate *, Local<v8::Object>, Local<v8::Function>, int, Local<v8::Value> *, node::async_context): Assertion `(env) != nullptr' failed.
The Test Runner unexpectedly exited via a close event with signal SIGABRT

Please search Cypress documentation for possible solutions:

https://on.cypress.io

Check if there is a GitHub issue describing this crash:

https://github.com/cypress-io/cypress/issues

Consider opening a new issue.

----------

Platform: linux (Amazon Linux - 2 (Karoo))
Cypress Version: 5.5.0
error Command failed with exit code 1.

Exited with code exit status 1
CircleCI received exit code 1

@ikornienko
Copy link

We see exactly the same error as @lasanders above, and also after an attempt of upgrading to 5.5.0.

@dudeNumber4
Copy link

Upgraded to cypress 6.0.1, using Gitlab 13.5.1-ee. Still happens.

@ray1618
Copy link

ray1618 commented Dec 9, 2020

Same issue after upgrading to Cypress 6.1.0
The Test Runner unexpectedly exited via a close event with signal SIGABRT

Running on a azure build pipeline (ubuntu latest) it throws this error after successfully finishing all specs.

Seems to depend on the tests that are running, because some projects wil run fine after the update with the same Azure build setup.

Running it localy on my Window 10 doesn't give any errors
Rolling back to cypress 5.6.0 makes the error disapear.

System:
Node 10.23.0
Ubuntu Linux build agent on Azure

@jennifer-shehane
Copy link
Member

jennifer-shehane commented Dec 30, 2020

Going to close this as a duplicate of #8865 - which has some more updated logs. Some people there are indicating that the SIGABRT error with text "Assertion `(env) != nullptr' failed" began happening in Cypress 5.4.0. Please refer to that issue if you're still experiencing this issue.

If you're encountering a SIGSEGV error - this is not the same as SIGABRT. Search our issues for something related to SIGSEGV errors.

Duplicate of #8865

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: SIG errors Program error signals, ie SIGILL, SIGSEGV, SIGBUS, SIGABRT type: duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests