-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Revert "embedding: make Stop() stop Workers" #32623
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
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: nodejs#32531
This adds a regression test for terminating a Worker inside which another Worker is running.
nodejs-github-bot
added
c++
Issues and PRs that require attention from people who are familiar with C++.
lib / src
Issues and PRs related to general changes in the lib or src directory.
labels
Apr 2, 2020
addaleax
added
embedding
Issues and PRs related to embedding Node.js in another project.
worker
Issues and PRs related to Worker support.
c++
Issues and PRs that require attention from people who are familiar with C++.
and removed
c++
Issues and PRs that require attention from people who are familiar with C++.
lib / src
Issues and PRs related to general changes in the lib or src directory.
labels
Apr 2, 2020
This was referenced Apr 2, 2020
Fast-track? |
jasnell
approved these changes
Apr 2, 2020
cjihrig
approved these changes
Apr 3, 2020
addaleax
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Apr 3, 2020
gireeshpunathil
approved these changes
Apr 3, 2020
addaleax
added a commit
that referenced
this pull request
Apr 3, 2020
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: #32531 PR-URL: #32623 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
addaleax
added a commit
that referenced
this pull request
Apr 3, 2020
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: #32623 Refs: #32531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Landed in 7947811...e629366 |
BethGriggs
pushed a commit
that referenced
this pull request
Apr 7, 2020
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: #32531 PR-URL: #32623 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Apr 7, 2020
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: #32623 Refs: #32531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
targos
pushed a commit
that referenced
this pull request
Apr 12, 2020
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: #32623 Refs: #32531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
3 tasks
addaleax
added a commit
that referenced
this pull request
Feb 18, 2021
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: #32531 PR-URL: #32623 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
addaleax
added a commit
that referenced
this pull request
Feb 18, 2021
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: #32623 Refs: #32531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
I added this to v12.x-staging because people were reporting this bug occurring in v12.20.1, and it's a change that should definitely land everywhere where the original bug was also introduced. /cc @nodejs/lts |
richardlau
pushed a commit
that referenced
this pull request
Feb 22, 2021
This reverts commit 037ac99. As flaky CI failures have revealed, this feature was implemented incorrectly. `stop_sub_worker_contexts()` needs to be called on the thread on which the `Environment` is currently running, it’s not thread-safe. The current API requires `Stop()` to be thread-safe, though. We could add a new API for this, but unless there’s demand, that’s probably not necessary as `FreeEnvironment()` will also stop Workers, which is commonly the next action on an `Environment` instance after having `Stop()` called on it. Refs: #32531 PR-URL: #32623 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
richardlau
pushed a commit
that referenced
this pull request
Feb 22, 2021
This adds a regression test for terminating a Worker inside which another Worker is running. PR-URL: #32623 Refs: #32531 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Gireesh Punathil <[email protected]>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
c++
Issues and PRs that require attention from people who are familiar with C++.
embedding
Issues and PRs related to embedding Node.js in another project.
fast-track
PRs that do not need to wait for 48 hours to land.
worker
Issues and PRs related to Worker support.
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.
Revert "embedding: make Stop() stop Workers"
This reverts commit 037ac99.
As flaky CI failures have revealed, this feature was implemented
incorrectly.
stop_sub_worker_contexts()
needs to be called on thethread on which the
Environment
is currently running, it’s notthread-safe. The current API requires
Stop()
to be thread-safe,though.
We could add a new API for this, but unless there’s demand, that’s
probably not necessary as
FreeEnvironment()
will also stop Workers,which is commonly the next action on an
Environment
instance afterhaving
Stop()
called on it.Refs: #32531
src,test: add regression test for nested Worker termination
This adds a regression test for terminating a Worker inside which
another Worker is running.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes