GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — deps: backport V8 fix related to WASM deadlock by targos · Pull Request #47610 · nodejs/node

Conversation

@targos

@targos targos commented Apr 18, 2023

Copy link
Copy Markdown
Member

The first commit is just to avoid conflicts with the second one which contains the fix.

Refs: #47297

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@targos targos added dont-land-on-v14.x labels Apr 18, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/v8-update
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Apr 18, 2023
@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 18, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 18, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5326/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5326/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

richardlau
richardlau approved these changes Apr 18, 2023
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Apr 18, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5326/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Apr 18, 2023

Copy link
Copy Markdown
Member Author

I'll remove the reverts because the tests are still failing.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos
targos force-pushed the v8-deadlock branch from 2e3261d to f1963cd Compare April 19, 2023 06:16
@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 19, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 19, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5327/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5327/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5327/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos
targos force-pushed the v8-deadlock branch from f1963cd to f0564fe Compare April 19, 2023 09:15
@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 19, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Apr 19, 2023
@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5328/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5328/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Apr 19, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5328/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jasnell
jasnell approved these changes Apr 21, 2023
View reviewed changes
This was referenced Apr 24, 2023
CI Reliability 2023-04-24 nodejs/reliability#545
Open
CI Reliability 2023-04-25 nodejs/reliability#546
Open
targos added 2 commits May 1, 2023 12:42
@targos
deps: V8: cherry-pick a8a11a87cb72
c63d47c
Original commit message:

    [wasm] Simplify CompileJSToWasmWrapperJob

    This CL merges some of AsyncCompileJSToWasmWrapperJob and
    CompileJSToWasmWrapperJob into a common base class. Both jobs now
    loop on a vector with an atomic index.

    Bug: chromium:1423615
    Change-Id: I7bb9cb2a57d8b659766c01e20e38d1b859d3a987
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4347597
    Reviewed-by: Clemens Backes <[email protected]>
    Commit-Queue: Etienne Pierre-Doray <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#86675}

Refs: v8/v8@a8a11a8
@targos
deps: V8: cherry-pick 5f025d1ca2ca
a62c955
Original commit message:

    [wasm] Fix deadlock in async wrapper compilation

    If compilation is cancelled while wrapper compilation is running, the
    tasks spawned for the {AsyncCompileJSToWasmWrapperJob} will return
    immediately, but {GetMaxConcurrency} will still return a positive
    value. Hence {Join()} will spawn another task, resulting in a
    livelock.

    We could fix this by checking for cancellation in {GetMaxConcurrency},
    but that requires taking the compilation state lock.
    So this CL fixes the issue by dropping the number of outstanding
    compilation units by to (basically) zero. We can't unconditionally drop
    to zero because another thread might concurrently execute a wrapper
    compilation and still call {CompleteUnit} afterwards. Hence only drop
    outstanding units by the amount of not-yet-started units.

    [email protected]

    Bug: v8:13858
    Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531
    Commit-Queue: Clemens Backes <[email protected]>
    Reviewed-by: Jakob Kummerow <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#87143}

Refs: v8/v8@5f025d1
@targos
targos force-pushed the v8-deadlock branch from f0564fe to a62c955 Compare May 1, 2023 10:43
@targos targos added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 1, 2023
@targos

targos commented May 1, 2023

Copy link
Copy Markdown
Member Author

rebased

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label May 1, 2023
@nodejs-github-bot

nodejs-github-bot commented May 1, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 1, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=benchmark-ubuntu2204-intel-64,v8test=v8test/5346/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 1, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-s390x,v8test=v8test/5346/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented May 1, 2023

Copy link
Copy Markdown
Collaborator

V8 CI: https://ci.nodejs.org/job/node-test-commit-v8-linux/nodes=rhel8-ppc64le,v8test=v8test/5346/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 3, 2023
CI Reliability 2023-05-03 nodejs/reliability#554
Open
33 tasks
@nodejs-github-bot

nodejs-github-bot commented May 3, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos removed the dont-land-on-v14.x label May 3, 2023
@github-actions github-actions Bot mentioned this pull request May 4, 2023
CI Reliability 2023-05-04 nodejs/reliability#555
Open
28 tasks
@nodejs-github-bot

nodejs-github-bot commented May 4, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced May 5, 2023
CI Reliability 2023-05-05 nodejs/reliability#556
Open
CI Reliability 2023-05-06 nodejs/reliability#557
Open
CI Reliability 2023-05-07 nodejs/reliability#558
Open
@targos

targos commented May 10, 2023

Copy link
Copy Markdown
Member Author

Landed in 0736d0b...38d261a

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos added a commit that referenced this pull request May 10, 2023
@targos
deps: V8: cherry-pick a8a11a87cb72
4b4a0c4
Original commit message:

    [wasm] Simplify CompileJSToWasmWrapperJob

    This CL merges some of AsyncCompileJSToWasmWrapperJob and
    CompileJSToWasmWrapperJob into a common base class. Both jobs now
    loop on a vector with an atomic index.

    Bug: chromium:1423615
    Change-Id: I7bb9cb2a57d8b659766c01e20e38d1b859d3a987
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4347597
    Reviewed-by: Clemens Backes <[email protected]>
    Commit-Queue: Etienne Pierre-Doray <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#86675}

Refs: v8/v8@a8a11a8
PR-URL: #47610
Refs: #47297
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos added a commit that referenced this pull request May 10, 2023
@targos
deps: V8: cherry-pick 5f025d1ca2ca
38d261a
Original commit message:

    [wasm] Fix deadlock in async wrapper compilation

    If compilation is cancelled while wrapper compilation is running, the
    tasks spawned for the {AsyncCompileJSToWasmWrapperJob} will return
    immediately, but {GetMaxConcurrency} will still return a positive
    value. Hence {Join()} will spawn another task, resulting in a
    livelock.

    We could fix this by checking for cancellation in {GetMaxConcurrency},
    but that requires taking the compilation state lock.
    So this CL fixes the issue by dropping the number of outstanding
    compilation units by to (basically) zero. We can't unconditionally drop
    to zero because another thread might concurrently execute a wrapper
    compilation and still call {CompleteUnit} afterwards. Hence only drop
    outstanding units by the amount of not-yet-started units.

    [email protected]

    Bug: v8:13858
    Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531
    Commit-Queue: Clemens Backes <[email protected]>
    Reviewed-by: Jakob Kummerow <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#87143}

Refs: v8/v8@5f025d1
PR-URL: #47610
Refs: #47297
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos closed this May 10, 2023
@targos
targos deleted the v8-deadlock branch May 10, 2023 12:37
targos added a commit that referenced this pull request May 12, 2023
@targos
deps: V8: cherry-pick a8a11a87cb72
99f8fca
Original commit message:

    [wasm] Simplify CompileJSToWasmWrapperJob

    This CL merges some of AsyncCompileJSToWasmWrapperJob and
    CompileJSToWasmWrapperJob into a common base class. Both jobs now
    loop on a vector with an atomic index.

    Bug: chromium:1423615
    Change-Id: I7bb9cb2a57d8b659766c01e20e38d1b859d3a987
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4347597
    Reviewed-by: Clemens Backes <[email protected]>
    Commit-Queue: Etienne Pierre-Doray <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#86675}

Refs: v8/v8@a8a11a8
PR-URL: #47610
Refs: #47297
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
targos added a commit that referenced this pull request May 12, 2023
@targos
deps: V8: cherry-pick 5f025d1ca2ca
b16f6da
Original commit message:

    [wasm] Fix deadlock in async wrapper compilation

    If compilation is cancelled while wrapper compilation is running, the
    tasks spawned for the {AsyncCompileJSToWasmWrapperJob} will return
    immediately, but {GetMaxConcurrency} will still return a positive
    value. Hence {Join()} will spawn another task, resulting in a
    livelock.

    We could fix this by checking for cancellation in {GetMaxConcurrency},
    but that requires taking the compilation state lock.
    So this CL fixes the issue by dropping the number of outstanding
    compilation units by to (basically) zero. We can't unconditionally drop
    to zero because another thread might concurrently execute a wrapper
    compilation and still call {CompleteUnit} afterwards. Hence only drop
    outstanding units by the amount of not-yet-started units.

    [email protected]

    Bug: v8:13858
    Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531
    Commit-Queue: Clemens Backes <[email protected]>
    Reviewed-by: Jakob Kummerow <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#87143}

Refs: v8/v8@5f025d1
PR-URL: #47610
Refs: #47297
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@targos targos mentioned this pull request May 15, 2023
v20.2.0 release proposal #48020
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell approved these changes
@richardlau richardlau richardlau approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@targos @nodejs-github-bot @jasnell @richardlau
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.