You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Workers cannot shut down while requests are open, so keep a counter
that is increased whenever libuv requests are made and decreased
whenever their callback is called.
This also applies to other embedders, who may want to shut down
an `Environment` instance early.
Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.
Fixes: nodejs#20517
Refs: ayojs/ayo#85
Workers cannot shut down while requests are open, so keep a counter
that is increased whenever libuv requests are made and decreased
whenever their callback is called.
This also applies to other embedders, who may want to shut down
an `Environment` instance early.
Many thanks for Stephen Belanger for reviewing the original version of
this commit in the Ayo.js project.
Fixes: #20517
Refs: ayojs/ayo#85
PR-URL: #19377
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: James M Snell <jasnell@gmail.com>
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. theidle_check_handle_
andimmediate_check_handle_
) and registers them to be properly closed and cleaned up wheneverEnvironment::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.The text was updated successfully, but these errors were encountered: