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

[8.x] deps: V8: backport 49712d8a from upstream #21334

Closed
wants to merge 1 commit into from

Conversation

ofrobots
Copy link
Contributor

@ofrobots ofrobots commented Jun 14, 2018

Original commit message:

[wasm] Call AsyncInstantiate directly when instantiating a module object

WebAssembly.instantiate is polymorphic, it can either take a module
object as parameter, or a buffer source which should be compiled first.
To share code between the two implementations, the module object was
first passed to a promise (i.e. which is the result of compilation).
However, passing the module object to a promise has a side effect if
the module object has a then function. To avoid this side effect I
remove this code sharing and call AsyncInstantiate directly in case
the parameter is a module object.

R=mstarzinger@chromium.org

Bug: chromium:836141
Change-Id: I67b76d0d7761c5aeb2cf1deda45b6842e494eed4
Reviewed-on: https://chromium-review.googlesource.com/1025774
Reviewed-by: Michael Starzinger mstarzinger@chromium.org
Commit-Queue: Andreas Haas ahaas@chromium.org
Cr-Commit-Position: refs/heads/master@{#52755}

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

This effects 9.x as well, but I expect it is not worthwhile fixing there at this point.

/cc @nodejs/v8-update

V8-CI: https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1425/

@nodejs-github-bot nodejs-github-bot added v8 engine Issues and PRs related to the V8 dependency. v8.x labels Jun 14, 2018
Local<Value> ffi = args[1];
i::Handle<i::Object> first_arg = Utils::OpenHandle(*first_arg_value);
if (!first_arg->IsJSObject()) {
>>>>>>>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like some merge conflicts sneaked in.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes. Fixed.

@ofrobots ofrobots changed the title [8.x] deps: V8: cherrypick 49712d8a from upstream [8.x] deps: V8: backport 49712d8a from upstream Jun 18, 2018
@ofrobots
Copy link
Contributor Author

Fixed the merge conflict. This didn't land cleanly on 8.x and tweaks were necessary. Changed title from cherry-pick to a backport.

CI: https://ci.nodejs.org/job/node-test-pull-request/15511/
V8-CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/1440/

@ofrobots
Copy link
Contributor Author

@nodejs/build @mhdawson the V8-CI seems to be hitting infra issues AFAICT. Any ideas?

15:03:01 In file included from ../src/setup-isolate-full.cc:7:
15:03:01 .././src/base/logging.h:8:10: fatal error: 'cstring' file not found
15:03:01 #include <cstring>
15:03:01          ^~~~~~~~~

@mmarchini
Copy link
Contributor

make test-v8 works on my machine, confirming this is an infra issue. But let's do another run, just in case:

https://ci.nodejs.org/job/node-test-commit-v8-linux/1442/

@ofrobots
Copy link
Contributor Author

@mhdawson @nodejs/build ping. Several V8 back-port are blocked because of this.

@mmarchini
Copy link
Contributor

It's not happening on all V8 backports though. Maybe it's only happening to v8.x backports?

@richardlau
Copy link
Member

It's not happening on all V8 backports though. Maybe it's only happening to v8.x backports?

The compiler level used on LinuxOne (s390x), ppcle Linux and AIX is based on the version of Node.js (i.e., >9): https://github.com/nodejs/build/blob/master/jenkins/scripts/select-compiler.sh

@mhdawson
Copy link
Member

There seem to be a few issues. I fixed IBM platform specific ones related to changes made to build with GN. But those were not what was reported here.

opened nodejs/build#1370 as it seems to fail for other reasons on x86 for 10.x

@mhdawson
Copy link
Member

It seems to fail on V8.x without any other changes, @mmarchini confirmed it fails the same for V8.x-staging.

@mhdawson
Copy link
Member

Cleaned the workspace, if that still fails then my next guess is that something landed in v8.x v8.x-staging which broke it. Run on v8.x after cleaning workspace: https://ci.nodejs.org/job/node-test-commit-v8-linux/1456/

@mhdawson
Copy link
Member

@richardlau I don't know what you are trying to point out? It fails across the board for v8.x including x86.

@ofrobots
Copy link
Contributor Author

@mhdawson
Copy link
Member

Build to see if it passed on 6.x or not https://ci.nodejs.org/job/node-test-commit-v8-linux/1458/

It still failed on 8.x. If it passes on 6.x then I think its something in the 8.x line. .

@ofrobots
Copy link
Contributor Author

It failed on my PR branch.

Here's a build of the v8.x-staging branch: https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1459/.

@mhdawson
Copy link
Member

Workspace clean then build on 6.x - https://ci.nodejs.org/job/node-test-commit-v8-linux/1460/

@richardlau
Copy link
Member

@richardlau I don't know what you are trying to point out? It fails across the board for v8.x including x86.

My apologies, I didn't spot that nodes=benchmark was x64.

@ofrobots
Copy link
Contributor Author

All failed.

@mhdawson
Copy link
Member

Failed for a different reason on 6.x. I'm wondering if it has to do with the google tooling required to build.

@MylesBorins when was the last time these worked on 6.x and 8.x?
@ofrobots can you run 8.x on a linux machine outside the ci to see if its related to the build machine or something else?

@ofrobots
Copy link
Contributor Author

make test-v8 runs fine on my linux machine, and it seems for @mmarchini as per #21334 (comment). This seems like an infra issue.

@MylesBorins
Copy link
Member

we had V8 ci pass on 8.x-staging recently https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1426/

@mhdawson
Copy link
Member

@mmarchini mentioned his test run was on OSX not linux, so not necessary confirmation one way or the other.

@mmarchini
Copy link
Contributor

Same failures while running tests on another CI machine:
https://ci.nodejs.org/job/node-test-commit-v8-linux/1472/nodes=ubuntu1604-intel-64,v8test=v8test/console

I'm working on it, but might take some time to track down and fix this one.

@mmarchini
Copy link
Contributor

I was able to reproduce in an Ubuntu 16.04 x64 VM on my computer, so this is definitely not a problem with our infrastructure. Let me see if I can find when this started to happen.

@mhdawson
Copy link
Member

The other thing I noticed was it looks like the passing builds (10.x and later) use g++ while the failing ones use clang (8.x). Not sure why what would be the case.

Also the failures on ppc and s390 look different, have asked @mmallick-ca to take a look at what might be going on there. Sounds like gclient sync is not pulling in something that is required.

@mhdawson
Copy link
Member

At this point I'll wait to see what @mmarchini figures out before spending any more time on this.

@ofrobots
Copy link
Contributor Author

New V8-CI: https://ci.nodejs.org/view/All/job/node-test-commit-v8-linux/1496/

@nodejs/lts @nodejs/v8-update this backport needs an LGTM before it can land.

@ofrobots ofrobots removed the blocked PRs that are blocked by other issues or PRs. label Jun 28, 2018
Original commit message:
  [wasm] Call AsyncInstantiate directly when instantiating a module object

  WebAssembly.instantiate is polymorphic, it can either take a module
  object as parameter, or a buffer source which should be compiled first.
  To share code between the two implementations, the module object was
  first passed to a promise (i.e. which is the result of compilation).
  However, passing the module object to a promise has a side effect if
  the module object has a then function. To avoid this side effect I
  remove this code sharing and call AsyncInstantiate directly in case
  the parameter is a module object.

  R=mstarzinger@chromium.org

  Bug: chromium:836141
  Change-Id: I67b76d0d7761c5aeb2cf1deda45b6842e494eed4
  Reviewed-on: https://chromium-review.googlesource.com/1025774
  Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
  Commit-Queue: Andreas Haas <ahaas@chromium.org>
  Cr-Commit-Position: refs/heads/master@{nodejs#52755}
@ofrobots
Copy link
Contributor Author

ofrobots commented Jul 2, 2018

@nodejs/lts @nodejs/v8-update another ping. This needs an LGTM. A rubber stamp would do.

Copy link
Member

@targos targos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rubber stamp

@ofrobots
Copy link
Contributor Author

ofrobots commented Jul 3, 2018

Actually, I was mistaken, these fixes not in 10 just yet. They are in V8 6.8 (rather than 6.7). Let's hold off on landing this until a 10.x release picks them up.

@ofrobots
Copy link
Contributor Author

ofrobots commented Jul 9, 2018

Ooops, I intended to add the above to #21558.

@MylesBorins
Copy link
Member

landed in 2afc05e

MylesBorins pushed a commit that referenced this pull request Jul 13, 2018
Original commit message:
  [wasm] Call AsyncInstantiate directly when instantiating a module object

  WebAssembly.instantiate is polymorphic, it can either take a module
  object as parameter, or a buffer source which should be compiled first.
  To share code between the two implementations, the module object was
  first passed to a promise (i.e. which is the result of compilation).
  However, passing the module object to a promise has a side effect if
  the module object has a then function. To avoid this side effect I
  remove this code sharing and call AsyncInstantiate directly in case
  the parameter is a module object.

  R=mstarzinger@chromium.org

  Bug: chromium:836141
  Change-Id: I67b76d0d7761c5aeb2cf1deda45b6842e494eed4
  Reviewed-on: https://chromium-review.googlesource.com/1025774
  Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
  Commit-Queue: Andreas Haas <ahaas@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#52755}

PR-URL: #21334
Reviewed-By: Michaël Zasso <targos@protonmail.com>
rvagg pushed a commit that referenced this pull request Aug 16, 2018
Original commit message:
  [wasm] Call AsyncInstantiate directly when instantiating a module object

  WebAssembly.instantiate is polymorphic, it can either take a module
  object as parameter, or a buffer source which should be compiled first.
  To share code between the two implementations, the module object was
  first passed to a promise (i.e. which is the result of compilation).
  However, passing the module object to a promise has a side effect if
  the module object has a then function. To avoid this side effect I
  remove this code sharing and call AsyncInstantiate directly in case
  the parameter is a module object.

  R=mstarzinger@chromium.org

  Bug: chromium:836141
  Change-Id: I67b76d0d7761c5aeb2cf1deda45b6842e494eed4
  Reviewed-on: https://chromium-review.googlesource.com/1025774
  Reviewed-by: Michael Starzinger <mstarzinger@chromium.org>
  Commit-Queue: Andreas Haas <ahaas@chromium.org>
  Cr-Commit-Position: refs/heads/master@{#52755}

PR-URL: #21334
Reviewed-By: Michaël Zasso <targos@protonmail.com>
@MylesBorins MylesBorins mentioned this pull request Aug 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants