-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
src: ensure no more platform foreground tasks after Deinit #25653
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
Node first calls `Isolate::Dispose`, then `NodePlatform::UnregisterIsolate`. This again calls `PerIsolatePlatformData::Shutdown`, which (before this patch) called `FlushForegroundTasksInternal`, which might call `RunForegroundTask` if it finds foreground tasks to be executed. This will fail however, since `Isolate::GetCurrent` was already reset during `Isolate::Dispose`. Hence remove the check to `FlushForegroundTasksInternal` and add checks instead that no more foreground tasks are scheduled. Refs: v8#86
nodejs-github-bot
added
the
c++
Issues and PRs that require attention from people who are familiar with C++.
label
Jan 23, 2019
devsnek
approved these changes
Jan 23, 2019
cjihrig
approved these changes
Jan 23, 2019
Landed in bafd808 |
addaleax
pushed a commit
that referenced
this pull request
Jan 27, 2019
Node first calls `Isolate::Dispose`, then `NodePlatform::UnregisterIsolate`. This again calls `PerIsolatePlatformData::Shutdown`, which (before this patch) called `FlushForegroundTasksInternal`, which might call `RunForegroundTask` if it finds foreground tasks to be executed. This will fail however, since `Isolate::GetCurrent` was already reset during `Isolate::Dispose`. Hence remove the check to `FlushForegroundTasksInternal` and add checks instead that no more foreground tasks are scheduled. Refs: v8#86 PR-URL: #25653 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
addaleax
pushed a commit
that referenced
this pull request
Jan 28, 2019
Node first calls `Isolate::Dispose`, then `NodePlatform::UnregisterIsolate`. This again calls `PerIsolatePlatformData::Shutdown`, which (before this patch) called `FlushForegroundTasksInternal`, which might call `RunForegroundTask` if it finds foreground tasks to be executed. This will fail however, since `Isolate::GetCurrent` was already reset during `Isolate::Dispose`. Hence remove the check to `FlushForegroundTasksInternal` and add checks instead that no more foreground tasks are scheduled. Refs: v8#86 PR-URL: #25653 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Merged
BethGriggs
pushed a commit
to MylesBorins/node
that referenced
this pull request
Mar 27, 2019
Node first calls `Isolate::Dispose`, then `NodePlatform::UnregisterIsolate`. This again calls `PerIsolatePlatformData::Shutdown`, which (before this patch) called `FlushForegroundTasksInternal`, which might call `RunForegroundTask` if it finds foreground tasks to be executed. This will fail however, since `Isolate::GetCurrent` was already reset during `Isolate::Dispose`. Hence remove the check to `FlushForegroundTasksInternal` and add checks instead that no more foreground tasks are scheduled. Refs: v8#86 PR-URL: nodejs#25653 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
BethGriggs
pushed a commit
that referenced
this pull request
Mar 28, 2019
Node first calls `Isolate::Dispose`, then `NodePlatform::UnregisterIsolate`. This again calls `PerIsolatePlatformData::Shutdown`, which (before this patch) called `FlushForegroundTasksInternal`, which might call `RunForegroundTask` if it finds foreground tasks to be executed. This will fail however, since `Isolate::GetCurrent` was already reset during `Isolate::Dispose`. Hence remove the check to `FlushForegroundTasksInternal` and add checks instead that no more foreground tasks are scheduled. Refs: v8#86 Backport-PR-URL: #26048 PR-URL: #25653 Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
Merged
This was referenced May 29, 2019
2 tasks
addaleax
added a commit
to addaleax/node
that referenced
this pull request
Sep 17, 2019
While V8 itself should not have any remaining tasks on the queue during platform shutdown, our inspector implementation may do so. Thus, the checks verifying that no tasks are queued at that point make some of the inspector tasks flaky. Remove the checks and replace them by explicitly destroying all tasks that are left. Refs: nodejs#25653 Refs: nodejs#28870 (comment)
Trott
pushed a commit
that referenced
this pull request
Sep 23, 2019
While V8 itself should not have any remaining tasks on the queue during platform shutdown, our inspector implementation may do so. Thus, the checks verifying that no tasks are queued at that point make some of the inspector tasks flaky. Remove the checks and replace them by explicitly destroying all tasks that are left. Refs: #25653 Refs: #28870 (comment) PR-URL: #29587 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
targos
pushed a commit
that referenced
this pull request
Sep 23, 2019
While V8 itself should not have any remaining tasks on the queue during platform shutdown, our inspector implementation may do so. Thus, the checks verifying that no tasks are queued at that point make some of the inspector tasks flaky. Remove the checks and replace them by explicitly destroying all tasks that are left. Refs: #25653 Refs: #28870 (comment) PR-URL: #29587 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
BridgeAR
pushed a commit
that referenced
this pull request
Sep 25, 2019
While V8 itself should not have any remaining tasks on the queue during platform shutdown, our inspector implementation may do so. Thus, the checks verifying that no tasks are queued at that point make some of the inspector tasks flaky. Remove the checks and replace them by explicitly destroying all tasks that are left. Refs: #25653 Refs: #28870 (comment) PR-URL: #29587 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Eugene Ostroukhov <[email protected]> Reviewed-By: Minwoo Jung <[email protected]>
addaleax
added
the
v8 platform
Issues and PRs related to Node's v8::Platform implementation.
label
Feb 18, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
c++
Issues and PRs that require attention from people who are familiar with C++.
v8 platform
Issues and PRs related to Node's v8::Platform implementation.
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.
Node first calls
Isolate::Dispose
, thenNodePlatform::UnregisterIsolate
.This again calls
PerIsolatePlatformData::Shutdown
, which (before thispatch) called
FlushForegroundTasksInternal
, which might callRunForegroundTask
if it finds foreground tasks to be executed. Thiswill fail however, since
Isolate::GetCurrent
was already reset duringIsolate::Dispose
.Hence remove the check to
FlushForegroundTasksInternal
and add checksinstead that no more foreground tasks are scheduled.
Refs: v8#86
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes