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

test: fix test_worker_terminate_finalization #34726

Closed
wants to merge 1 commit into from

Conversation

addaleax
Copy link
Member

The test was missing an initialization of the global ref variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in nodejs#34625.
@addaleax addaleax added fast-track PRs that do not need to wait for 48 hours to land. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 11, 2020
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 11, 2020
@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Aug 11, 2020
@addaleax
Copy link
Member Author

Please 👍 to fast-track

@nodejs-github-bot
Copy link
Collaborator

@addaleax addaleax mentioned this pull request Aug 11, 2020
4 tasks
@addaleax addaleax added the node-api Issues and PRs related to the Node-API. label Aug 11, 2020
@jasnell
Copy link
Member

jasnell commented Aug 11, 2020

Ok, now I'm really curious why this wasn't failing consistently in other CI runs! So happy you found this!

@addaleax addaleax added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 11, 2020
@addaleax
Copy link
Member Author

Ok, now I'm really curious why this wasn't failing consistently in other CI runs! So happy you found this!

I think your PR changes GC timing in some way – previously, the finalizer was run during shutdown, where no JS calls are allowed anyway (i.e. the NAPI_PREAMBLE in napi_throw_error() prevents the function from doing anything but failing). With your PR, the finalizer is scheduled to run from actual GC on some platforms, so it can cause uncaught exceptions in JS.

addaleax added a commit that referenced this pull request Aug 11, 2020
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

PR-URL: #34726
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
@addaleax
Copy link
Member Author

Landed in 9f47e5a, thanks for the quick reviews!

@addaleax addaleax closed this Aug 11, 2020
@addaleax addaleax deleted the blörp branch August 11, 2020 16:05
MylesBorins pushed a commit that referenced this pull request Aug 17, 2020
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

PR-URL: #34726
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
@danielleadams danielleadams mentioned this pull request Aug 20, 2020
BethGriggs pushed a commit that referenced this pull request Aug 20, 2020
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

PR-URL: #34726
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

PR-URL: #34726
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
addaleax added a commit that referenced this pull request Sep 22, 2020
The test was missing an initialization of the global `ref` variable
because there was also an unused local one, leading to failures
like the one seen in #34625.

PR-URL: #34726
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ricky Zhou <[email protected]>
@codebytere codebytere mentioned this pull request Sep 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
author ready PRs that have at least one approval, no pending requests for changes, and a CI started. fast-track PRs that do not need to wait for 48 hours to land. node-api Issues and PRs related to the Node-API. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants