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

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory #13891

Closed
michaelBenin opened this issue Jun 23, 2017 · 3 comments
Labels
question Issues that look for answers.

Comments

@michaelBenin
Copy link

michaelBenin commented Jun 23, 2017

  • Version: 8.1.2
  • Platform: Darwin Admins-MacBook-Pro-9.local 16.6.0 Darwin Kernel Version 16.6.0: Fri Apr 14 16:21:16 PDT 2017;
  • Subsystem:

Hello,

Doing some testing on Node v8, I've received an error on a migration script which ran successfully on previous versions. Here's the stack trace:

<--- Last few GCs --->

[18275:0x102801600]  1824850 ms: Mark-sweep 1409.5 (1465.6) -> 1409.5 (1449.6) MB, 1010.7 / 0.0 ms  (+ 0.0 ms in 0 steps since start of marking, biggest step 0.0 ms, walltime since start of marking 1011 ms) last resort 
[18275:0x102801600]  1825867 ms: Mark-sweep 1409.5 (1449.6) -> 1409.5 (1449.6) MB, 1017.0 / 0.0 ms  last resort 


<--- JS stacktrace --->

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

Security context: 0x3adc7d9a9891 <JS Object>
    2: /* anonymous */ [/Users/mbenin/Desktop/<project-name>/node_modules/lodash/lodash.js:3759] [pc=0x1fcd99cc88ab](this=0x13f05d68ca61 <JS Global Object>,value=0x3115e7202311 <undefined>,path=0xf28026880b9 <String[9]: tableName>)
    3: basePick [/Users/mbenin/Desktop/<project-name>/node_modules/lodash/lodash.js:~3757] [pc=0x1fcd994a49a0](this=0x13f05d68ca61 <JS Global Object>,object=0x1122...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 2: node::FatalException(v8::Isolate*, v8::Local<v8::Value>, v8::Local<v8::Message>) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 3: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 4: v8::internal::Factory::NewFixedArray(int, v8::internal::PretenureFlag) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 5: v8::internal::Factory::NewScopeInfo(int) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 6: v8::internal::ScopeInfo::Create(v8::internal::Isolate*, v8::internal::Zone*, v8::internal::Scope*, v8::internal::MaybeHandle<v8::internal::ScopeInfo>) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 7: v8::internal::Scope::AllocateScopeInfosRecursively(v8::internal::Isolate*, v8::internal::MaybeHandle<v8::internal::ScopeInfo>) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 8: v8::internal::DeclarationScope::AllocateVariables(v8::internal::ParseInfo*, v8::internal::AnalyzeMode) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
 9: v8::internal::DeclarationScope::Analyze(v8::internal::ParseInfo*, v8::internal::AnalyzeMode) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
10: v8::internal::Compiler::Analyze(v8::internal::ParseInfo*, v8::internal::ThreadedList<v8::internal::ThreadedListZoneEntry<v8::internal::FunctionLiteral*> >*) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
11: v8::internal::(anonymous namespace)::CompileUnoptimizedCode(v8::internal::CompilationInfo*, v8::internal::Compiler::ConcurrencyMode) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
12: v8::internal::(anonymous namespace)::GetUnoptimizedCode(v8::internal::CompilationInfo*, v8::internal::Compiler::ConcurrencyMode) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
13: v8::internal::Compiler::Compile(v8::internal::Handle<v8::internal::JSFunction>, v8::internal::Compiler::ClearExceptionFlag) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
14: v8::internal::Runtime_CompileLazy(int, v8::internal::Object**, v8::internal::Isolate*) [/Users/mbenin/.nvm/versions/node/v8.1.2/bin/node]
15: 0x1fcd98b8437d
@michaelBenin michaelBenin changed the title Security context: 0x3adc7d9a9891 <JS Object> FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory Jun 23, 2017
@cjihrig
Copy link
Contributor

cjihrig commented Jun 23, 2017

Your process is running out of memory. Does the script currently run properly on Node 6?

@michaelBenin
Copy link
Author

Prior to this, the script was running on 5.6.0. It will take me some time to recreate with 6 as I'll need to load in a snapshot, and get the dependencies working with that version. Not sure if I'll be able to repro today.

@mscdex mscdex added the question Issues that look for answers. label Jun 23, 2017
@bnoordhuis
Copy link
Member

I'm provisionally closing this but happy to reopen if it turns out to be a bug in node. It would be helpful to know if the stack trace is always the same and if e.g. --max_old_space_size=2048 or higher makes the problem go away.

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

No branches or pull requests

4 participants