invictus-codes / nuxt-vuetify

Add Vuetify 3 to your Nuxt application in seconds.
MIT License
73 stars 9 forks source link

[Bug]: Module cases "JavaScript heap out of memory" #4

Closed alucarddelta closed 1 year ago

alucarddelta commented 1 year ago

Contact Details

dreyer.brent@gmail.com

What happened?

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.

Version

nuxt-vuetify 0.2.18 yarn 1.22.19 node v18.16.0

What browsers are you seeing the problem on?

Terminal

Relevant log output

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


### Additional context

_No response_
jvhellemondt commented 1 year ago

Is this issue stil present in v0.2.20?

alucarddelta commented 1 year ago

v0.2.20 does appear to have resolved it...

I was able to confirm this by going back and forth between versions (0.2.18, 0.2.20) trying to trigger the error.. 0.2.18 would constantly trigger, where 0.2.20 did not.