From 13aed75ace593fbaf66ff3f5ac908441cf82b871 Mon Sep 17 00:00:00 2001 From: Kenton Varda Date: Sun, 15 Mar 2020 14:03:50 -0500 Subject: [PATCH] V8 in Node 12 broke fibers. Work around with --no-wasm-code-gc. Node issue: https://github.com/nodejs/node/issues/29767 Meteor's work-around: https://github.com/meteor/meteor/commit/c37bab64a4750eafbc6483ee82f67e6ff6221029 Meteor PR: https://github.com/meteor/meteor/pull/10798 --- src/sandstorm/run-bundle.c++ | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/sandstorm/run-bundle.c++ b/src/sandstorm/run-bundle.c++ index 6f4008ec0c..c5835d4d03 100644 --- a/src/sandstorm/run-bundle.c++ +++ b/src/sandstorm/run-bundle.c++ @@ -1245,6 +1245,9 @@ public: kj::Vector argv; argv.add(nodePath.cStr()); argv.add("--expose-gc"); + // --no-wasm-code-gc to work around https://github.com/nodejs/node/issues/29767 + // Meteor did this too: https://github.com/meteor/meteor/commit/c37bab64a4750eafbc6483ee82f67e6ff6221029 + argv.add("--no-wasm-code-gc"); argv.add("meteor-bundle-main.js"); argv.add(mainScriptPath.cStr()); argv.add(portArg.cStr()); @@ -2614,7 +2617,10 @@ private: kj::String settingsString = makeMeteorSettings(config, buildstamp); KJ_SYSCALL(setenv("METEOR_SETTINGS", settingsString.cStr(), true)); - KJ_SYSCALL(execl("/bin/node", "/bin/node", "sandstorm-main.js", EXEC_END_ARGS)); + // --no-wasm-code-gc to work around https://github.com/nodejs/node/issues/29767 + // Meteor did this too: https://github.com/meteor/meteor/commit/c37bab64a4750eafbc6483ee82f67e6ff6221029 + KJ_SYSCALL(execl("/bin/node", "/bin/node", "--no-wasm-code-gc", + "sandstorm-main.js", EXEC_END_ARGS)); KJ_UNREACHABLE; });