module-federation / reunited

Module federation and unit tests
MIT License
34 stars 4 forks source link

yarn test | yarn jest run into a memory leak #18

Open mgrub1 opened 2 years ago

mgrub1 commented 2 years ago

Hello!

when running the bundled test, node runs into a memory leak:

RUNS test/bundle.test.js

<--- Last few GCs --->

[6460:0x4d751c0] 63838 ms: Scavenge 4034.0 (4126.6) -> 4027.4 (4126.4) MB, 8.8 / 0.0 ms (average mu = 0.249, current mu = 0.162) allocation failure [6460:0x4d751c0] 63874 ms: Scavenge 4036.8 (4129.4) -> 4030.5 (4130.5) MB, 26.0 / 0.0 ms (average mu = 0.249, current mu = 0.162) allocation failure [6460:0x4d751c0] 64866 ms: Scavenge 4039.3 (4132.0) -> 4032.3 (4148.1) MB, 987.2 / 0.0 ms (average mu = 0.249, current mu = 0.162) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory 1: 0xb23a90 node::Abort() [/home//.nvm/versions/node/v17.1.0/bin/node] 2: 0xa3823c node::FatalError(char const, char const) [/home//.nvm/versions/node/v17.1.0/bin/node] 3: 0xd142be v8::Utils::ReportOOMFailure(v8::internal::Isolate, char const, bool) [/home//.nvm/versions/node/v17.1.0/bin/node] 4: 0xd14637 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate, char const, bool) [/home//.nvm/versions/node/v17.1.0/bin/node] 5: 0xecc515 [/home//.nvm/versions/node/v17.1.0/bin/node] 6: 0xedda4d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/home//.nvm/versions/node/v17.1.0/bin/node] 7: 0xee077e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/home//.nvm/versions/node/v17.1.0/bin/node] 8: 0xea1d6a v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/home//.nvm/versions/node/v17.1.0/bin/node] 9: 0x121f2c8 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long, v8::internal::Isolate) [/home//.nvm/versions/node/v17.1.0/bin/node] 10: 0x16137f9 [/home//.nvm/versions/node/v17.1.0/bin/node]

Does anyone know why that's the case?