Skip to content

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

Closed as not planned

Description

@abrahamguo

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

Activity

  1. added
    esm
    loaders
    confirmed-bug
    on Feb 5, 2025
  2. joyeecheung commented on Feb 5, 2025

    @joyeecheung
    Member
  3. added
    v8 engine
    and removed
    loaders
    on Feb 5, 2025
  4. targos commented on Feb 5, 2025

    @targos
    Member

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

  5. joyeecheung commented on Mar 4, 2025

    @joyeecheung
    Member

    Since v23 is approaching EOL is it still necessary to bisect the V8 fix and backport it?

  6. aduh95 commented on Jun 8, 2025

    @aduh95
    Contributor

    516b4eb has landed, closing as Won't fix

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

    confirmed-bugesmv8 engine

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions