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 followed by segmentation faults #9256

Closed
Telokis opened this issue Oct 23, 2017 · 7 comments

Comments

@Telokis
Copy link

Telokis commented Oct 23, 2017

Related issues : #8157 AdmitHub/meteor-buildpack-horse#179

I am using Meteor v 1.5.2.2.
Windows 10 64 bits.
Git bash inside VSCode.

I have a huge amount of react components for my app (around 100MB in total) and doing meteor run ends up generating a FATAL ERROR.
Once this fatal error is thrown, I try to increase the max-old-space-size following advices from #8157. I used export TOOL_NODE_FLAGS="--max-old-space-size=4096" inside my git bash from VSCode.
After that point, whatever command involving meteor systematically creates a segmentation fault.

$ meteor --version
Segmentation fault

I cannot provide a simple reproduction since I is probably related to the fact that I have such a huge codebase involved.

I managed to fix the issue once but forgot to set max-old-space-size to 4096 again after rebooting.
What I did to "fix" it:

  • Uninstall meteor from the computer
  • Remove all files in .meteor except packages and release
  • Uninstall node 8.7.0 from my computer.
  • Reboot
  • Reinstall node 8.7.0
  • Reinstall Meteor 1.5.2.2
  • Reusing meteor run inside my repository.
  • Crashing and come here in despair.
@Telokis
Copy link
Author

Telokis commented Oct 24, 2017

Just tried on Linux. The FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed occurs as well (without segmentation faults, though)

But I have 4096MB allowed and it still crashes. Is there a way to make meteor segment the bundle a bit so it won't generate a gigantic file at once?

@Telokis
Copy link
Author

Telokis commented Oct 24, 2017

=> Started proxy.
=> Started MongoDB.
   Linking                                   |
<--- Last few GCs --->

  344324 ms: Mark-sweep 1393.5 (1453.3) -> 1391.7 (1453.3) MB, 694.4 / 0 ms [allocation failure] [GC in old space requested].
  345016 ms: Mark-sweep 1391.7 (1453.3) -> 1393.2 (1453.3) MB, 691.6 / 0 ms [allocation failure] [GC in old space requested].
  345713 ms: Mark-sweep 1393.2 (1453.3) -> 1390.4 (1453.3) MB, 697.3 / 0 ms [last resort gc].
  346408 ms: Mark-sweep 1390.4 (1453.3) -> 1393.2 (1453.3) MB, 694.6 / 0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x18168cd37399 <JS Object>
    1: add(aka SourceNode_add) [/root/.meteor/packages/meteor-tool/.1.5.2_2.fkst7p++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/source-map/lib/source-node.js:~166] [pc=0x127d03622bb] (this=0x367b29e7a191 <a SourceNode with map 0x32a25c079ed1>,aChunk=0x2026eeedf1 <a SourceNode with map 0x32a25c079ed1>)
    2: addMappingWithCode(aka addMappingWithCode) [...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Abandon

@Telokis
Copy link
Author

Telokis commented Oct 24, 2017

Using 16GB of ram made it work but that's not a good solution at all. Any way to split my source instead of creating one gigantic app.js file?

@rjsmith
Copy link

rjsmith commented Oct 30, 2017

I'm also seeing the same error when running my v1.5.2.2 application's tests on a codeship build. The last successful build on codeship was with Meteor v1.5.2.2-rc.0.

I have had to revert to deploying my app onto galaxy from my local machine instead :-(

[email protected] test:once /home/rof/src/bitbucket.org/XXXXXXX
> PLANGY_IS_TEST=1 meteor test --once --full-app --driver-package dispatch:mocha-phantomjs --settings plangy-settings.json

[[[[[ Tests ]]]]]

=> Started proxy.
=> Meteor 1.6 is available. Update this project with 'meteor update'.
=> Started MongoDB.
Linking                                   \
<--- Last few GCs --->

575251 ms: Mark-sweep 1390.2 (1454.9) -> 1389.5 (1454.9) MB, 1300.3 / 0 ms [allocation failure] [GC in old space requested].
576554 ms: Mark-sweep 1389.5 (1454.9) -> 1390.4 (1454.9) MB, 1302.8 / 0 ms [allocation failure] [GC in old space requested].
577849 ms: Mark-sweep 1390.4 (1454.9) -> 1384.5 (1454.9) MB, 1295.3 / 0 ms [last resort gc].
579132 ms: Mark-sweep 1384.5 (1454.9) -> 1390.4 (1454.9) MB, 1283.2 / 0 ms [last resort gc].


<--- JS stacktrace --->

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

Security context: 0x2f0569637399 <JS Object>
2: /* anonymous */(aka /* anonymous */) [/home/rof/.meteor/packages/meteor-tool/.1.5.2_2.1lmmf7r.tzgjh++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/source-map/lib/source-node.js:~336] [pc=0x14a25c4c2410] (this=0x2f0569604131 <undefined>,chunk=0x2662fb39e4a9 <String[2]: , >,original=0x2e770512dca1 <an Object with map 0x19d125f0fe69>)
3: walk(aka...

FATAL ERROR: CALL_AND_RETRY_LAST Allocation failed - process out of memory
Aborted (core dumped)
npm ERR! code ELIFECYCLE
npm ERR! errno 134
npm ERR! [email protected] test:once: `PLANGY_IS_TEST=1 meteor test --once --full-app --driver-package dispatch:mocha-phantomjs --settings plangy-settings.json`
npm ERR! Exit status 134
npm ERR! 
npm ERR! Failed at the [email protected] test:once script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

@rjsmith
Copy link

rjsmith commented Nov 2, 2017

Just to follow-up from my post above, I solved the problem by adding

TOOL_NODE_FLAGS=--max-old-space-size=4096

to the environment variables in my codeship build.

@hwillson
Copy link
Contributor

hwillson commented Jan 2, 2018

@Telokis Are you able to try updating to Meteor 1.6.0.1 to see if that helps?

@hwillson
Copy link
Contributor

We haven't heard back regarding the additional information requested in #9256 (comment), so closing for now. Thanks!

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

3 participants