src: improve thread safety of TaskQueue#57910
Conversation
cfdeed7 to
6b85518
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57910 +/- ##
========================================
Coverage 90.25% 90.26%
========================================
Files 630 630
Lines 185691 186170 +479
Branches 36407 36480 +73
========================================
+ Hits 167589 168039 +450
+ Misses 10994 10975 -19
- Partials 7108 7156 +48
🚀 New features to boost your workflow:
|
0ffd2a4 to
f1b6765
Compare
|
@codebytere I wonder if this could also help with #54918. |
bnoordhuis
left a comment
There was a problem hiding this comment.
LGTM with some suggestions.
0192c4f to
78a514e
Compare
I applied this patch and unfortunately it does not. |
|
Thanks for checking! |
joyeecheung
left a comment
There was a problem hiding this comment.
LGTM (as in, my tiny head can't find potential issues out of the new locks), though I think it can use a bit more comments (I am fairly certain that the race can only happen at shutdown, the platform is initialized too early for any tasks to be posted during that process)
78a514e to
d71a542
Compare
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: #57910 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
* chore: bump node in DEPS to v22.16.0 * crypto: remove BoringSSL dh-primes addition nodejs/node#57023 * tools: enable linter in test/fixtures/test\-runner/output nodejs/node#57698 * src: improve thread safety of TaskQueue nodejs/node#57910 * buffer: define global v8::CFunction objects as const nodejs/node#57676 * src: disable abseil deadlock detection nodejs/node#57582 * zlib: fix pointer alignment nodejs/node#57727 * chore: fixup patch indices * src: set default config as node.config.json nodejs/node#57171 * src: update std::vector<v8::Local<T>> to use v8::LocalVector<T> nodejs/node#57578 * test: disable chmod tests failing in Docker nodejs/node#58326 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: bump node in DEPS to v22.16.0 * crypto: remove BoringSSL dh-primes addition nodejs/node#57023 * tools: enable linter in test/fixtures/test\-runner/output nodejs/node#57698 * src: improve thread safety of TaskQueue nodejs/node#57910 * buffer: define global v8::CFunction objects as const nodejs/node#57676 * src: disable abseil deadlock detection nodejs/node#57582 * zlib: fix pointer alignment nodejs/node#57727 * chore: fixup patch indices * src: set default config as node.config.json nodejs/node#57171 * src: update std::vector<v8::Local<T>> to use v8::LocalVector<T> nodejs/node#57578 * test: disable chmod tests failing in Docker nodejs/node#58326 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
|
This commit requires a manual backport to land on v20.x |
* chore: bump node in DEPS to v22.16.0 * crypto: remove BoringSSL dh-primes addition nodejs/node#57023 * tools: enable linter in test/fixtures/test\-runner/output nodejs/node#57698 * src: improve thread safety of TaskQueue nodejs/node#57910 * buffer: define global v8::CFunction objects as const nodejs/node#57676 * zlib: fix pointer alignment nodejs/node#57727 * chore: fixup patch indices * src: set default config as node.config.json nodejs/node#57171 * src: update std::vector<v8::Local<T>> to use v8::LocalVector<T> nodejs/node#57578 * test: disable chmod tests failing in Docker nodejs/node#58326 * chore: fix out of date patch --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
* chore: bump node in DEPS to v22.16.0 * crypto: remove BoringSSL dh-primes addition nodejs/node#57023 * tools: enable linter in test/fixtures/test\-runner/output nodejs/node#57698 * src: improve thread safety of TaskQueue nodejs/node#57910 * buffer: define global v8::CFunction objects as const nodejs/node#57676 * src: disable abseil deadlock detection nodejs/node#57582 * zlib: fix pointer alignment nodejs/node#57727 * chore: fixup patch indices * src: set default config as node.config.json nodejs/node#57171 * src: update std::vector<v8::Local<T>> to use v8::LocalVector<T> nodejs/node#57578 * test: disable chmod tests failing in Docker nodejs/node#58326 --------- Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Closes #56236.
Improve thread safety of TaskQueue by making locking of TaskQueue explicit and thus hopefully preventing a crash due to
uv_async_sendbeing called withnullptr.