Sitelet https://github.com/nodejs/node/issues/48763
Skip to content

ERR_INTERNAL_ASSERTION in internalConnectMultiple #48763

Description

@hp8wvvvgnj6asjm7

Version

v20.4.0

Platform

Microsoft Windows NT 10.0.19044.0 x64

Subsystem

No response

What steps will reproduce the bug?

I'm running a worker thread(s) which runs an openWebsocket and passes messages to the main thread via postmessage.
I don't get any messages and after a few minutes, I get this error:

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?

Error: This is caused by either a bug in Node.js or incorrect usage of Node.js internals.
Please open an issue with this stack trace at https://github.com/nodejs/node/issues

    at new NodeError (node:internal/errors:405:5)
    at assert (node:internal/assert:14:11)
    at internalConnectMultiple (node:net:1115:3)
    at Timeout.internalConnectMultipleTimeout (node:net:1683:3)
    at listOnTimeout (node:internal/timers:575:11)
    at processTimers (node:internal/timers:514:7) {
  code: 'ERR_INTERNAL_ASSERTION'
}
Trace:
    at error (C:\Users\_\Desktop\sys\core.ts:3963:25)
    at Worker.<anonymous> (C:\Users\_\Desktop\sys\core.ts:3894:95)
    at Worker.emit (node:events:512:28)
    at Worker.[kOnErrorMessage] (node:internal/worker:326:10)
    at Worker.[kOnMessage] (node:internal/worker:337:37)
    at MessagePort.<anonymous> (node:internal/worker:232:57)
    at MessagePort.[nodejs.internal.kHybridDispatch] (node:internal/event_target:778:20)
    at MessagePort.exports.emitMessage (node:internal/per_context/messageport:23:28)

Additional information

No response

Activity

  1. debadree25 commented on Jul 14, 2023

    @debadree25
    Contributor

    Could you provide any sample code to reproduce? preferably without any dependencies!

  2. tniessen commented on Jul 14, 2023

    @tniessen
    Member

    Possibly related to #47644? It might not be a duplicate because #47644 was allegedly fixed (more than once). cc @ShogunPanda

  3. ShogunPanda commented on Jul 18, 2023

    @ShogunPanda
    Contributor

    I can't really do anything without at least a repro code. Will standby this.

  4. tniessen commented on Aug 30, 2023

    @tniessen
    Member

    According to @Rand0mF's #47644 (comment), this also happens without using worker threads or web sockets.

  5. ShogunPanda commented on Sep 11, 2023

    @ShogunPanda
    Contributor

    If the bug is related to my changes (which most likely is), it's unrelated to either worker threads or websocket as we're talking about a bug in the connection handling. But I need the exact scenario to reproduce it, unfortunately.

  6. tniessen commented on Nov 22, 2023

    @tniessen
    Member

    @hp8wvvvgnj6asjm7 Has the issue been resolved?

  7. added
    netIssues and PRs related to the net subsystem.
    on Nov 22, 2023
  8. hp8wvvvgnj6asjm7 commented on Nov 22, 2023

    @hp8wvvvgnj6asjm7
    Author

    @hp8wvvvgnj6asjm7 Has the issue been resolved?

    no, but I can't make a small reproducible example and its so random that it's hard to tell what is going on.

  9. changed the title [-]ERR_INTERNAL_ASSERTION with workers and websockets[/-] [+]ERR_INTERNAL_ASSERTION in internalConnectMultiple[/+] on Dec 2, 2023
  10. ShogunPanda commented on Dec 22, 2023

    @ShogunPanda
    Contributor

    This should have been fixed in #51045. Once it gets in 21.x or 20.x please let me know if you have additional problems.

  11. added a commit that references this issue on Jan 2, 2024
  12. added a commit that references this issue on Mar 25, 2024
  13. marked INTERNAL ASSERTION ERROR #57230 as a duplicate of this issue on Feb 28, 2025
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.netIssues and PRs related to the net subsystem.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions