FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
rodrigoruiz opened this issue · 4 comments
I'm getting the following error when I run vows in GitLab CI using image: node:latest
Security context: 0x1a6c1dd255e9 <JSObject>
3: replace(this=0x15dceb102201 <Very long string[18792565]>,0x23baa69ea439 <JSRegExp <String[10]: {expected}>>,0x23baa69ea3d9 <Very long string[17190278]>)
4: parse [/builds/hummingbird-studio/darwin/ci-testing/node_modules/vows/lib/assert/error.js:145] [bytecode=0x396d3c66f1f9 offset=471](this=0x3d11434866f1 <JSGlobal Object>,str=0x2ee33a654ef9 <String[48]\: expected {expected},\n\x09go...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
1: node::Abort() [node]
2: 0x8d04bc [node]
3: v8::Utils::ReportOOMFailure(char const*, bool) [node]
4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
5: v8::internal::Factory::NewRawTwoByteString(int, v8::internal::PretenureFlag) [node]
6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]
7: v8::internal::String::Flatten(v8::internal::Handle<v8::internal::String>, v8::internal::PretenureFlag) [node]
8: v8::internal::String::IndexOf(v8::internal::Isolate*, v8::internal::Handle<v8::internal::String>, v8::internal::Handle<v8::internal::String>, int) [node]
9: v8::internal::Runtime_StringIndexOfUnchecked(int, v8::internal::Object**, v8::internal::Isolate*) [node]
10: 0x18054f042fd
The problem here is that V8 is running out of memory - there isn't a whoooole lot Vows can do about this. And anyway, Vows is pretty unmaintained. You could try Perjury instead (full disclosure, it's written by a friend and I'm a comaintainer). That being said probably your app is exhausting the memory, not Vows or Perjury.
It does work on image: node:8.9.3-alpine
, is there a resason my code would act different there?
Also, I only have Vows code, nothing else.
@strugee nice work on perjury
. I sent you an email about it – lmk when you get a chance.
... @rodrigoruiz seems like you may be dealing with very large strings based on your stack trace? Maybe try changing what you put in your assert
call. But yeah this is generally not going to be a vows
issue. If you have code you'd like to share let us know.
@indexzero in case you missed it, since it's been a couple days, I sent you a reply and looped in Perjury's author :-)