Skip to content

v8: avoid V8 worker hang during platform shutdown - #64283

Closed
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:v8
Closed

v8: avoid V8 worker hang during platform shutdown#64283
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:v8

Conversation

@Archkon

@Archkon Archkon commented Jul 4, 2026

Copy link
Copy Markdown

Fixes: #64274

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. labels Jul 4, 2026
@jasnell

jasnell commented Jul 4, 2026

Copy link
Copy Markdown
Member

@nodejs/v8

@addaleax

addaleax commented Jul 5, 2026

Copy link
Copy Markdown
Member

Same comment as on #64268 -- this would heavily benefit from a commit message that explains the what, how and why of the change

Node could hang during shutdown while joining V8 worker threads if a
worker was parked waiting for foreground GC work.

This can happen when a V8 background task requests GC from the main
isolate thread during process exit, after Node has stopped processing
foreground tasks but before the platform worker pool is joined.

Flush foreground tasks for registered Node isolates before shutting down
the worker task runner so pending GC work can run and release parked
workers.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@Archkon

This comment was marked as spam.

@avivkeller

Copy link
Copy Markdown
Member

And tests :-)

@Archkon

This comment was marked as spam.

@aduh95 aduh95 closed this Aug 10, 2026
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++. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hang at shutdown

6 participants