fix: crash on windows when v8 posts a delayed worker task during shutdown - #52956
Merged
Conversation
deepak1556
approved these changes
Aug 18, 2026
…down Backports nodejs/node#61999. NodePlatform's DelayedTaskScheduler closes its uv loop when the worker thread task runner shuts down, but a task still running on a platform worker thread (V8's MemoryPool release task re-posts itself with a delay) could call PostDelayedTask() after that. The call reaches uv_async_send() on a closed handle; on Windows libuv then fails PostQueuedCompletionStatus() against the destroyed completion port and calls uv_fatal_error(). Late posts are now dropped once the scheduler has been stopped, matching what PerIsolatePlatformData already does for foreground tasks.
codebytere
force-pushed
the
fix-node-platform-late-delayed-post
branch
from
August 18, 2026 12:47
48caebb to
d0fd686
Compare
|
Release Notes Persisted
|
This was referenced Aug 19, 2026
Contributor
|
I have automatically backported this PR to "43-x-y", please check out #53013 |
Contributor
|
I have automatically backported this PR to "42-x-y", please check out #53014 |
Member
Author
|
/trop run backport-to 44-x-y |
Contributor
|
The backport process for this PR has been manually initiated - sending your PR to |
Contributor
|
I have automatically backported this PR to "44-x-y", please check out #53201 |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description of Change
Backports nodejs/node#61999.
NodePlatform'sDelayedTaskSchedulercloses its uv loop when the worker thread task runner shuts down, but a task still running on a platform worker thread (V8'sMemoryPoolrelease task re-posts itself with a delay) could callPostDelayedTask()after that. The call reachesuv_async_send()on a closed handle; on Windows libuv then failsPostQueuedCompletionStatus()against the destroyed completion port and callsuv_fatal_error(), so the process dies at quit.Late posts are now dropped once the scheduler has been stopped, matching what
PerIsolatePlatformDataalready does for foreground tasks. The patch can be removed once Electron rolls a Node release that contains nodejs/node#61999.Checklist
npm testpassesRelease Notes
Notes: Fixed a crash on Windows when V8 posted a delayed worker task during shutdown.