Skip to content

test-process-active-wraps fails on windows #246

Description

@piscisaureus

Tracked in node: nodejs/node-v0.x-archive#8986

According to @cjihrig:

The problem seems to be the removal of this logic.

The problem is likely due to the DNS resolution that's now needed, so net.js postpones TCPWrap creation, now doing it on the same loop turn in which the assertion is done.

Activity

  1. added this to the milestone on Jan 7, 2015
  2. cjihrig commented on Jan 7, 2015

    @cjihrig
    Contributor
  3. piscisaureus commented on Jan 7, 2015

    @piscisaureus
    ContributorAuthor

    @cjihrig Is there any motivation for that revert, other than just to make the test pass.

    It's quite easy to make the test pass. Just do:
    setTimeout(function() { setInterval(function() { ... do the check here ... }); }, 10);

    That gives the event loop enough time to clean up the TCPWrap object.

  4. cjihrig commented on Jan 7, 2015

    @cjihrig
    Contributor

    @piscisaureus yes, the revert was done to get everything back to passing. I originally tried adding a setTimeout() of 5 seconds around the setImmediate(). The test still failed - the server handle was cleaned up, but the timeout was lingering.

    The test does pass if I add a setTimeout() AND a setImmediate() around the original setImmediate(), but that just seems so hacky.

  5. piscisaureus commented on Jan 7, 2015

    @piscisaureus
    ContributorAuthor

    @cjihrig
    If that (now reverted) patch made node better, put it back and fix the test in the hacky way.
    The test is quite questionable - the _getActiveHandles() and _getActiveRequests() APIs are there for debugging only, node makes no guarantees about their contents. It just happens to be that Timer handles end up in that list and Immediate handles don't. And that on windows the TCPWrap might live a bit longer than on unix.

  6. piscisaureus commented on Jan 8, 2015

    @piscisaureus
    ContributorAuthor

    Fixed in b5c9dcb

  7. added a commit that references this issue on May 11, 2026
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions