Skip to content
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

AssertionError at TLSWrap.onhandshakestart (_tls_wrap.js:66:3) #22240

Closed
alexlamsl opened this issue Aug 10, 2018 · 18 comments
Closed

AssertionError at TLSWrap.onhandshakestart (_tls_wrap.js:66:3) #22240

alexlamsl opened this issue Aug 10, 2018 · 18 comments
Labels
tls Issues and PRs related to the tls subsystem.

Comments

@alexlamsl
Copy link

  • Version: v10.6.0
  • Platform: Windows 10 x64
  • Subsystem: tls

A simple HTTPS server will occasionally die with the following trace:

assert.js:269
    throw err;
    ^

AssertionError [ERR_ASSERTION]: false == true
    at TLSWrap.onhandshakestart (_tls_wrap.js:66:3)
    at TLSWrap.loadSession [as onclienthello] (_tls_wrap.js:127:19)

The only relevant detail I can think of is the system clock is configured to synchronise with ntp.pool.org

@alexlamsl
Copy link
Author

IIRC I have observed that once on 10.4.1 back then, which prompted me to upgrade to 10.6.0

@maclover7
Copy link
Contributor

@alexlamsl Would you be able to please provide a minimal Node.js application to reproduce the problem

@maclover7 maclover7 added the tls Issues and PRs related to the tls subsystem. label Aug 10, 2018
@alexlamsl
Copy link
Author

@maclover7 crashing only 4 times over ~2 months makes investigations rather difficult.

If/when I have a reliable test case to illustrate this issue, you'll be the first to know.

@alexlamsl
Copy link
Author

FWIW this is the line that aborts node.exe:

assert(now >= lastHandshakeTime);

@N1k1t
Copy link

N1k1t commented Aug 12, 2018

Same problem. Node v10.5.0

@meesha81
Copy link

Same here, node v10.5.0
Aug 14 13:09:07: assert.js:269
Aug 14 13:09:07: throw err;
Aug 14 13:09:07: ^
Aug 14 13:09:07: AssertionError [ERR_ASSERTION]: false == true
Aug 14 13:09:07: at TLSWrap.onhandshakestart (_tls_wrap.js:66:3)

@adabru
Copy link

adabru commented Aug 19, 2018

I'm getting exactly the same 5 lines of error. It seems to occur after my ssl cert is renewed and the https server is auto-closed then recreated with the new cert+key. @alexlamsl maybe simulating a certificate change will trigger the error? If it's complex for you to try, I could try it out.

@alexlamsl
Copy link
Author

@adabru go right ahead — in my case the certificate always static.

@adabru
Copy link

adabru commented Aug 20, 2018

Ok, I couldn't reproduce it with changing the certificate.

@calzoneman
Copy link

Potentially related to issue #22149 / PR #22214.

I also ran into this issue, and subtracting the date from when the process started to when I got the first assertion error was almost exactly 2^31 milliseconds. And from tracing back through the code that leads to this assertion failure, it depends on the same GetNow() that was fixed in that PR.

@alexlamsl
Copy link
Author

@calzoneman thanks for the heads up - will test on 10.9.0 for a while & report back.

@adabru
Copy link

adabru commented Aug 22, 2018

In my case it also were 2^31 milliseconds.

@nesc58
Copy link

nesc58 commented Aug 27, 2018

Same error here with node 10.6.0

@nianjie
Copy link

nianjie commented Sep 24, 2018

same error here with node 10.0.0

@m1m1s1ku
Copy link

m1m1s1ku commented Sep 24, 2018

Same error with Node 10 on a Raspberry Pi running Docker (node:latest)

Can't find any step to reproduce

@Trott
Copy link
Member

Trott commented Nov 23, 2018

Potentially related to issue #22149 / PR #22214.

That fix landed in 10.9.0, so that's consistent with people who have reported this since to all be running releases earlier than that. Any chance anyone updated to 10.9.0 or later and noticed the problem stopping?

@calzoneman
Copy link

@Trott yes, the problem does not occur in node >= 10.9.0

@Trott
Copy link
Member

Trott commented Nov 24, 2018

Great! I'll close this. Thanks.

@Trott Trott closed this as completed Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tls Issues and PRs related to the tls subsystem.
Projects
None yet
Development

No branches or pull requests

10 participants