| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This fixes a bug introduced in 727b291 where code managing the `uv_timer_t` for a `ChannelWrap` instance was left unchanged, when it should have changed the lifetime of the handle to being tied to the `ChannelWrap` instance’s lifetime. Fixes: nodejs#14599 Ref: nodejs#14518
|
CI: https://ci.nodejs.org/job/node-test-commit/11555/ (edit: green except infra failure) It would be cool to have this in 8.3.0, this fixes a real crash. edit: I won’t be here for most of the weekend, please feel free to fix any change requests yourself |
Sorry, something went wrong.
|
Is it possible to add a test? |
Sorry, something went wrong.
|
@mscdex I don’t think that would be any more or less reliable than the existing failing test. Also, this isn’t about the set* globals/the timers core module that the label is for, so I think that can be removed? |
Sorry, something went wrong.
|
Given the frequency of crashes in CI on test-async-wrap-getasyncid, it would be great to fast-track this. But of course, first it needs some reviews... 📟 @bnoordhuis @trevnorris @indutny |
Sorry, something went wrong.
|
+1 to fast track after it gets a review from the aforementioned |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM with minor nits.
Sorry, something went wrong.
| ares_destroy(channel_); | ||
| CleanupTimer(); | ||
| } | ||
|
|
There was a problem hiding this comment.
Double newline here, please.
Sorry, something went wrong.
|
|
||
| uv_close(reinterpret_cast<uv_handle_t*>(timer_handle_), | ||
| [](uv_handle_t* handle) { | ||
| delete reinterpret_cast<uv_timer_t*>(handle); |
There was a problem hiding this comment.
Not absolutely necessary, but doing handle->data = NULL prior to this may help in the future.
Sorry, something went wrong.
|
New CI: https://ci.nodejs.org/job/node-test-commit/11568/ |
Sorry, something went wrong.
|
|
||
| uv_close(reinterpret_cast<uv_handle_t*>(timer_handle_), | ||
| [](uv_handle_t* handle) { | ||
| handle->data = NULL; |
There was a problem hiding this comment.
Yikes, nullptr 😉 Sorry!
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry I'm doing this "blind" on the GitHub GUI.
Sorry, something went wrong.
|
New stress: https://ci.nodejs.org/job/node-stress-single-test/1361/ https://ci.nodejs.org/job/node-stress-single-test/1362/nodes=aix61-ppc64/ |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. But IMHO why don't we use CARE's own timeout?
Sorry, something went wrong.
|
@XadillaX As far as I can tell, c-ares is not involved in actually creating timers in any way. |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM modulo nits.
Sorry, something went wrong.
|
|
||
|
|
||
| void ChannelWrap::CleanupTimer() { | ||
| if (!timer_handle_) return; |
There was a problem hiding this comment.
if (timer_handle_ == nullptr) return;
Sorry, something went wrong.
|
|
||
| uv_close(reinterpret_cast<uv_handle_t*>(timer_handle_), | ||
| [](uv_handle_t* handle) { | ||
| handle->data = nullptr; |
There was a problem hiding this comment.
Dead store; the memory is deleted immediately afterwards.
Sorry, something went wrong.
Sorry, something went wrong.
This fixes a bug introduced in 727b291 where code managing the `uv_timer_t` for a `ChannelWrap` instance was left unchanged, when it should have changed the lifetime of the handle to being tied to the `ChannelWrap` instance’s lifetime. Fixes: #14599 Ref: #14518 PR-URL: #14634 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This fixes a bug introduced in 727b291 where code managing the `uv_timer_t` for a `ChannelWrap` instance was left unchanged, when it should have changed the lifetime of the handle to being tied to the `ChannelWrap` instance’s lifetime. Fixes: #14599 Ref: #14518 PR-URL: #14634 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Khaidi Chu <i@2333.moe> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
| Back | FazBrowse Home | New Git URL |
This fixes a bug introduced in 727b291 where code managing the uv_timer_t for a ChannelWrap instance was left unchanged, when it should have changed the lifetime of the handle to being tied to the ChannelWrap instance’s lifetime.
Fixes: #14599
Ref: #14518
Checklist
Affected core subsystem(s)
src/cares_wrap