Skip to content

fix: crash on windows when v8 posts a delayed worker task during shutdown - #53201

Merged
codebytere merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-fix-crash-on-windows-when-v8-posts-a-delayed-worker-task-during-shutdown-1787746040167
Aug 26, 2026
Merged

codebytere merged 1 commit into
44-x-yfrom
trop/44-x-y-bp-fix-crash-on-windows-when-v8-posts-a-delayed-worker-task-during-shutdown-1787746040167

Conversation

@trop

@trop trop Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Backport of #52956

See that PR for details.

Notes: Fixed a crash on Windows when V8 posted a delayed worker task during shutdown.

…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.

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
@trop
trop Bot requested a review from a team as a code owner August 26, 2026 12:07
@trop
trop Bot requested a review from codebytere August 26, 2026 12:07
@trop trop Bot added 44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes labels Aug 26, 2026
@codebytere
codebytere enabled auto-merge (squash) August 26, 2026 20:47
@codebytere
codebytere merged commit b972e89 into 44-x-y Aug 26, 2026
145 of 147 checks passed
@codebytere
codebytere deleted the trop/44-x-y-bp-fix-crash-on-windows-when-v8-posts-a-delayed-worker-task-during-shutdown-1787746040167 branch August 26, 2026 21:04
@release-clerk

release-clerk Bot commented Aug 26, 2026

Copy link
Copy Markdown

Release Notes Persisted

Fixed a crash on Windows when V8 posted a delayed worker task during shutdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

44-x-y backport This is a backport PR semver/patch backwards-compatible bug fixes

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants