Skip to content

Assertion failure when calling process.exit() from a Worker that has TLA #43182

Description

@aduh95

Version

master

Platform

macOS

Subsystem

worker_threads

What steps will reproduce the bug?

new worker_threads.Worker(new URL("data:text/javascript,process.exit(0);await new Promise(()=>{})"))

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

No response

What is the expected behavior?

No crash

What do you see instead?

$ out/Release/node -e 'new worker_threads.Worker(new URL("data:text/javascript,process.exit(0);await new Promise(()=>{})"))'


#
# Fatal error in , line 0
# Check failed: (location_) != nullptr.
#
#
#
#FailureMessage Object: 0x700008060840
 1: 0x108604622 node::NodePlatform::GetStackTracePrinter()::$_3::__invoke() […/out/Release/node]
 2: 0x109772823 V8_Fatal(char const*, ...) […/out/Release/node]
 3: 0x108be671c v8::internal::SourceTextModule::ExecuteAsyncModule(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) […/out/Release/node]
 4: 0x108be5f35 v8::internal::SourceTextModule::InnerModuleEvaluation(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>, v8::internal::ZoneForwardList<v8::internal::Handle<v8::internal::SourceTextModule> >*, unsigned int*) […/out/Release/node]
 5: 0x108be5d6b v8::internal::SourceTextModule::InnerModuleEvaluation(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>, v8::internal::ZoneForwardList<v8::internal::Handle<v8::internal::SourceTextModule> >*, unsigned int*) […/out/Release/node]
 6: 0x108be583b v8::internal::SourceTextModule::Evaluate(v8::internal::Isolate*, v8::internal::Handle<v8::internal::SourceTextModule>) […/out/Release/node]
 7: 0x10871b43c v8::Module::Evaluate(v8::Local<v8::Context>) […/out/Release/node]
 8: 0x10855c6ae node::loader::ModuleWrap::Evaluate(v8::FunctionCallbackInfo<v8::Value> const&) […/out/Release/node]
 9: 0x10877c9f8 v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) […/out/Release/node]
10: 0x10877c54b v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(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) […/out/Release/node]
11: 0x10877bc2b v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) […/out/Release/node]
12: 0x1090d2b39 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit […/out/Release/node]
13: 0x109056a90 Builtins_InterpreterEntryTrampoline […/out/Release/node]
[1]    43848 trace trap  out/Release/node -e 

Additional information

The bug is reproducable on v14.x, v16.x, and v18.x lines.

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

    confirmed-bugIssues and PRs for confirmed bugs.workerIssues and PRs related to the worker_threads module and Worker API.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions