nodejs / node

Node.js JavaScript runtime ✨🐢🚀✨
https://nodejs.org
Other
105.1k stars 28.47k forks source link

TypeError: ssl.destroySSL is not a function #53660

Open Fusl opened 2 days ago

Fusl commented 2 days ago

Version

v20.13.1

Platform

4.14.345-262.561.amzn2.x86_64 #1 SMP Fri May 31 18:15:42 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
Running inside Docker image built from docker.io/node:20.13.1-bookworm-slim

Subsystem

tls

What steps will reproduce the bug?

No response

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

No response

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

No response

What do you see instead?

node:_tls_wrap:650
      ssl.destroySSL();
          ^

TypeError: ssl.destroySSL is not a function
    at TCP.done (node:_tls_wrap:650:11)

Additional information

Randomly throughout the day, multiple Node.js instances from our fleet of servers are simultaneously terminating after throwing the error with the provided stack trace pointing towards this ssl.destroySSL() call in _tls_wrap.js.

We're not 100% sure that this is a bug in Node.js since we weren't able to pinpoint this issue to a specific part of our codebase and couldn't find a reproduction case yet but we plan on rolling out an update that enables the NODE_DEBUG=tls option to gather more information.

juanarbol commented 2 days ago

Hey. Thanks for the report.

You could also increase the stack trace size to get more information about the error.

node --stack-trace-limit=100 or something like that

RedYetiDev commented 8 hours ago

Could you possibly provide more information about what code caused this? A larger stack trace (as @juanarbol mentioned) might help as well.