core-lib icon indicating copy to clipboard operation
core-lib copied to clipboard

Javascript heap out of memory

Open MaxPleaner opened this issue 9 years ago • 0 comments

Running on Ubuntu 16:

> coffee -v
CoffeeScript version 1.11.1
> node -v
v6.7.0
> uname -r
4.4.0-47-generic

The lib version:

"rubyjs": "^0.7.2"

I haven't seen this error before. Running R("foo") after require 'rubyjs' causes it:

coffee> R("foo")

<--- Last few GCs --->

   45830 ms: Mark-sweep 1329.4 (1404.5) -> 1332.6 (1404.5) MB, 12.6 / 0.0 ms [allocation failure] [GC in old space requested].
   45842 ms: Mark-sweep 1332.6 (1404.5) -> 1336.0 (1404.5) MB, 12.2 / 0.0 ms [allocation failure] [GC in old space requested].
   45855 ms: Mark-sweep 1336.0 (1404.5) -> 1346.9 (1403.5) MB, 12.6 / 0.0 ms [last resort gc].
   45868 ms: Mark-sweep 1346.9 (1403.5) -> 1357.8 (1403.5) MB, 13.1 / 0.0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x177c2fdcfb51 <JS Object>
    1: [Symbol.replace] [native regexp.js:~540] [pc=0x3d45e7b30436] (this=0x3c130ea933d9 <JS RegExp>,D=0x20328707c8b9 <Very long string[2584059]>,aw=0x298a5742ea79 <String[2]: \f>)
    2: 0x177c2fd8aaf1 <Symbol: 20329980 <String[14]: Symbol.replace>>(aka [Symbol.replace]) [native regexp.js:677] [pc=0x3d45e7b59f4a] (this=0x3c130ea933d9 <JS RegExp>,D=0x20328707c8b9 <Very long string[2584059]>,aw=...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - JavaScript heap out of memory
 1: node::Abort() [node]
 2: 0x10d3d2c [node]
 3: v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: v8::internal::V8::FatalProcessOutOfMemory(char const*, bool) [node]
 5: v8::internal::Factory::NewRawOneByteString(int, v8::internal::PretenureFlag) [node]
 6: v8::internal::String::SlowFlatten(v8::internal::Handle<v8::internal::ConsString>, v8::internal::PretenureFlag) [node]
 7: v8::internal::Runtime_StringReplaceGlobalRegExpWithString(int, v8::internal::Object**, v8::internal::Isolate*) [node]
 8: 0x3d45e78092a7
fish: “coffee” terminated by signal SIGABRT (Abort)

MaxPleaner avatar Nov 30 '16 07:11 MaxPleaner