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

Build prod in ionic project results in heap out of memory #39

Closed
lpsantana opened this issue Aug 31, 2018 · 7 comments
Closed

Build prod in ionic project results in heap out of memory #39

lpsantana opened this issue Aug 31, 2018 · 7 comments

Comments

@lpsantana
Copy link

Guys, the new version of webpack-source 1.2.0 completely screw up my ionic project build!

[13:44:05] webpack started ...
[13:44:23] copy finished in 44.53 s

Fatal error in , line 0

API fatal error handler returned after process out of memory

==== C stack trace ===============================

ionic(v8::base::debug::StackTrace::StackTrace()+0x16) [0x15c8c36]
ionic() [0x1451857]
ionic(V8_Fatal+0xd8) [0x15c3998]
ionic(v8::internal::V8::FatalProcessOutOfMemory(char const*, bool)+0x1fc) [0xb9103c]
ionic(v8::internal::EvacuateNewSpaceVisitor::Visit(v8::internal::HeapObject*)+0x504) [0xfff764]
ionic(bool v8::internal::LiveObjectVisitor::VisitBlackObjects<v8::internal::EvacuateNewSpaceVisitor>(v8::internal::MemoryChunk*, v8::internal::MarkingState const&, v8::internal::EvacuateNewSpaceVisitor*, v8::internal::LiveObjectVisitor::IterationMode)+0x7b) [0x100149b]
ionic(v8::internal::FullEvacuator::RawEvacuatePage(v8::internal::Page*, long*)+0x490) [0x10021d0]
ionic(v8::internal::Evacuator::EvacuatePage(v8::internal::Page*)+0x51) [0xfeb1b1]
ionic(v8::internal::PageParallelJob<v8::internal::EvacuationJobTraits>::Task::RunInternal()+0xac) [0xfeb34c]
ionic(v8::internal::CancelableTask::Run()+0x36) [0xc75146]
ionic(v8::platform::WorkerThread::Run()+0x19) [0x1459149]
ionic() [0x15c9ce0]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba) [0x7fe3418c16ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d) [0x7fe3415f741d]

Only get fixed when I rolledback version to 1.1.0. But it was hard do find once that dependency is applied by the Uglify command. Others projects might be passing by the same problems

@alexander-akait
Copy link
Member

/cc @lpsantana problem still exists? If yes, please create minimum reproducible test repo, thanks!

@timbru31
Copy link

We are facing the same problem (I guess since @ngtools/webpack's commit: angular/angular-cli@b071d1c)

Exception:

<--- Last few GCs --->

[55076:0x104000000]   188129 ms: Scavenge 1339.6 (1422.0) -> 1339.1 (1423.0) MB, 5.6 / 0.0 ms  (average mu = 0.256, current mu = 0.201) allocation failure
[55076:0x104000000]   188147 ms: Scavenge 1339.9 (1423.0) -> 1339.4 (1423.5) MB, 6.9 / 0.0 ms  (average mu = 0.256, current mu = 0.201) allocation failure
[55076:0x104000000]   188162 ms: Scavenge 1340.1 (1423.5) -> 1339.6 (1424.5) MB, 6.0 / 0.0 ms  (average mu = 0.256, current mu = 0.201) allocation failure


<--- JS stacktrace --->

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

    0: ExitFrame [pc: 0x1495cf05be3d]
    1: StubFrame [pc: 0x1495cf00d40b]
    2: ConstructFrame [pc: 0x1495cf00cfa3]
    3: StubFrame [pc: 0x1495d19605fd]
Security context: 0x35667039e6e1 <JSObject>
    4: _replaceInStringNode [0x3566556b5841] [/Users/timbru/work/ume/door-to-door-webapp/node_modules/webpack-sources/lib/ReplaceSource.js:209] [bytecode=0x3566436ae051 offset=81](this=0x356665d1f221 <Source map = 0x3566bb495919>,output=0x35...

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
 1: 0x10003b125 node::Abort() [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 2: 0x10003b32f node::OnFatalError(char const*, char const*) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 3: 0x1001a8e85 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 4: 0x1005742a2 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 5: 0x100576d75 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 6: 0x100572c1f v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 7: 0x100570df4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 8: 0x10057d68c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
 9: 0x10057d70f v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
10: 0x10054d054 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationSpace) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
11: 0x1007d4f24 v8::internal::Runtime_AllocateInNewSpace(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/timbru/.nvm/versions/node/v10.15.0/bin/node]
12: 0x1495cf05be3d
sh: line 1: 55076 Abort trap: 6           ng build --prod "--source-map" "true" "--progress" "false"

@alexander-akait
Copy link
Member

@tbroadley can you create minimum reproducible test repo?

@tbroadley
Copy link

Hey, I assume you meant @timbru31?

@alexander-akait
Copy link
Member

alexander-akait commented Jan 16, 2019

@tbroadley yep, sorry

/cc @timbru31

@vankop
Copy link
Member

vankop commented Sep 28, 2019

@evilebottnawi same problem as #66

@alexander-akait
Copy link
Member

Thanks, let's close in favor #66 (new issue), any reproducible test repo welcome, we need more information

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants