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

Test crashes with dynamic import #213

Closed
targos opened this issue Oct 25, 2021 · 6 comments
Closed

Test crashes with dynamic import #213

targos opened this issue Oct 25, 2021 · 6 comments

Comments

@targos
Copy link
Member

targos commented Oct 25, 2021

See full logs in https://gist.github.com/targos/d0cd175ad1727025f6efeb6fbb97b34b

Example:

$ out/Release/node /Users/targos/git/nodejs/canary/test/es-module/test-esm-windows.js
out/Release/node[38726]: ../../src/module_wrap.cc:607:MaybeLocal<v8::Promise> node::loader::ImportModuleDynamically(Local<v8::Context>, Local<v8::ScriptOrModule>, Local<v8::String>, Local<v8::FixedArray>): Assertion `(it) != (env->id_to_function_map.end())' failed.
 1: 0x102c93e54 node::Abort() [/Users/targos/git/nodejs/canary/out/Release/node]
 2: 0x102c93c9c node::AppendExceptionLine(node::Environment*, v8::Local<v8::Value>, v8::Local<v8::Message>, node::ErrorHandlingMode) [/Users/targos/git/nodejs/canary/out/Release/node]
 3: 0x102c61d64 node::loader::ImportModuleDynamically(v8::Local<v8::Context>, v8::Local<v8::ScriptOrModule>, v8::Local<v8::String>, v8::Local<v8::FixedArray>) [/Users/targos/git/nodejs/canary/out/Release/node]
 4: 0x102f0d480 v8::internal::Isolate::RunHostImportModuleDynamicallyCallback(v8::internal::Handle<v8::internal::Script>, v8::internal::Handle<v8::internal::Object>, v8::internal::MaybeHandle<v8::internal::Object>) [/Users/targos/git/nodejs/canary/out/Release/node]
 5: 0x1032a4fb4 v8::internal::Runtime_DynamicImportCall(int, unsigned long*, v8::internal::Isolate*) [/Users/targos/git/nodejs/canary/out/Release/node]
 6: 0x1035b1784 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvInRegister_NoBuiltinExit [/Users/targos/git/nodejs/canary/out/Release/node]
 7: 0x1036445f8 Builtins_CallRuntimeHandler [/Users/targos/git/nodejs/canary/out/Release/node]
 8: 0x10353f058 Builtins_InterpreterEntryTrampoline [/Users/targos/git/nodejs/canary/out/Release/node]
 9: 0x10353f058 Builtins_InterpreterEntryTrampoline [/Users/targos/git/nodejs/canary/out/Release/node]
10: 0x103571ed4 Builtins_AsyncFunctionAwaitResolveClosure [/Users/targos/git/nodejs/canary/out/Release/node]
11: 0x1035fb8d8 Builtins_PromiseFulfillReactionJob [/Users/targos/git/nodejs/canary/out/Release/node]
12: 0x1035642b4 Builtins_RunMicrotasks [/Users/targos/git/nodejs/canary/out/Release/node]
13: 0x10353cd44 Builtins_JSRunMicrotasksEntry [/Users/targos/git/nodejs/canary/out/Release/node]
14: 0x102ef514c v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/targos/git/nodejs/canary/out/Release/node]
15: 0x102ef5580 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/targos/git/nodejs/canary/out/Release/node]
16: 0x102ef5648 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) [/Users/targos/git/nodejs/canary/out/Release/node]
17: 0x102f18dac v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/targos/git/nodejs/canary/out/Release/node]
18: 0x102f19544 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/targos/git/nodejs/canary/out/Release/node]
19: 0x102bde0f0 node::InternalCallbackScope::Close() [/Users/targos/git/nodejs/canary/out/Release/node]
20: 0x102bddb28 node::InternalCallbackScope::~InternalCallbackScope() [/Users/targos/git/nodejs/canary/out/Release/node]
21: 0x102c96ec4 node::fs::FileHandle::CloseReq::Resolve() [/Users/targos/git/nodejs/canary/out/Release/node]
22: 0x102ca9aa4 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) [/Users/targos/git/nodejs/canary/out/Release/node]
23: 0x10351c880 uv__work_done [/Users/targos/git/nodejs/canary/out/Release/node]
24: 0x10351fff4 uv__async_io [/Users/targos/git/nodejs/canary/out/Release/node]
25: 0x103531b58 uv__io_poll [/Users/targos/git/nodejs/canary/out/Release/node]
26: 0x103520484 uv_run [/Users/targos/git/nodejs/canary/out/Release/node]
27: 0x102bdf15c node::SpinEventLoop(node::Environment*) [/Users/targos/git/nodejs/canary/out/Release/node]
28: 0x102cccfa8 node::NodeMainInstance::Run(int*, node::Environment*) [/Users/targos/git/nodejs/canary/out/Release/node]
29: 0x102cccc78 node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [/Users/targos/git/nodejs/canary/out/Release/node]
30: 0x102c66694 node::Start(int, char**) [/Users/targos/git/nodejs/canary/out/Release/node]
31: 0x1076f10f4
[1]    38726 abort      out/Release/node
@targos
Copy link
Member Author

targos commented Oct 25, 2021

/cc @nodejs/modules

@bmeck
Copy link
Member

bmeck commented Oct 25, 2021

It looks odd, like the Node::Environment is missing the pointer the the JS function?

@bmeck
Copy link
Member

bmeck commented Oct 25, 2021

Direct ref (can't link against this repo/the latest v8 it builds with unfortunately): https://github.com/nodejs/node/blob/08ffbd115e5170274f3c0bea602378903fd03173/src/module_wrap.cc#L606

@GeoffreyBooth

This comment has been minimized.

@targos

This comment has been minimized.

@targos
Copy link
Member Author

targos commented Nov 5, 2021

@targos targos closed this as completed Nov 5, 2021
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