8000 JavaScript heap out of memory in v15.0.0. · Issue #1263 · istanbuljs/nyc · GitHub
[go: up one dir, main page]

Skip to content
JavaScript heap out of memory in v15.0.0. #1263
@josephzidell

Description

@josephzidell

In v15.0.0, JS runs out of memory on a relatively small project while running nyc in a docker container. In v14.1.1 it all worked fine.

Link to bug demonstration repository

This is a sensitive project and with private source control

Expected Behavior

Coverage shows

Observed Behavior

Javascript has a heap overflow

test-frontend |
test-frontend |   [] 100% (completed)
test-frontend |
test-frontend |  WEBPACK  Compiled successfully in 32137ms
test-frontend |
test-frontend |  MOCHA  Testing...
test-frontend |
test-frontend |
test-frontend | <--- Last few GCs --->
test-frontend |
test-frontend | [50:0x3172330]   138018 ms: Mark-sweep 1473.6 (1500.4) -> 1469.9 (1500.4) MB, 1653.7 / 0.1 ms  (average mu = 0.133, current mu = 0.003) allocation failure scavenge might not succeed
test-frontend | [50:0x3172330]   140149 ms: Mark-sweep 1474.3 (1500.9) -> 1470.5 (1500.9) MB, 1958.3 / 0.0 ms  (average mu = 0.107, current mu = 0.081) allocation failure scavenge might not succeed
test-frontend |
test-frontend |
test-frontend | <--- JS stacktrace --->
test-frontend |
test-frontend | ==== JS stack trace =========================================
test-frontend |
test-frontend |     0: ExitFrame [pc: 0x1374fd9]
test-frontend | Security context: 0x2a0f1cf008a1 <JSObject>
test-frontend |     1: SourceMapConsumer_allGeneratedPositionsFor [0x39a4144ed0d9] [/usr/src/app/node_modules/source-map/lib/source-map-consumer.js:~178] [pc=0x35a2ce60f67b](this=0x03f2718c0111 <BasicSourceMapConsumer map =
0x149ab65e7761>,0x2352fe700259 <Object map = 0x2d594ef7fbd1>)
test-frontend |     2: /* anonymous */(aka /* anonymous */) [0x24b0c0b9a129] [/usr/src/app/node_modules/@babel/...
test-frontend |
test-frontend | FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
test-frontend |
test-frontend | Writing Node.js report to file: report.20200102.194151.50.0.001.json
test-frontend | Node.js report completed
test-frontend |  1: 0x9da7c0 node::Abort() [node]
test-frontend |  2: 0x9db976 node::OnFatalError(char const*, char const*) [node]
test-frontend |  3: 0xb39f1e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
test-frontend |  4: 0xb3a299 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
test-frontend |  5: 0xce5635  [node]
test-frontend |  6: 0xce5cc6 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
test-frontend |  7: 0xcf1b5a v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [node]
test-frontend |  8: 0xcf2a65 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
test-frontend |  9: 0xcf5478 v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
test-frontend | 10: 0xcbbda7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType) [node]
test-frontend | 11: 0xff1e0b v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [node]
test-frontend | 12: 0x1374fd9  [node]
test-frontend |  ERROR  mochapack exited with code null.
test-frontend | ----------|---------|----------|---------|---------|-------------------
test-frontend | File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
test-frontend | ----------|---------|----------|---------|---------|-------------------
test-frontend | All files |       0 |        0 |       0 |       0 |                  
test-frontend | ----------|---------|----------|---------|---------|-------------------
test-frontend | npm ERR! code ELIFECYCLE
test-frontend | npm ERR! errno 1
test-frontend | npm ERR! frontend@0.1.0 test:unit:coverage: `nyc vue-cli-service test:unit`
test-frontend | npm ERR! Exit status 1
test-frontend | npm ERR!
test-frontend | npm ERR! Failed at the frontend@0.1.0 test:unit:coverage script.
test-frontend | npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
test-frontend |
test-frontend | npm ERR! A complete log of this run can be found in:
test-frontend | npm ERR!     /root/.npm/_logs/2020-01-02T19_41_51_661Z-debug.log
test-frontend | test-frontend exited with code 1
Aborting on container exit...
make: *** [test-unit] Error 1

Troubleshooting steps

Environment Information

Using wepback + Vue.js

# paste the output here

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0