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

Unable to complete tests with runInBand -- Last few GCs #6751

Closed
damianthekreeeytor opened this issue Jul 25, 2018 · 6 comments
Closed

Unable to complete tests with runInBand -- Last few GCs #6751

damianthekreeeytor opened this issue Jul 25, 2018 · 6 comments

Comments

@damianthekreeeytor
Copy link

I am having issues getting my tests to complete especially on Travis-CI. When run with --runInBand locally here is what I am see in the terminal.

Any one running into these issues?

<--- Last few GCs --->

[35800:0x104002400]    48773 ms: Scavenge 1378.2 (1408.7) -> 1377.8 (1408.7) MB, 2.0 / 0.0 ms  (average mu = 0.298, current mu = 0.341) allocation failure 
[35800:0x104002400]    48784 ms: Scavenge 1378.6 (1408.7) -> 1378.1 (1409.2) MB, 2.1 / 0.0 ms  (average mu = 0.298, current mu = 0.341) allocation failure 
[35800:0x104002400]    48791 ms: Scavenge 1378.9 (1409.2) -> 1378.4 (1409.7) MB, 1.5 / 0.0 ms  (average mu = 0.298, current mu = 0.341) allocation failure 


<--- JS stacktrace --->

==== JS stack trace =========================================

    0: ExitFrame [pc: 0x33a63fa041bd]
    1: StubFrame [pc: 0x33a63fa98d35]
Security context: 0x481af29e6c9 <JSObject>
    2: Object.<anonymous> [0x481ad8bf7c1] [/Users/Damian/Code/strength-server/node_modules/babel-types/lib/definitions/es2015.js:120] [bytecode=0x48185442071 offset=1368](this=0x481ad8bf041 <Object map = 0x481c73823b9>,module=0x481ad8bf079 <Object map = 0x4819e2b7579>,exports=0x481ad8bf041 <Object map = 0x481c73823b9>,req...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x100037ddb node::Abort() [/usr/local/bin/node]
 2: 0x100037f65 node::OnFatalError(char const*, char const*) [/usr/local/bin/node]
 3: 0x10018274b v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 4: 0x1001826ed v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
 5: 0x10045b3fe v8::internal::Heap::UpdateSurvivalStatistics(int) [/usr/local/bin/node]
 6: 0x10045d0a1 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/usr/local/bin/node]
 7: 0x10045a763 v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]
 8: 0x1004596b4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
 9: 0x1004618b3 v8::internal::Heap::AllocateRawWithRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/usr/local/bin/node]
10: 0x10043f2f6 v8::internal::Factory::AllocateRawWithAllocationSite(v8::internal::Handle<v8::internal::Map>, v8::internal::PretenureFlag, v8::internal::Handle<v8::internal::AllocationSite>) [/usr/local/bin/node]
11: 0x1004430f4 v8::internal::Factory::NewJSObjectFromMap(v8::internal::Handle<v8::internal::Map>, v8::internal::PretenureFlag, v8::internal::Handle<v8::internal::AllocationSite>) [/usr/local/bin/node]
12: 0x100640086 v8::internal::(anonymous namespace)::ObjectBoilerplate::Create(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, int, v8::internal::PretenureFlag) [/usr/local/bin/node]
13: 0x10063e35f v8::internal::Runtime_CreateObjectLiteral(int, v8::internal::Object**, v8::internal::Isolate*) [/usr/local/bin/node]
14: 0x33a63fa041bd 
15: 0x33a63fa98d35 
16: 0x33a63fa13a09 
[1]    35799 abort      npm test -- --runInBand --logHeapUsage

Here is a look at my package.json

"dependencies": {
    "apollo-server": "^2.0.0",
    "apollo-server-express": "^2.0.0",
    "bcrypt": "^3.0.0",
    "body-parser": "^1.18.3",
    "chalk": "^2.4.1",
    "cli-progress": "^2.0.0",
    "dotenv": "^4.0.0",
    "express": "^4.16.3",
    "express-jwt": "^5.3.1",
    "graphql": "^0.13.2",
    "graphql-tag": "^2.9.2",
    "graphql-tools": "^2.24.0",
    "jsonwebtoken": "^8.3.0",
    "lodash": "^4.17.10",
    "merge-graphql-schemas": "^1.5.3",
    "mongodb": "^3.1.1",
    "p-iteration": "^1.1.7",
    "ramda": "^0.25.0"
  },
  "devDependencies": {
    "@babel/cli": "^7.0.0-beta.54",
    "@babel/core": "^7.0.0-beta.54",
    "@babel/node": "^7.0.0-beta.54",
    "@babel/preset-env": "^7.0.0-beta.54",
    "@babel/preset-flow": "^7.0.0-beta.54",
    "ajv": "^6.5.2",
    "babel-core": "^7.0.0-bridge.0",
    "babel-eslint": "^9.0.0-beta.3",
    "babel-jest": "^23.4.0",
    "babel-plugin-module-resolver": "^3.1.1",
    "casual": "^1.5.19",
    "del": "^3.0.0",
    "eslint": "^5.2.0",
    "eslint-config-prettier": "^2.9.0",
    "eslint-config-standard": "^12.0.0-alpha.0",
    "eslint-import-resolver-babel-module": "^5.0.0-beta.0",
    "eslint-plugin-flowtype": "^2.50.0",
    "eslint-plugin-import": "^2.13.0",
    "eslint-plugin-node": "^7.0.1",
    "eslint-plugin-prettier": "^2.6.2",
    "eslint-plugin-promise": "^3.8.0",
    "eslint-plugin-standard": "^3.1.0",
    "flow-bin": "^0.77.0",
    "gulp": "^4.0.0",
    "gulp-babel": "^8.0.0-beta.2",
    "gulp-cli": "^2.0.1",
    "husky": "^1.0.0-rc.13",
    "jest": "^23.4.1",
    "jest-environment-node": "^23.4.0",
    "lint-staged": "^7.2.0",
    "mongodb-memory-server": "^1.9.1",
    "nodemon": "^1.18.3",
    "prettier": "^1.13.7",
    "regenerator-runtime": "^0.12.0",
    "superagent": "^4.0.0-alpha.1",
    "supertest": "^3.1.0",
    "weak": "^1.0.1"
  }
@sibelius
Copy link

this is happening to us using node 10

@imdpk
Copy link

imdpk commented Jul 26, 2018

To note my heap size is growing tremendously each test.

@thymikee
Copy link
Collaborator

A repro would be welcome, otherwise we're unable to help. Also try with --detectLeaks flag to try detecting what's holding the memory.

@damianthekreeeytor
Copy link
Author

This issue can be closed. I ended up adding more resource power to my Travis-CI build

@lifeiscontent
Copy link

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants