镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Environment class never cleans up UV handles except in cctest? #20517

Description

@MSLaguana
  • Version: 10.0.0
  • Platform: windows
  • Subsystem: env

While trying to improve the reliability of cctest in node-chakracore, I noticed that the node::Environment class sets up some libuv handles (e.g. the idle_check_handle_ and immediate_check_handle_) and registers them to be properly closed and cleaned up whenever Environment::FreeEnvironment is called, but that function is never run in a normal node session. The only time that function is invoked is during cctest.

Is this intentional? I ran into this because I was trying to make sure that when a node-chakracore Isolate is destructed it cleans up its own libuv handles, but when I was doing so I keep getting segfaults caused by libuv trying to use some of the Environment handles that had been freed but not cleaned up by libuv.

Activity

  1. added
    libuvIssues and PRs related to the libuv dependency or the uv binding.
    on May 4, 2018
  2. addaleax commented on May 4, 2018

    @addaleax
    Member

    I think #19377 is basically the fix for this issue? I’ll add a Fixes: tag there if that seems okay.

  3. MSLaguana commented on May 4, 2018

    @MSLaguana
    ContributorAuthor

    That does look like it addresses this issue. Thanks!

  4. added a commit that references this issue on May 14, 2018
  5. added a commit that references this issue on Jul 27, 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

    libuvIssues and PRs related to the libuv dependency or the uv binding.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions