Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

napi: reduce gc finalization stress #27085

Closed
wants to merge 1 commit into from

Conversation

mhdawson
Copy link
Member

@mhdawson mhdawson commented Apr 4, 2019

#24494 fixed a crash
but resulted in increased stress on gc finalization. A leak
was reported in #26667 which
we are still investigating. As part of this investigation, I
realized we can optimize to reduce the amount of deferred finalization.
Regardless of the root cause of the leak this should be a
good optimization. It also resolves the leak for the case being
reported in #26667. The OP in #26667 has confirmed that he can
still recreate the original problem that #24494 fixed and that
the fix still works with this optimization

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot nodejs-github-bot added the c++ Issues and PRs that require attention from people who are familiar with C++. label Apr 4, 2019
@mhdawson mhdawson added node-api Issues and PRs related to the Node-API. addons Issues and PRs related to native addons. dont-land-on-v6.x labels Apr 4, 2019
@mscdex
Copy link
Contributor

mscdex commented Apr 4, 2019

s/finaliation/finalization/ in commit message

@mhdawson
Copy link
Member Author

mhdawson commented Apr 4, 2019

@mscdex thanks for catching that, fixed.

Copy link
Member

@bnoordhuis bnoordhuis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo in commit log: s/gcc/gc/

src/js_native_api_v8.cc Show resolved Hide resolved
nodejs#24494 fixed a crash
but resulted in increased stress on gc finalization. A leak
was reported in nodejs#26667 which
we are still investigating. As part of this investigation I
realized we can optimize to reduce amount of deferred finalization.
Regardless of the root cause of the leak this should be a
good optimization. It also resolves the leak for the case being
reported in nodejs#26667. The OP in 26667 has confirmed that he can
still recreate the original problem that 24494 fixed and that
the fix still works with this optimization
@mhdawson mhdawson changed the title napi: reduce gcc finaliation stress napi: reduce gc finaliation stress Apr 5, 2019
@mscdex mscdex changed the title napi: reduce gc finaliation stress napi: reduce gc finalization stress Apr 7, 2019
@mhdawson mhdawson added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 8, 2019
@mhdawson
Copy link
Member Author

mhdawson commented Apr 8, 2019

@nodejs-github-bot
Copy link
Collaborator

@danbev
Copy link
Contributor

danbev commented Apr 9, 2019

Landed in ff89670.

@danbev danbev closed this Apr 9, 2019
danbev pushed a commit that referenced this pull request Apr 9, 2019
#24494 fixed a crash
but resulted in increased stress on gc finalization. A leak
was reported in #26667 which
we are still investigating. As part of this investigation I
realized we can optimize to reduce amount of deferred finalization.
Regardless of the root cause of the leak this should be a
good optimization. It also resolves the leak for the case being
reported in #26667. The OP in 26667 has confirmed that he can
still recreate the original problem that 24494 fixed and that
the fix still works with this optimization

PR-URL: #27085
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
@mhdawson
Copy link
Member Author

mhdawson commented Apr 9, 2019

@danbev thanks for landing :)

@ricoli
Copy link

ricoli commented Sep 3, 2019

@danbev could this please be backported to node10?

@danbev
Copy link
Contributor

danbev commented Sep 5, 2019

@danbev could this please be backported to node10?

Sorry I don't have time to open a backport PR against 10 this week, but I'll try to do so next week unless someone beats me to it.

@mhdawson mhdawson deleted the napi-fin-reduce-stress branch September 30, 2019 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addons Issues and PRs related to native addons. author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. node-api Issues and PRs related to the Node-API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants