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

[async_wrap] backport of gc abort on destroy() fix on v6.x #10096

Closed

Conversation

trevnorris
Copy link
Contributor

Checklist
  • make -j8 test (UNIX), or vcbuild test nosign (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

async_wrap

Description of change

This is a backport of 517e3a6, cf5f4b8 and b49b496 to v6.x

This is semi-urgent. In the issues listed as Fixed in the commit shows the process is aborting in v6. So we can weight the urgency of landing this vs the possible regression it may introduce. Note that there could only be a regression if the user is using process.binding('async_wrap'). Otherwise all the changed logic is skipped.

The constructor and destructor shouldn't have been placed in the -inl.h
file from the beginning.

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This is how it's done everywhere else in core. Make it follow suit.

Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Calling JS during GC is a no-no. So intead create a queue of all ids
that need to have their destroy() callback called and call them later.

Removed checking destroy() in test-async-wrap-uid because destroy() can
be called after the 'exit' callback.

Missing a reliable test to reproduce the issue that caused the
FATAL_ERROR.

Fixes: nodejs#8216
Fixes: nodejs#9465
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. v6.x labels Dec 2, 2016
@MylesBorins
Copy link
Contributor

MylesBorins commented Dec 2, 2016

@nodejs/ctc @nodejs/lts are people opposed to this landing onto v6.x-staging and included in the release on Tuesday?

CI: https://ci.nodejs.org/job/node-test-pull-request/5126/

@MylesBorins MylesBorins self-assigned this Dec 2, 2016
@addaleax
Copy link
Member

addaleax commented Dec 2, 2016

Landing this on v6.x-staging and including it in the next release sounds good to me. I would guess this should also even happen for v4?

@MylesBorins
Copy link
Contributor

To clarify... if we land this in v6.x on Tuesday it will have not been out in a release before landing in LTS. @trevnorris had suggested this would be reasonable as this change only affects users of an undocumented api

@trevnorris
Copy link
Contributor Author

@addaleax Has been backported to v4 (see #10097). Though releasing this on v4 isn't as urgent as releasing it on v6. Should be able to take the normal LTS release path.

@mscdex mscdex changed the title [aysnc_wrap] backport of gc abort on destroy() fix on v6.x [async_wrap] backport of gc abort on destroy() fix on v6.x Dec 2, 2016
@MylesBorins
Copy link
Contributor

There were 4 failures on smart os

https://ci.nodejs.org/job/node-test-commit-smartos/5478/nodes=smartos15-64/tapTestReport/

@trevnorris are these related? /cc @nodejs/platform-smartos

@addaleax
Copy link
Member

addaleax commented Dec 5, 2016

These don’t look related to me. Here’s another CI run: https://ci.nodejs.org/job/node-test-commit/6438/

@jasnell
Copy link
Member

jasnell commented Dec 6, 2016

Seems like a good idea to get this landed. LGTM

@MylesBorins
Copy link
Contributor

landed in 59d8255...72595f7

@MylesBorins MylesBorins closed this Dec 6, 2016
MylesBorins pushed a commit that referenced this pull request Dec 6, 2016
The constructor and destructor shouldn't have been placed in the -inl.h
file from the beginning.

PR-URL: #10096
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Dec 6, 2016
This is how it's done everywhere else in core. Make it follow suit.

PR-URL: #10096
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
MylesBorins pushed a commit that referenced this pull request Dec 6, 2016
Calling JS during GC is a no-no. So intead create a queue of all ids
that need to have their destroy() callback called and call them later.

Removed checking destroy() in test-async-wrap-uid because destroy() can
be called after the 'exit' callback.

Missing a reliable test to reproduce the issue that caused the
FATAL_ERROR.

PR-URL: #10096
Fixes: #8216
Fixes: #9465
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
@MylesBorins MylesBorins mentioned this pull request Dec 6, 2016
@trevnorris
Copy link
Contributor Author

@thealphanerd This has a bug that's fixed by #10400. Leave it to me to make an seemingly innocuous change that totally fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c++ Issues and PRs that require attention from people who are familiar with C++.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants