-
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
[v6.x backport] tls: fix writeQueueSize prop, long write timeouts #16420
[v6.x backport] tls: fix writeQueueSize prop, long write timeouts #16420
Conversation
@apapirovski a bit confused... doesn't seem like I requested this backport in the issue. Did we cross wires? |
@MylesBorins You did in our conversation earlier. The name of the issue might just be a tad confusing. See #13391 Either way, even if you hadn't, this should be back-ported given that it's a serious bug. But if you don't want this back-ported for v4.x let me know as I'm almost done. |
@apapirovski AHHHHHH... thanks This is slated to land in 8.8.0. Which means that we can likely land it in the following 6.x release, and a future 4.x maintenance release (assuming we get signoff on the backport) |
54286db
to
3e96c85
Compare
b6ed49b
to
7feac5c
Compare
CI is all green (failure unrelated) and I've rebased. |
This is blocked because of #16484 — working on a PR which will then need to be applied here. |
Last commit is technically from a different PR but this shouldn't land without it. |
9219283
to
b0fadbe
Compare
I think this should wait for some more time before backporting (if at all). |
fa922b9
to
50c3dab
Compare
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. PR-URL: nodejs#15791 Fixes: nodejs#15005 Refs: nodejs#15006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Add updateWriteQueueSize which updates and returns queue size (net & tls). Make _onTimeout check whether an active write is ongoing and if so, call _unrefTimer rather than emitting a timeout event. Add http & https test that checks whether long-lasting (but active) writes timeout or can finish writing as expected. PR-URL: nodejs#15791 Fixes: nodejs#15082 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit handles the case where _onTimeout is called with a null handle. Refs: nodejs#15791 Fixes: nodejs#16484 PR-URL: nodejs#16489 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
67ca82f
to
920f2ff
Compare
@mcollina is this ready to land? |
@MylesBorins no. This PR introduced #16484 which was fixed in #16489. |
@mcollina the commit from that second PR is in here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. Backport-PR-URL: #16420 PR-URL: #15791 Fixes: #15005 Refs: #15006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Add updateWriteQueueSize which updates and returns queue size (net & tls). Make _onTimeout check whether an active write is ongoing and if so, call _unrefTimer rather than emitting a timeout event. Add http & https test that checks whether long-lasting (but active) writes timeout or can finish writing as expected. Backport-PR-URL: #16420 PR-URL: #15791 Fixes: #15082 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit handles the case where _onTimeout is called with a null handle. Backport-PR-URL: #16420 Refs: #15791 Fixes: #16484 PR-URL: #16489 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
landed in 612baca...15d855d |
Make writeQueueSize represent the actual size of the write queue within the TLS socket. Add tls test to confirm that bufferSize works as expected. Backport-PR-URL: #16420 PR-URL: #15791 Fixes: #15005 Refs: #15006 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
Add updateWriteQueueSize which updates and returns queue size (net & tls). Make _onTimeout check whether an active write is ongoing and if so, call _unrefTimer rather than emitting a timeout event. Add http & https test that checks whether long-lasting (but active) writes timeout or can finish writing as expected. Backport-PR-URL: #16420 PR-URL: #15791 Fixes: #15082 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Fedor Indutny <fedor.indutny@gmail.com>
This commit handles the case where _onTimeout is called with a null handle. Backport-PR-URL: #16420 Refs: #15791 Fixes: #16484 PR-URL: #16489 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Refael Ackermann <refack@gmail.com>
This is a backport of #15791 as requested.
/cc @MylesBorins
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
net, tls, test