Skip to content

The NAN pi example crashes with a debug assert with the latest Node.js-git compiled in debug mode #1025

Description

@mmomtchev

The pi example in the NAN repo spews out a debug assert when the module is loaded in the latest Node.js git checkout if Node.js is compiled in debug mode.

The release build loads the module normally.

#
# Fatal error in ../deps/v8/src/api/api.cc, line 827
# Debug check failed: i::IsTheHole(i::Tagged<i::Object>(*escape_slot_), reinterpret_cast<i::Isolate*>(GetIsolate())).
#
#
#
#FailureMessage Object: 0x16bbd4338
----- Native stack trace -----

 1: 0x104312980 node::DumpNativeBacktrace(__sFILE*) [/Users/mmom/src/node/out/Debug/node]
 2: 0x10469885c node::NodePlatform::GetStackTracePrinter()::$_0::operator()() const [/Users/mmom/src/node/out/Debug/node]
 3: 0x104698818 node::NodePlatform::GetStackTracePrinter()::$_0::__invoke() [/Users/mmom/src/node/out/Debug/node]
 4: 0x1074e2ce0 V8_Fatal(char const*, int, char const*, ...) [/Users/mmom/src/node/out/Debug/node]
 5: 0x1074e2550 v8::base::SetFatalFunction(void (*)(char const*, int, char const*)) [/Users/mmom/src/node/out/Debug/node]
 6: 0x104a46104 v8::EscapableHandleScopeBase::EscapeSlot(unsigned long*) [/Users/mmom/src/node/out/Debug/node]
 7: 0x116920778 Nan::imp::Factory<v8::FunctionTemplate>::New(void (*)(Nan::FunctionCallbackInfo<v8::Value> const&), v8::Local<v8::Value>, v8::Local<v8::Signature>) [/Users/mmom/src/nan/examples/async_pi_estimate/build/Release/addon.node]
 8: 0x116920bb0 InitAll(v8::Local<v8::Object>) [/Users/mmom/src/nan/examples/async_pi_estimate/build/Release/addon.node]
 9: 0x1044bb87c node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0::operator()(node::binding::DLib*) const [/Users/mmom/src/node/out/Debug/node]
10: 0x1044bb284 decltype(std::declval<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&>()(std::declval<node::binding::DLib*>())) std::__1::__invoke[abi:nn200100]<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*>(node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*&&) [/Users/mmom/src/node/out/Debug/node]
11: 0x1044bb254 bool std::__1::__invoke_void_return_wrapper<bool, false>::__call[abi:nn200100]<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*>(node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*&&) [/Users/mmom/src/node/out/Debug/node]
12: 0x1044bb228 bool std::__1::__invoke_r[abi:nn200100]<bool, node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*>(node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0&, node::binding::DLib*&&) [/Users/mmom/src/node/out/Debug/node]
13: 0x1044bb1fc std::__1::__function::__alloc_func<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0, std::__1::allocator<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0>, bool (node::binding::DLib*)>::operator()[abi:nn200100](node::binding::DLib*&&) [/Users/mmom/src/node/out/Debug/node]
14: 0x1044babd0 std::__1::__function::__func<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0, std::__1::allocator<node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool)::$_0>, bool (node::binding::DLib*)>::operator()(node::binding::DLib*&&) [/Users/mmom/src/node/out/Debug/node]
15: 0x104384c08 std::__1::__function::__value_func<bool (node::binding::DLib*)>::operator()[abi:nn200100](node::binding::DLib*&&) const [/Users/mmom/src/node/out/Debug/node]
16: 0x10435d7f0 std::__1::function<bool (node::binding::DLib*)>::operator()(node::binding::DLib*) const [/Users/mmom/src/node/out/Debug/node]
17: 0x10435d72c node::Environment::TryLoadAddon(char const*, int, std::__1::function<bool (node::binding::DLib*)> const&) [/Users/mmom/src/node/out/Debug/node]
18: 0x1044b4dd8 node::binding::DLOpenImpl(v8::FunctionCallbackInfo<v8::Value> const&, bool) [/Users/mmom/src/node/out/Debug/node]
19: 0x1044b464c node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) [/Users/mmom/src/node/out/Debug/node]
20: 0x105e1ed2c Builtins_CallApiCallbackGeneric [/Users/mmom/src/node/out/Debug/node]
21: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
22: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
23: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
24: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
25: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
26: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
27: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
28: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
29: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
30: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
31: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
32: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
33: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
34: 0x105e1cec4 Builtins_InterpreterEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
35: 0x105e18a70 Builtins_JSEntryTrampoline [/Users/mmom/src/node/out/Debug/node]
36: 0x105e18758 Builtins_JSEntry [/Users/mmom/src/node/out/Debug/node]
37: 0x104d27394 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/mmom/src/node/out/Debug/node]
38: 0x104d26654 v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::DirectHandle<v8::internal::Object>, v8::internal::DirectHandle<v8::internal::Object>, v8::base::Vector<v8::internal::DirectHandle<v8::internal::Object> const>) [/Users/mmom/src/node/out/Debug/node]
39: 0x104a68ffc v8::Function::Call(v8::Isolate*, v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) [/Users/mmom/src/node/out/Debug/node]
40: 0x1044e233c node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, node::Realm*) [/Users/mmom/src/node/out/Debug/node]
41: 0x1046b6eec node::Realm::ExecuteBootstrapper(char const*) [/Users/mmom/src/node/out/Debug/node]
42: 0x104497a48 node::StartExecution(node::Environment*, char const*) [/Users/mmom/src/node/out/Debug/node]
43: 0x1044978e0 node::StartExecution(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfoWithModule const&)>) [/Users/mmom/src/node/out/Debug/node]
44: 0x104255d60 node::LoadEnvironment(node::Environment*, std::__1::function<v8::MaybeLocal<v8::Value> (node::StartExecutionCallbackInfoWithModule const&)>, std::__1::function<void (node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Value>)>) [/Users/mmom/src/node/out/Debug/node]
45: 0x1045f9d50 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/mmom/src/node/out/Debug/node]
46: 0x1045f99b8 node::NodeMainInstance::Run() [/Users/mmom/src/node/out/Debug/node]
47: 0x10449a8d0 node::StartInternal(int, char**) [/Users/mmom/src/node/out/Debug/node]
48: 0x10449a460 node::Start(int, char**) [/Users/mmom/src/node/out/Debug/node]
49: 0x1066c7108 main [/Users/mmom/src/node/out/Debug/node]
50: 0x192056b98 start [/usr/lib/dyld]
zsh: trace trap  /Users/mmom/src/node/node_g addon.js

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions