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

deps: update V8 to 9.1 #38273

Merged
merged 20 commits into from
Jun 10, 2021
Merged

deps: update V8 to 9.1 #38273

merged 20 commits into from
Jun 10, 2021

Conversation

targos
Copy link
Member

@targos targos commented Apr 17, 2021

No description provided.

@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 17, 2021
@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Apr 17, 2021
@nodejs-github-bot
Copy link
Collaborator

nodejs-github-bot commented Apr 17, 2021

@targos targos added the wip Issues and PRs that are still a work in progress. label Apr 17, 2021
@targos
Copy link
Member Author

targos commented Apr 18, 2021

V8 tests don't pass on PPCLE: https://ci.nodejs.org/job/node-test-commit-v8-linux/3934/

/cc @nodejs/platform-ppc

@targos
Copy link
Member Author

targos commented Apr 18, 2021

test/v8-updates/test-linux-perf fails all the time now. See nodejs/node-v8#198

@targos
Copy link
Member Author

targos commented Apr 18, 2021

There's a problem with --abort-on-uncaught-exception on Windows. See nodejs/node-v8#197

@richardlau
Copy link
Member

richardlau commented Apr 18, 2021

@miladfarca
Copy link
Contributor

@richardlau that's right, above CL needs to be cherrypicked. V8 has started to get rid of its Simd lowering pipeline, meaning platforms without the support will not be able to run the tests. Are these machines on power 8 or 9?

@richardlau
Copy link
Member

Are these machines on power 8 or 9?

@miladfarca Looks like Power 8:

$ cat /proc/cpuinfo 
processor	: 0
cpu		: POWER8 (architected), altivec supported
clock		: 3425.000000MHz
revision	: 2.1 (pvr 004b 0201)

processor	: 1
cpu		: POWER8 (architected), altivec supported
clock		: 3425.000000MHz
revision	: 2.1 (pvr 004b 0201)

processor	: 2
cpu		: POWER8 (architected), altivec supported
clock		: 3425.000000MHz
revision	: 2.1 (pvr 004b 0201)

processor	: 3
cpu		: POWER8 (architected), altivec supported
clock		: 3425.000000MHz
revision	: 2.1 (pvr 004b 0201)

timebase	: 512000000
platform	: pSeries
model		: IBM pSeries (emulated by qemu)
machine		: CHRP IBM pSeries (emulated by qemu)
$

@targos
Copy link
Member Author

targos commented Apr 18, 2021

above CL needs to be cherrypicked.

Is it going to happen upstream or do I need to cherry-pick it here?

@miladfarca
Copy link
Contributor

@targos its better to cherry pick it here as we might need to make changes to this upstream.

@miladfarca
Copy link
Contributor

@richardlau thanks for confirming.

@targos
Copy link
Member Author

targos commented Apr 19, 2021

Ok, I backported the commit. I saw that the skip was reverted on V8 recently. Does it mean that we're going to have to keep the backport in node forever?

@miladfarca
Copy link
Contributor

@targos We have recently turned this feature on for Power 9 machines (and up) and reverted the mentioned CL as our internal test bots are mostly p9. We will either need to turn on the feature for p8 as well or skip the tests on p8 and below.

@targos
Copy link
Member Author

targos commented Apr 24, 2021

The behavior change for --abort-on-uncaught-exception on Windows was probably introduced by v8/v8@26d85ac.
Unfortunately, it references a private Google Doc for detailed explanation.

In our tests, we verify that the exit code is 0xC0000005 (access violation), but now it is 0x80000003 (exception breakpoint).
Can we just change our tests? /cc @nodejs/platform-windows

node/test/common/index.js

Lines 482 to 488 in 720fdf2

// On Windows, 'aborts' are of 2 types, depending on the context:
// (i) Forced access violation, if --abort-on-uncaught-exception is on
// which corresponds to exit code 3221225477 (0xC0000005)
// (ii) Otherwise, _exit(134) which is called in place of abort() due to
// raising SIGABRT exiting with ambiguous exit code '3' by default
if (isWindows)
expectedExitCodes = [0xC0000005, 134];

@targos
Copy link
Member Author

targos commented Apr 24, 2021

About the Linux perf issue, INTERPRETED_FUNCTION_TAG was removed in v8/v8@9a31804

Here are the logs of the test with v16.0.0 vs this PR:

/cc @nodejs/diagnostics

@miladfarca
Copy link
Contributor

@targos is it possible to cherry pick this CL as well: https://chromium-review.googlesource.com/c/v8/v8/+/2855041
It adds P10 to the list of supported processors on ppc.
I will also need to also backport it to LTS branches (12, 14 and 16).

@miladfarca
Copy link
Contributor

@targos I have crated these 3 PRs to backport above request to node 16, 14 and 12:
#38489
#38508
#38509

Please do let me know if I need to backport the same CL to V8 stable and beta branches, or if cherry picking it here would be enough?

@targos
Copy link
Member Author

targos commented May 3, 2021

@miladfarca backporting to V8 beta would be better but if it doesn't happen, I'll add it here.

@miladfarca
Copy link
Contributor

miladfarca commented May 3, 2021

@targos no issues I will backport it to V8 beta.

@targos
Copy link
Member Author

targos commented May 17, 2021

@miladfarca did it happen?

@miladfarca
Copy link
Contributor

@targos yes it was backported to V8 9.1 here:
https://chromium-review.googlesource.com/c/v8/v8/+/2876988

danielleadams pushed a commit that referenced this pull request Jun 17, 2021
Refs: v8/v8@40e499c

PR-URL: #38273
Backport-PR-URL: #38991
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
danielleadams pushed a commit that referenced this pull request Jun 17, 2021
Refs: v8/v8@9a31804

PR-URL: #38273
Backport-PR-URL: #38991
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
danielleadams pushed a commit that referenced this pull request Jun 17, 2021
V8 9.1 changed the way it aborts on uncaught exceptions on Windows.
It now uses the code 0x80000003 (exception breakpoint) instead of
0xC0000005 (access violation).

Refs: v8/v8@26d85ac

PR-URL: #38273
Backport-PR-URL: #38991
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Mary Marchini <[email protected]>
danielleadams added a commit that referenced this pull request Jun 17, 2021
Notable changes:

* deps:
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 21, 2021
Notable changes:

* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 21, 2021
Notable changes:

* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 22, 2021
Notable changes:

* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 22, 2021
Notable changes:

* async_hooks:
  * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675
* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 22, 2021
PR-URL: #39031

Notable changes:

* async_hooks:
  * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675
* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099
danielleadams added a commit that referenced this pull request Jun 22, 2021
Notable changes:

* async_hooks:
  * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675
* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099

PR-URL: #39031
danielleadams added a commit that referenced this pull request Jun 23, 2021
Notable changes:

* async_hooks:
  * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675
* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099

PR-URL: #39031
danielleadams added a commit that referenced this pull request Jun 23, 2021
Notable changes:

* async_hooks:
  * stabilize part of AsyncLocalStorage (Vladimir de Turckheim) #37675
* deps:
  * upgrade npm to 7.18.1 (npm-robot) #39065
  * update V8 to 9.1.269.36 (Michaël Zasso) #38273
* dns:
  * allow `--dns-result-order` to change default dns verbatim (Ouyang Yadong) #38099

PR-URL: #39031
codebytere added a commit to electron/electron that referenced this pull request Jun 24, 2021
codebytere added a commit to electron/electron that referenced this pull request Jun 24, 2021
connor4312 pushed a commit to microsoft/vscode-js-debug that referenced this pull request Jun 27, 2021
Since the said issue is resolved and shipped in 16.4, Suggesting users to downgrade is a bad idea, instead they should be recommended to upgrade to the latest release to resolve this issue.

Reference: nodejs/node#38273
richardlau pushed a commit that referenced this pull request Jul 19, 2021
PR #38000 added
indirection so that we could stop finalization in
cases where it had been scheduled in a second
pass callback but we were doing it in advance in
environment teardown.

Unforunately we missed that the code which tries
to clear the second pass parameter checked if
the pointer to the parameter (_secondPassParameter)
was nullptr and that when the second pass callback
was scheduled we set _secondPassParameter to nullptr
in order to avoid it being deleted outside of the second
pass callback. The net result was that we
would not clear the _secondPassParameter contents
and failed to avoid the Finalization in the second pass
callback.

This PR adds an additional boolean for deciding if
the secondPassParameter should be deleted outside
of the second pass callback instead of setting
secondPassParameter to nullptr thus avoiding the
conflict between the 2 ways it was being used.

See the discussion starting at:
#38273 (comment)
for how this was discovered on OSX while trying to
upgrade to a new V8 version.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #38899
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 19, 2021
Refs: nodejs#38273 (comment)

PR-URL: nodejs#38811
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
richardlau pushed a commit that referenced this pull request Jul 20, 2021
PR #38000 added
indirection so that we could stop finalization in
cases where it had been scheduled in a second
pass callback but we were doing it in advance in
environment teardown.

Unforunately we missed that the code which tries
to clear the second pass parameter checked if
the pointer to the parameter (_secondPassParameter)
was nullptr and that when the second pass callback
was scheduled we set _secondPassParameter to nullptr
in order to avoid it being deleted outside of the second
pass callback. The net result was that we
would not clear the _secondPassParameter contents
and failed to avoid the Finalization in the second pass
callback.

This PR adds an additional boolean for deciding if
the secondPassParameter should be deleted outside
of the second pass callback instead of setting
secondPassParameter to nullptr thus avoiding the
conflict between the 2 ways it was being used.

See the discussion starting at:
#38273 (comment)
for how this was discovered on OSX while trying to
upgrade to a new V8 version.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #38899
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 20, 2021
Refs: nodejs#38273 (comment)

PR-URL: nodejs#38811
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
aduh95 pushed a commit to aduh95/node that referenced this pull request Jul 20, 2021
Refs: nodejs#38273 (comment)

PR-URL: nodejs#38811
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
richardlau pushed a commit that referenced this pull request Jul 22, 2021
Refs: #38273 (comment)

PR-URL: #38811
Backport-PR-URL: #39446
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
richardlau pushed a commit that referenced this pull request Jul 22, 2021
Refs: #38273 (comment)

PR-URL: #38811
Backport-PR-URL: #39446
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
PR nodejs#38000 added
indirection so that we could stop finalization in
cases where it had been scheduled in a second
pass callback but we were doing it in advance in
environment teardown.

Unforunately we missed that the code which tries
to clear the second pass parameter checked if
the pointer to the parameter (_secondPassParameter)
was nullptr and that when the second pass callback
was scheduled we set _secondPassParameter to nullptr
in order to avoid it being deleted outside of the second
pass callback. The net result was that we
would not clear the _secondPassParameter contents
and failed to avoid the Finalization in the second pass
callback.

This PR adds an additional boolean for deciding if
the secondPassParameter should be deleted outside
of the second pass callback instead of setting
secondPassParameter to nullptr thus avoiding the
conflict between the 2 ways it was being used.

See the discussion starting at:
nodejs#38273 (comment)
for how this was discovered on OSX while trying to
upgrade to a new V8 version.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs#38899
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
foxxyz pushed a commit to foxxyz/node that referenced this pull request Oct 18, 2021
Refs: nodejs#38273 (comment)

PR-URL: nodejs#38811
Backport-PR-URL: nodejs#39446
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: Gerhard Stöbich <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
@3228689373
Copy link

I meet this too:

^M^M[00:00|% 0|+ 0|- 0]: release test-linux-perf^M ^M=== release test-linux-perf ===
Path: v8-updates/test-linux-perf
node:assert:400
throw err;
^

AssertionError [ERR_ASSERTION]: Couldn't find interpreted functionOne()
Perf output:

node 9465 690874.279801: 10101010 cpu-clock:
7fff99e77d07 __do_page_fault ([kernel.kallsyms])
7fff99e77fee do_page_fault ([kernel.kallsyms])
7fff9a803635 page_fault ([kernel.kallsyms])
eb21b5 v8::internal::Deserializerv8::internal::Isolate::ReadObject (/mnt/sdb/NVNODE/node4/node-master/out/Release/node)

node-master# ./node
Welcome to Node.js v18.0.0-pre.
Type ".help" for more information.

legendecas pushed a commit to legendecas/node that referenced this pull request Mar 29, 2022
PR nodejs#38000 added
indirection so that we could stop finalization in
cases where it had been scheduled in a second
pass callback but we were doing it in advance in
environment teardown.

Unforunately we missed that the code which tries
to clear the second pass parameter checked if
the pointer to the parameter (_secondPassParameter)
was nullptr and that when the second pass callback
was scheduled we set _secondPassParameter to nullptr
in order to avoid it being deleted outside of the second
pass callback. The net result was that we
would not clear the _secondPassParameter contents
and failed to avoid the Finalization in the second pass
callback.

This PR adds an additional boolean for deciding if
the secondPassParameter should be deleted outside
of the second pass callback instead of setting
secondPassParameter to nullptr thus avoiding the
conflict between the 2 ways it was being used.

See the discussion starting at:
nodejs#38273 (comment)
for how this was discovered on OSX while trying to
upgrade to a new V8 version.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs#38899
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
richardlau pushed a commit that referenced this pull request Mar 30, 2022
PR #38000 added
indirection so that we could stop finalization in
cases where it had been scheduled in a second
pass callback but we were doing it in advance in
environment teardown.

Unforunately we missed that the code which tries
to clear the second pass parameter checked if
the pointer to the parameter (_secondPassParameter)
was nullptr and that when the second pass callback
was scheduled we set _secondPassParameter to nullptr
in order to avoid it being deleted outside of the second
pass callback. The net result was that we
would not clear the _secondPassParameter contents
and failed to avoid the Finalization in the second pass
callback.

This PR adds an additional boolean for deciding if
the secondPassParameter should be deleted outside
of the second pass callback instead of setting
secondPassParameter to nullptr thus avoiding the
conflict between the 2 ways it was being used.

See the discussion starting at:
#38273 (comment)
for how this was discovered on OSX while trying to
upgrade to a new V8 version.

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #38899
Backport-PR-URL: #42512
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.