Node SDK 3.1.3: Check failed: AllowJavascriptExecution::IsAllowed(isolate)

After upgrading from 3.1.2 to 3.1.3 (but also seen on the 3.2.x betas) we are seeing crashes with the following exception.

This happens both on node:14 and node:16 containers, almost immediately (within a few seconds) in Production, and after a few minutes in QA where traffic is much lower.

We made the upgrade as an attempt to solve the (still unresolved) issues we’ve been facing for nearly 9 months now with libcouchbase crashes (explained here) so maybe those different symptoms could have the same root cause?

#
# Fatal error in , line 0
# Check failed: AllowJavascriptExecution::IsAllowed(isolate).
#
#
#
#FailureMessage Object: 0x7fffc1f0ead0
1: 0xb801d1 [node]
2: 0x1c1b754 V8_Fatal(char const*, ...) [node]
3: 0xe5f77f [node]
4: 0xe6008f v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) [node]
5: 0xd1a333 v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [node]
6: 0xa66e3f node::AsyncWrap::EmitAsyncInit(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::String>, double, double) [node]
7: 0xa5e117 node::EmitAsyncInit(v8::Isolate*, v8::Local<v8::Object>, v8::Local<v8::String>, double) [node]
8: 0x7fdaa851410b couchnode::Logger::handler(unsigned int, char const*, int, char const*, int, char const*, __va_list_tag*) [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
9: 0x7fdaa85143a6 couchnode::Logger::lcbHandler(lcb_LOGGER_ const*, unsigned long, char const*, lcb_LOG_SEVERITY, char const*, int, char const*, __va_list_tag*) [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
10: 0x7fdaa858ace7 lcb_log [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
11: 0x7fdaa8533893 lcb::Server::finalize_errored_ctx() [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
12: 0x7fdaa8586f78 lcb_destroy [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
13: 0x7fdaa850ccac couchnode::Connection::~Connection() [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
14: 0x7fdaa850cdd1 couchnode::Connection::~Connection() [/app/node_modules/couchbase/build/Release/couchbase_impl.node]
15: 0xe9d9cf v8::internal::GlobalHandles::InvokeFirstPassWeakCallbacks() [node]
16: 0xef4991 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
17: 0xef60d7 v8::internal::Heap::FinalizeIncrementalMarkingIfComplete(v8::internal::GarbageCollectionReason) [node]
18: 0xef9ad0 v8::internal::IncrementalMarkingJob::Task::RunInternal() [node]
19: 0xb81824 node::PerIsolatePlatformData::RunForegroundTask(std::unique_ptr<v8::Task, std::default_delete<v8::Task> >) [node]
20: 0xb83689 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
21: 0x158c396 [node]
22: 0x159f125 [node]
23: 0x158ccc8 uv_run [node]
24: 0xa57fd5 node::SpinEventLoop(node::Environment*) [node]
25: 0xb56bc7 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [node]
26: 0xadd102 node::Start(int, char**) [node]
27: 0x7fdaaae4609b __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
28: 0xa55b4c [node]

@brett19 this sounds like it’s related to the fix for https://issues.couchbase.com/browse/JSCBC-881 since my research indicates that error often relates to garbage collection?

I’m having the same problem. version 3.2.0-beta.
The issue happens when I run the docker image on but I’m unable to reproduce it when I start the app outside it.

Any idea how to overcome the issue?

This seems to happen with 3.2.0 and CB 7.0 too, also in docker

Hey @Yann_Jouanique ,

This will be fixed in our next release, you can find more details here: https://issues.couchbase.com/browse/JSCBC-910

Cheers, Brett