nuxt-community / vuetify-module

Vuetify Module for Nuxt 2
Other
628 stars 106 forks source link

Module cases "JavaScript heap out of memory" #519

Closed alucarddelta closed 1 year ago

alucarddelta commented 1 year ago

Module version 0.2.18

Describe the bug Module causes out of heap memory when doing a yarn install on a clean repo with the package lock set up, And when adding new packages after the module is installed eg, yarn add vue-json-csv.

Increasing the heap allocation with export NODE_OPTIONS=--max-old-space-size=8192 has no effect

Once after the module is removed does yarn install and yarn add <package> works again.

To Reproduce

Steps to reproduce the behavior: (Creating repos will edit once compelte)

Expected behavior Install completes with out issue

Additional context

From clean image

❯ yarn install
yarn install v1.22.19
[1/4] Resolving packages...
⡀ vuetify@^3.1.12
<--- Last few GCs --->

[594:0x631e410]    90854 ms: Mark-sweep 3937.2 (4143.5) -> 3936.6 (4143.3) MB, 643.8 / 0.0 ms  (average mu = 0.086, current mu = 0.006) allocation failure; scavenge might not succeed
[594:0x631e410]    91719 ms: Mark-sweep 3937.4 (4143.8) -> 3937.1 (4143.8) MB, 862.8 / 0.0 ms  (average mu = 0.044, current mu = 0.003) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb7a940 node::Abort() [node]
 2: 0xa8e823  [node]
 3: 0xd5c940 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xd5cce7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xf3a3e5  [node]
 6: 0xf3b2e8 v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [node]
 7: 0xf4b7f3  [node]
 8: 0xf4c668 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 9: 0xf26fce v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
10: 0xf28397 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
11: 0xf088e0 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
12: 0xeffeac v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
13: 0xf00025 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [node]
14: 0xf13db5 v8::internal::Factory::NewJSArrayStorage(v8::internal::ElementsKind, int, v8::internal::ArrayStorageAllocationMode) [node]
15: 0xf13ebe v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::ArrayStorageAllocationMode, v8::internal::AllocationType) [node]
16: 0x10e8201 v8::internal::ElementsAccessor::Concat(v8::internal::Isolate*, v8::internal::BuiltinArguments*, unsigned int, unsigned int) [node]
17: 0xdbcfd0  [node]
18: 0xdc6084 v8::internal::Builtin_ArrayConcat(int, unsigned long*, v8::internal::Isolate*) [node]
19: 0x16fb7b9  [node]
[1]    594 IOT instruction  yarn install

Installing a new package after installed

 yarn add vue-json-csv
yarn add v1.22.19
[1/4] Resolving packages...
⠂ vuetify@^3.1.12
<--- Last few GCs --->

[694:0x562b500]   227653 ms: Mark-sweep 3936.7 (4143.8) -> 3936.5 (4143.8) MB, 495.4 / 0.0 ms  (average mu = 0.171, current mu = 0.004) allocation failure; scavenge might not succeed
[694:0x562b500]   228204 ms: Mark-sweep 3936.9 (4144.0) -> 3936.7 (4144.0) MB, 549.4 / 0.0 ms  (average mu = 0.096, current mu = 0.003) allocation failure; scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb7a940 node::Abort() [node]
 2: 0xa8e823  [node]
 3: 0xd5c940 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xd5cce7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xf3a3e5  [node]
 6: 0xf4c8cd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xf26fce v8::internal::HeapAllocator::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 8: 0xf28397 v8::internal::HeapAllocator::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [node]
 9: 0xf088e0 v8::internal::Factory::AllocateRaw(int, v8::internal::AllocationType, v8::internal::AllocationAlignment) [node]
10: 0xeffeac v8::internal::FactoryBase<v8::internal::Factory>::AllocateRawArray(int, v8::internal::AllocationType) [node]
11: 0xf00025 v8::internal::FactoryBase<v8::internal::Factory>::NewFixedArrayWithFiller(v8::internal::Handle<v8::internal::Map>, int, v8::internal::Handle<v8::internal::Oddball>, v8::internal::AllocationType) [node]
12: 0xf13db5 v8::internal::Factory::NewJSArrayStorage(v8::internal::ElementsKind, int, v8::internal::ArrayStorageAllocationMode) [node]
13: 0xf13ebe v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::ArrayStorageAllocationMode, v8::internal::AllocationType) [node]
14: 0x10e8201 v8::internal::ElementsAccessor::Concat(v8::internal::Isolate*, v8::internal::BuiltinArguments*, unsigned int, unsigned int) [node]
15: 0xdbcfd0  [node]
16: 0xdc6084 v8::internal::Builtin_ArrayConcat(int, unsigned long*, v8::internal::Isolate*) [node]
17: 0x16fb7b9  [node]
[1]    694 IOT instruction  yarn add vue-json-csv