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

v23 regression: Crash when throwing error with imports and multiple TLAs #56854

Open
abrahamguo opened this issue Jan 31, 2025 · 2 comments
Open
Labels
confirmed-bug Issues with confirmed bugs. esm Issues and PRs related to the ECMAScript Modules implementation. v8 engine Issues and PRs related to the V8 dependency. v23.x v23.x Issues that can be reproduced on v23.x or PRs targeting the v23.x-staging branch.

Comments

@abrahamguo
Copy link

Version

23.anything

Platform

Darwin ****** 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:15 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6000 arm64

Subsystem

No response

What steps will reproduce the bug?

a.js:

import './b.js'; await 1;

b.js:

import './c.js'; throw 1;

c.js:

await 1;

$ node a.js

How often does it reproduce? Is there a required condition?

Every time

What is the expected behavior? Why is that the expected behavior?

1 should be thrown. Output from Node 22.13.1:`

node:internal/modules/run_main:122
    triggerUncaughtException(
    ^
1
(Use `node --trace-uncaught ...` to show where the exception was thrown)

What do you see instead?


#
# Fatal error in , line 0
# Check failed: module->status() == kEvaluating || module->status() == kEvaluatingAsync.
#
#
#
#FailureMessage Object: 0x16aef1fe8
----- Native stack trace -----

 1: 0x105065c20 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 2: 0x1066316b8 V8_Fatal(char const*, ...) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 3: 0x105711c3c v8::internal::SourceTextModule::ExecuteAsyncModule(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 4: 0x105711924 v8::internal::SourceTextModule::AsyncModuleExecutionFulfilled(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 5: 0x10526e608 v8::internal::Builtin_CallAsyncModuleFulfilled(int, unsigned long*, v8::internal::Isolate*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 6: 0x105e2f914 Builtins_CEntry_Return1_ArgvOnStack_BuiltinExit [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 7: 0x105ea3298 Builtins_PromiseFulfillReactionJob [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 8: 0x105dc5214 Builtins_RunMicrotasks [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
 9: 0x105d963f0 Builtins_JSRunMicrotasksEntry [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
10: 0x105371f54 v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
11: 0x1053727f0 v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
12: 0x105372928 v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
13: 0x10539e7f0 v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
14: 0x10539f0a8 v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
15: 0x104f09994 node::InternalCallbackScope::Close() [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
16: 0x104f09454 node::InternalCallbackScope::~InternalCallbackScope() [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
17: 0x104ff03d0 node::fs::FileHandle::CloseReq::Resolve() [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
18: 0x10500ebc0 node::fs::FileHandle::ClosePromise()::$_0::__invoke(uv_fs_s*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
19: 0x104fe4838 node::MakeLibuvRequestCallback<uv_fs_s, void (*)(uv_fs_s*)>::Wrapper(uv_fs_s*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
20: 0x105d743f8 uv__work_done [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
21: 0x105d77f1c uv__async_io [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
22: 0x105d8b00c uv__io_poll [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
23: 0x105d784b4 uv_run [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
24: 0x104f0a4e4 node::SpinEventLoopInternal(node::Environment*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
25: 0x105036764 node::NodeMainInstance::Run(node::ExitCode*, node::Environment*) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
26: 0x105036500 node::NodeMainInstance::Run() [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
27: 0x104fa9048 node::Start(int, char**) [/Users/abraham/.nvm/versions/node/v23.0.0/bin/node]
28: 0x182ef0274 start [/usr/lib/dyld]
[1]    44811 trace trap  node a.js

Additional information

No response

@joyeecheung joyeecheung added esm Issues and PRs related to the ECMAScript Modules implementation. loaders Issues and PRs related to ES module loaders confirmed-bug Issues with confirmed bugs. labels Feb 5, 2025
@joyeecheung
Copy link
Member

Seems related to https://chromium-review.googlesource.com/c/v8/v8/+/5805022 which is probably not in v22, looking into it a bit..

@joyeecheung joyeecheung added v8 engine Issues and PRs related to the V8 dependency. and removed loaders Issues and PRs related to ES module loaders labels Feb 5, 2025
@targos targos added the v23.x v23.x Issues that can be reproduced on v23.x or PRs targeting the v23.x-staging branch. label Feb 5, 2025
@targos
Copy link
Member

targos commented Feb 5, 2025

Marking v23.x because it's not reproducible on main with V8 13.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed-bug Issues with confirmed bugs. esm Issues and PRs related to the ECMAScript Modules implementation. v8 engine Issues and PRs related to the V8 dependency. v23.x v23.x Issues that can be reproduced on v23.x or PRs targeting the v23.x-staging branch.
Projects
None yet
Development

No branches or pull requests

3 participants