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 - process out of memory #179

Closed
maxnowack opened this issue Sep 7, 2017 · 5 comments
Closed

Comments

@maxnowack
Copy link

maxnowack commented Sep 7, 2017

Type of problem
  • Failure to build
Summary

I've just upgraded to meteor v1.5.2. Now the build is failing

Contents of .meteor/release
METEOR@1.5.2
Buildpack version
https://github.com/AdmitHub/meteor-buildpack-horse.git
Logs
<--- Last few GCs --->
  296629 ms: Mark-sweep 1368.2 (1454.7) -> 1368.2 (1454.7) MB, 986.4 / 0 ms [allocation failure] [GC in old space requested].
  297706 ms: Mark-sweep 1368.2 (1454.7) -> 1368.2 (1454.7) MB, 1076.9 / 0 ms [allocation failure] [GC in old space requested].
  298749 ms: Mark-sweep 1368.2 (1454.7) -> 1364.9 (1454.7) MB, 1042.9 / 0 ms [last resort gc].
  299787 ms: Mark-sweep 1364.9 (1454.7) -> 1368.2 (1454.7) MB, 1038.1 / 0 ms [last resort gc].
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x33efb4037399 <JS Object>
    1: addMapping(aka SourceMapGenerator_addMapping) [/app/tmp/cache/meteor/.meteor/packages/meteor-tool/.1.5.2.15o6ss4++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/source-map/lib/source-map-generator.js:~94] [pc=0x156d19d75b98] (this=0x3eb619a78b91 <a SourceMapGenerator with map 0x31d045866ff9>,aArgs=0xf5b0c59eca9 <an Object with map 0x31d0458662e9>)
...
FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
/app/tmp/buildpacks/84221b9691f649157dfcb4cc24d9b5910f813f653ddc952a8f8e0a816e4a3d912ed985a25131084b5df37e720ae0e510ef4463cf515b7a5f3bacd7341f71f95f/bin/compile: line 107:   342 Aborted                 HOME="$METEOR_DIR" "$METEOR_DIR/.meteor/meteor" $ARGS
 !     Push rejected, failed to compile Node.js app.
 !     Push failed
Deployment target

heroku

@maxnowack
Copy link
Author

Maybe it's related to the node 4.8.4 patch:

Node 4.8.4 has been patched to include nodejs/node#14829, an important PR implemented by our own @abernix (:tada:), which fixes a faulty backport of garbage collection-related logic in V8 that was causing occasional segmentation faults during Meteor development and testing, ever since Node 4.6.2 (Meteor 1.4.2.3). When Node 4.8.5 is officially released with these changes, we will immediately publish a small follow-up release. Issue #8648

https://github.com/meteor/meteor/blob/devel/History.md#v152-2017-09-05

@abernix
Copy link

abernix commented Sep 7, 2017

I suspect this problem is actually due to the fact that standard-minifier-js (a standard Meteor minififer configuration, uses uglify-js under the hood. However, uglify-js doesn't support all of the more modern ECMAScript language and fails. Meteor catches this failure and resorts to using babili (now called "Babel minify") however it is often excessive in memory usage and much slower.

The good news is that uglify-es is its successor and passes the test262 tests with much greater success, while still being quite fast. It is now the default in Meteor 1.6 (now in beta) thanks to meteor/meteor#8698.

As a work around until Meteor 1.6 comes out, you can use abernix:standard-minifier-js, which uses uglify-es. Note that this is not an official recommendation, but I believe it will work for you.

@maxnowack
Copy link
Author

I've removed standard-minifier-js and added your package abernix:standard-minifier-js, but the issue still persists :/

@abernix
Copy link

abernix commented Sep 11, 2017

Can you fork https://github.com/abernix/minifier-js/ into your local packages directory (as instructed here) and then add debug logging on this line (and elsewhere, as appropriate) to see if it's Babel that is getting run?

@maxnowack
Copy link
Author

@abernix how do I log correctly inside build plugins? I've added some console.log but nothing is getting logged. Here you'll find the file with the changes I've made: https://gist.github.com/maxnowack/db7c7d692ec09e87793554b85870c3c9

In an addition to that, the error occured also locally. So it seems, that it isn't an issue with the heroku buildpack but with meteor itself. So I've created meteor/meteor#9075

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

2 participants