-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: backport V8 fix related to WASM deadlock #47610
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
targos
added
dont-land-on-v14.x
dont-land-on-v18.x
PRs that should not land on the v18.x-staging branch and should not be released in v18.x.
labels
Apr 18, 2023
Review requested:
|
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 18, 2023
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Apr 18, 2023
richardlau
approved these changes
Apr 18, 2023
I'll remove the reverts because the tests are still failing. |
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Apr 19, 2023
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
Apr 19, 2023
jasnell
approved these changes
Apr 21, 2023
This was referenced Apr 24, 2023
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 <clemensb@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#86675} Refs: v8/v8@a8a11a8
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. R=jkummerow@chromium.org Bug: v8:13858 Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#87143} Refs: v8/v8@5f025d1
rebased |
github-actions
bot
removed
the
request-ci
Add this label to start a Jenkins CI on a PR.
label
May 1, 2023
33 tasks
28 tasks
This was referenced May 5, 2023
Landed in 0736d0b...38d261a |
targos
added a commit
that referenced
this pull request
May 10, 2023
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 <clemensb@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#86675} Refs: v8/v8@a8a11a8 PR-URL: #47610 Refs: #47297 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
added a commit
that referenced
this pull request
May 10, 2023
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. R=jkummerow@chromium.org Bug: v8:13858 Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#87143} Refs: v8/v8@5f025d1 PR-URL: #47610 Refs: #47297 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
added a commit
that referenced
this pull request
May 12, 2023
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 <clemensb@chromium.org> Commit-Queue: Etienne Pierre-Doray <etiennep@chromium.org> Cr-Commit-Position: refs/heads/main@{#86675} Refs: v8/v8@a8a11a8 PR-URL: #47610 Refs: #47297 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
targos
added a commit
that referenced
this pull request
May 12, 2023
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. R=jkummerow@chromium.org Bug: v8:13858 Change-Id: I5398ef370da2e7f212ca772fd1f87f659929dd6d Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4437531 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/main@{#87143} Refs: v8/v8@5f025d1 PR-URL: #47610 Refs: #47297 Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: James M Snell <jasnell@gmail.com>
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.
dont-land-on-v18.x
PRs that should not land on the v18.x-staging branch and should not be released in v18.x.
needs-ci
PRs that need a full CI run.
v8 engine
Issues and PRs related to the V8 dependency.
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.
The first commit is just to avoid conflicts with the second one which contains the fix.
Refs: #47297