-
Notifications
You must be signed in to change notification settings - Fork 461
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
Fix ObjectWrap destructor from env exit under node_g #729
Fix ObjectWrap destructor from env exit under node_g #729
Conversation
@davedoesdev thanks for submitting a PR for this. Does the stack trace suggest is occurring from a path triggered by the gc. I've not had time yet but wanted to think through if it was a concern or not if that was occurring (also away for next few days so will probably be mid next week before I find time). |
@mhdawson it looks like it's when the environment is closing due to the worker thread exiting. |
@mhdawson the test also fails under Node 12.16.3 release build! |
Spent some time looking at this see nodejs/node#33508 |
@davedoesdev nodejs/node#33508 just landed which should fix the reported problem (it will need to land in 14.x and 12.x as well). I still think adding the test on the node-addon-api side makes sense in addition to the one in core. Can you remove the non-test change and then we'll get it landed once the core backports are complete. |
@mhdawson done |
@davedoesdev thanks, may be a while before we can land as we have to wait for Node.js backports but thanks for all of your working finding and helping to resolve. Much appreciated. |
@mhdawson no worries. Any rough ETA? |
@davedoesdev sorry for the late update. Looks like its been backported as far back as 12.x. I can't remember if we thought it would apply to 10.x but if you update the PR to just add the test we can run the CI and confirm one way or the other, and if not land it. |
@mhdawson PR should already have been updated to contain just the test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@davedoesdev any chance you can rebase seems like it needs one now. |
Failure on windows for different test so unrelated to this PR. @gabrielschulhof would this be related to any of the recent finalizer/timing changes you had looked at?
|
That same test seems to have failed on other platforms as well. Might be related to me running this on the PR branch which may be missing some of the latest changes. I'll try again after a rebase. |
@mhdawson rebased |
Signed-off-by: Michael Dawson <[email protected]>
Added commit to only run on Node.js 12 and higher as it requires worker threads |
Add test for ObjectWrap destructor (no HandleScope exception) REFS: #722 PR-URL: #729 Reviewed-By: Michael Dawson <[email protected]>
Landed as: 518cfdc |
Thanks for all your work on this @davedoesdev |
@mhdawson thanks for merging |
Add test for ObjectWrap destructor (no HandleScope exception) REFS: nodejs/node-addon-api#722 PR-URL: nodejs/node-addon-api#729 Reviewed-By: Michael Dawson <[email protected]>
Add test for ObjectWrap destructor (no HandleScope exception) REFS: nodejs/node-addon-api#722 PR-URL: nodejs/node-addon-api#729 Reviewed-By: Michael Dawson <[email protected]>
Add test for ObjectWrap destructor (no HandleScope exception) REFS: nodejs/node-addon-api#722 PR-URL: nodejs/node-addon-api#729 Reviewed-By: Michael Dawson <[email protected]>
Add test for ObjectWrap destructor (no HandleScope exception) REFS: nodejs/node-addon-api#722 PR-URL: nodejs/node-addon-api#729 Reviewed-By: Michael Dawson <[email protected]>
Only fails under debug buildtype (node_g)
Update: Also fails using release 12.16.3
#722