-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
Run worker threads with --v8-pool-size=0
#42523
Labels
worker
Issues and PRs related to Worker support.
Comments
daeyeon
added a commit
to daeyeon/node
that referenced
this issue
Mar 30, 2022
fix: nodejs#42523 Problem: If no platform worker exists, Node.js doesn't shut down when background tasks exist. It keeps waiting in `NodePlatform::DrainTasks`. Observation: It seems that Node.js used to use V8's `DefaultPlatform` implementation, which chooses a suitable default value in case that `--v8-pool-size=0` is given as a command-line option. However, Node.js currently uses its own v8::Platform implementation, `NodePlatform`. It doesn't have the logic to handle the case. I referred to nodejs#4344 to track the issue.
This was referenced Mar 30, 2022
daeyeon
added a commit
to daeyeon/node
that referenced
this issue
Apr 14, 2022
fix: nodejs#42523 Problem: If no platform worker exists, Node.js doesn't shut down when background tasks exist. It keeps waiting in `NodePlatform::DrainTasks`. Observation: It seems that Node.js used to use V8's `DefaultPlatform` implementation, which chooses a suitable default value in case that `--v8-pool-size=0` is given as a command-line option. However, Node.js currently uses its own v8::Platform implementation, `NodePlatform`. It doesn't have the logic to handle the case. I referred to nodejs#4344 to track the issue.
daeyeon
added a commit
to daeyeon/node
that referenced
this issue
Apr 22, 2022
fix: nodejs#42523 Problem: If no platform worker exists, Node.js doesn't shut down when background tasks exist. It keeps waiting in `NodePlatform::DrainTasks`. Observation: It seems that Node.js used to use V8's `DefaultPlatform` implementation, which chooses a suitable default value in case that `--v8-pool-size=0` is given as a command-line option. However, Node.js currently uses its own v8::Platform implementation, `NodePlatform`. It doesn't have the logic to handle the case. I referred to nodejs#4344 to track the issue.
nodejs-github-bot
pushed a commit
that referenced
this issue
Nov 21, 2022
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
ruyadorno
pushed a commit
that referenced
this issue
Nov 21, 2022
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
marco-ippolito
pushed a commit
to marco-ippolito/node
that referenced
this issue
Nov 23, 2022
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: nodejs#45513 Fixes: nodejs#42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
danielleadams
pushed a commit
that referenced
this issue
Dec 30, 2022
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
danielleadams
pushed a commit
that referenced
this issue
Dec 30, 2022
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
danielleadams
pushed a commit
that referenced
this issue
Jan 3, 2023
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
danielleadams
pushed a commit
that referenced
this issue
Jan 4, 2023
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
danielleadams
pushed a commit
that referenced
this issue
Jan 5, 2023
It doesn't terminate when any pending V8 tasks exist if no thread is in the pool. This allocates one thread at least for V8's background tasks if `--v8-pool-size=0` is given as a CLI option. Signed-off-by: Daeyeon Jeong <daeyeon.dev@gmail.com> PR-URL: #45513 Fixes: #42523 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v18.0.0-pre
What steps will reproduce the bug?
Run a file including the above script with
--v8-pool-size=0
cli option.How often does it reproduce? Is there a required condition?
I guess it always occurs when running any script using worker_threads with
--v8-pool-size=0
.What is the expected behavior?
What do you see instead?
The text was updated successfully, but these errors were encountered: