Uh oh!
There was an error while loading. Please reload this page.
src: unload native addons when the environment is destroyed - #24861
src: unload native addons when the environment is destroyed#24861gabrielschulhof wants to merge 5 commits into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
bc80971 to
5e44c8bComparegabrielschulhof
commented
Dec 6, 2018
@joyeecheung I have addressed your review comments. @bnoordhuis I have addressed your review comments. I put the body of |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Originally from portions of nodejs#23319.
This is an alternative to nodejs#23319 which attaches the loaded addons to the environment and closes them when the environment is destroyed.
5e44c8b to
df7aa7aCompareUh oh!
There was an error while loading. Please reload this page.
bbea5f8 to
584f643Comparegabrielschulhof
commented
Dec 11, 2018
gabrielschulhof
commented
Dec 11, 2018
Failure looks legit. |
gabrielschulhof
commented
Dec 11, 2018
Resume, just to see if it's 100% reproducible: |
addaleax
commented
Dec 15, 2018
Trott
commented
Dec 16, 2018
Fresh CI rather than Resume Build so that it pulls in the fact that a bunch of tests are currently marked flaky: https://ci.nodejs.org/job/node-test-pull-request/19572/ |
Trott
commented
Dec 16, 2018
Any chance that this AIX failure is related? 16:58:17 not ok 2208 addons/at-exit/test16:58:17 ---16:58:17 duration_ms: 0.72316:58:17 severity: crashed16:58:17 exitcode: -416:58:17 stack: |-16:58:17 ...I'm guessing not, but you tell me. ¯\(ツ)/¯ In the meantime, Resume Build CI: https://ci.nodejs.org/job/node-test-pull-request/19573/ |
addaleax
commented
Dec 16, 2018
@Trott I’m not sure whether we should wait for the outcome of the resume build (run stress tests if it comes back green?), but before/after stress tests with a hundred runs or so might be helpful? |
Trott
commented
Dec 16, 2018
I guess if we're going to tie up an AIX machine for a few hours doing a stress test, this is the time of day/week to do it, so here we go: Stress test on master: https://ci.nodejs.org/job/node-stress-single-test/2128/ Stress test on this PR: https://ci.nodejs.org/job/node-stress-single-test/2129/ |
Trott
commented
Dec 16, 2018
CI Resume Build for AIX showed the same addons failure. https://ci.nodejs.org/job/node-test-commit-aix/19762/nodes=aix61-ppc64/console 18:59:40 not ok 2208 addons/at-exit/test18:59:40 ---18:59:40 duration_ms: 0.91818:59:40 severity: crashed18:59:40 exitcode: -418:59:40 stack: |-18:59:40 ...Still awaiting stress test for this PR to start, but stress test on master is clean so far after almost 900 runs. (It's set to do 1000.) |
Trott
left a comment
There was a problem hiding this comment.
Stress test is crashing on addons/at-exit/test 100% of the time after 400+ runs on AIX. Impressed/weirded-out that this issue is AIX only. But I guess it needs to be sorted out before landing...
20:22:34 not ok 1 addons/at-exit/test20:22:34 ---20:22:34 duration_ms: 0.57320:22:34 severity: crashed20:22:34 exitcode: -420:22:34 stack: |-20:22:34 ...MylesBorins
commented
Dec 26, 2018
This change broke the It seems that is was somehow related to nan? Fix landed in nan and awaiting a release nodejs/nan#831 Would someone be willing to open a backport so we can track the progress? |
addaleax
commented
Dec 26, 2018
@MylesBorins This seems very unlikely … can you double-check and maybe share how you tested this?
That PR was opened before this one landed and the contents seem very much unrelated… |
Originally from portions of nodejs#23319. PR-URL: nodejs#24861 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This is an alternative to nodejs#23319 which attaches the loaded addons to the environment and closes them when the environment is destroyed. PR-URL: nodejs#24861 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Originally from portions of nodejs#23319. PR-URL: nodejs#24861 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This is an alternative to nodejs#23319 which attaches the loaded addons to the environment and closes them when the environment is destroyed. PR-URL: nodejs#24861 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
BridgeAR
commented
Jan 18, 2019
This has been backported and released in v11.7.0 but it turned out that this actually breaks node-report. Therefore I am going to remove the backport again and release v11.7.1 without this. |
addaleax
commented
Jan 18, 2019
I’m sorry that I did not add a test case for the issue we’re seeing with node-report when I wrote the original PR at #23319 – I’ve opened #25577 to address it. (This does not mean that this is not a bug in |
richardlau
commented
Jan 19, 2019
If it's something we can improve, please report/submit a PR over in https://github.com/nodejs/node-report. Note that one of the issues with addons and |
addaleax
commented
Jan 19, 2019
@richardlau I can try to do that, but given the work on integrating it into core in #22712, I don’t think I’d personally want to spend much time on the npm module… the first problem I encountered here is that (Also, it’s absolutely understandable if you’re not interested in going through the nearly one thousand comments in #22712, but there’s a lot in there that applies to the npm module as well, including this issue iirc.) |
Unloading native addons from the main thread was an (presumably unintended) significant breaking change, because addons may rely on their memory being available after an `Environment` exits. This patch only restricts this to Worker threads, at least for the time being, and thus matches the behaviour from nodejs#23319. Refs: nodejs#24861 Refs: nodejs#23319
Unloading native addons from the main thread was an (presumably unintended) significant breaking change, because addons may rely on their memory being available after an `Environment` exits. This patch only restricts this to Worker threads, at least for the time being, and thus matches the behaviour from #23319. PR-URL: #25577 Refs: #24861 Refs: #23319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Unloading native addons from the main thread was an (presumably unintended) significant breaking change, because addons may rely on their memory being available after an `Environment` exits. This patch only restricts this to Worker threads, at least for the time being, and thus matches the behaviour from #23319. PR-URL: #25577 Refs: #24861 Refs: #23319 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
This is an alternative to #23319
which attaches the loaded addons to the environment and closes them
when the environment is destroyed.
It includes the test/addons/worker-addon,
test/addons/hello-world/test-worker.js and the documentation update from the original PR written
by @addaleax in a separate commit.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes