You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Crash in Node v8.x at lib/_tls_legacy.js.onclienthello() #26428
At my company we have a TCP server accepting connections and securing them with tls.createSecurePair(). When there is high load in the server, usually due to lots of I/O traffic, we start seeing exceptions generated by the Node.js runtime.
The crash is located at lib/_tls_legacy.js/onclienthello(): when the TLS connection is destroyed before the setImmediate() can run, this situation results in a TypeError: Cannot read property 'loadSession' of null.
Thanks for the bug report. After checking the code I think there may be more than one bug to fix in lib/_tls_legacy.js. Session resumption with tls.createSecurePair() seems pretty broken at the moment. I'll have a look.
Activity
bnoordhuis commentedon Mar 5, 2019
Thanks for the bug report. After checking the code I think there may be more than one bug to fix in
lib/_tls_legacy.js. Session resumption withtls.createSecurePair()seems pretty broken at the moment. I'll have a look.alexfernandez commentedon Mar 5, 2019
Thanks! We were thinking of a simple fix since that file disappears in v10.x, but any deeper solutions are of course welcome.
tls: fix legacy SecurePair session resumption
tls: fix legacy SecurePair clienthello race window
bnoordhuis commentedon Mar 5, 2019
#26452 - if you have an opportunity to test it out, that would be great.
alexfernandez commentedon Mar 5, 2019
Tested #26452 with our test case
destroy-early.js, works beautifully! Thanks 👍Note: the
socket hang uperror is the expected outcome once the theTypeErroris solved.tls: fix legacy SecurePair session resumption
tls: fix legacy SecurePair clienthello race window
bnoordhuis commentedon Jul 9, 2019
#26452 was merged in March but apparently didn't auto-close this issue. I'll do it the old-fashioned way then.