Skip to content

Unref a socket raise v8 error #38707

Description

@niyan-ly
  • 15.14.0:
  • Linux:
  • Debian:

What steps will reproduce the bug?

const request = https.get('https://www.google.com', res => {

});

request.on('socket', socket => {
  socket.unref();
})

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

every time in Node.js 15.x and above

What is the expected behavior?

the process should exit gracefully

What do you see instead?

FATAL ERROR: v8::HandleScope::CreateHandle() Cannot create a handle without a HandleScope
 1: 0xa89e60 node::Abort() [node]
 2: 0x9ade29 node::FatalError(char const*, char const*) [node]
 3: 0xc7555a v8::Utils::ReportApiFailure(char const*, char const*) [node]
 4: 0xdfdde2 v8::internal::HandleScope::Extend(v8::internal::Isolate*) [node]
 5: 0xe10b7c v8::internal::FactoryBase<v8::internal::Factory>::NewRawOneByteString(int, v8::internal::AllocationType) [node]
 6: 0xe22b8e v8::internal::Factory::NewStringFromOneByte(v8::internal::Vector<unsigned char const> const&, v8::internal::AllocationType) [node]
 7: 0xc8cf72 v8::String::NewFromOneByte(v8::Isolate*, unsigned char const*, v8::NewStringType, int) [node]
 8: 0xc3a317 node::crypto::TLSWrap::InvokeQueued(int, char const*) [node]
 9: 0xc3a422  [node]
10: 0xc3a5e4 node::crypto::TLSWrap::~TLSWrap() [node]
11: 0xc3a751 node::crypto::TLSWrap::~TLSWrap() [node]
12: 0xa20c5b node::Environment::RunCleanup() [node]
13: 0x9d670c node::FreeEnvironment(node::Environment*) [node]
14: 0xacb25f node::NodeMainInstance::Run(node::EnvSerializeInfo const*) [node]
15: 0xa51d7a node::Start(int, char**) [node]
16: 0x7f6d63b5e09b __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
17: 0x9d072c  [node]
Aborted (core dumped)

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.tlsIssues and PRs related to the tls subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions