laverdet / isolated-vm

Secure & isolated JS environments for nodejs
ISC License
2.2k stars 154 forks source link

worker-threads test fails on macos #365

Open orgads opened 1 year ago

orgads commented 1 year ago
workers-threads.js: *fail*
code: null signal: SIGABRT
stderr: /Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node[8154]: ../src/node_platform.cc:376:virtual void node::NodePlatform::RegisterIsolate(v8::Isolate *, node::IsolatePlatformDelegate *): Assertion `insertion.second' failed.
 1: 0x10d992805 node::Abort() (.cold.1) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
 2: 0x10c408a69 node::Abort() [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
 3: 0x10c408811 node::Assert(node::AssertionInfo const&) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
 4: 0x10c476b70 node::NodePlatform::UnregisterIsolate(v8::Isolate*) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
 5: 0x119ed9689 ivm::IsolateEnvironment::IsolateCtor(unsigned long, std::__1::shared_ptr<v8::BackingStore>, unsigned long) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
 6: 0x119f0b8d8 ivm::IsolateEnvironment::New(unsigned long, std::__1::shared_ptr<v8::BackingStore>, unsigned long) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
 7: 0x119f0b312 ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
 8: 0x119f1a379 v8::Local<v8::Value> ivm::detail::ConstructorFunctionImpl<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (v8::MaybeLocal<v8::Object>)>::Invoke<&(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
 9: 0x119f1a569 void ivm::detail::CallbackMaker<v8::Local<v8::Value> (*)(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>), &(v8::Local<v8::Value> ivm::detail::ConstructorFunctionImpl<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (v8::MaybeLocal<v8::Object>)>::Invoke<&(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>)), -1, v8::FunctionCallbackInfo<v8::Value> const&>::Spread<0ul, 1ul>(v8::FunctionCallbackInfo<v8::Value> const&, std::__1::integer_sequence<unsigned long, 0ul, 1ul>)::'lambda'()::operator()() const [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
10: 0x119f1a44b void ivm::detail::RunBarrier<ivm::detail::CallbackMaker<v8::Local<v8::Value> (*)(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>), &(v8::Local<v8::Value> ivm::detail::ConstructorFunctionImpl<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (v8::MaybeLocal<v8::Object>)>::Invoke<&(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>)), -1, v8::FunctionCallbackInfo<v8::Value> const&>::Callback(v8::FunctionCallbackInfo<v8::Value> const&)::'lambda'()>(ivm::detail::CallbackMaker<v8::Local<v8::Value> (*)(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>), &(v8::Local<v8::Value> ivm::detail::ConstructorFunctionImpl<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (v8::MaybeLocal<v8::Object>)>::Invoke<&(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>(v8::Local<v8::Value>, v8::MaybeLocal<v8::Object>)), -1, v8::FunctionCallbackInfo<v8::Value> const&>::Callback(v8::FunctionCallbackInfo<v8::Value> const&)::'lambda'()) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
11: 0x119f1a188 void ivm::detail::RunBarrier<ivm::ConstructorFunction<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (*)(v8::MaybeLocal<v8::Object>), &(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>::Entry(v8::FunctionCallbackInfo<v8::Value> const&)::'lambda'()>(ivm::ConstructorFunction<std::__1::unique_ptr<ivm::ClassHandle, std::__1::default_delete<ivm::ClassHandle> > (*)(v8::MaybeLocal<v8::Object>), &(ivm::IsolateHandle::New(v8::MaybeLocal<v8::Object>))>::Entry(v8::FunctionCallbackInfo<v8::Value> const&)::'lambda'()) [/Users/runner/work/isolated-vm/isolated-vm/out/isolated_vm.node]
12: 0x10c600398 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
13: 0x10c5ffb64 v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
14: 0x10c5ff55b v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
15: 0x10cf5c8f9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
16: 0x10cede38c Builtins_JSBuiltinsConstructStub [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
17: 0x10cffa8ff Builtins_ConstructHandler [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
18: 0x10cee0[85](https://github.com/orgads/isolated-vm/actions/runs/5568141014/jobs/10170554848#step:7:86)0 Builtins_InterpreterEntryTrampoline [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
19: 0x10cf7e[86](https://github.com/orgads/isolated-vm/actions/runs/5568141014/jobs/10170554848#step:7:87)c Builtins_ArrayMap [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]
20: 0x10cee0850 Builtins_InterpreterEntryTrampoline [/Users/runner/hostedtoolcache/node/18.16.1/x64/bin/node]

Example: https://github.com/orgads/isolated-vm/actions/runs/5567938779/jobs/10170197349

orgads commented 1 year ago

Here it succeeded on 3rd attempt: https://github.com/orgads/isolated-vm/actions/runs/5568141014/jobs/10170554848