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

crypto/tls: TestServerHandshakeContextCancellation failures with "Unexpected server handshake error: EOF" #45299

Closed
millerresearch opened this issue Mar 30, 2021 · 6 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@millerresearch
Copy link
Contributor

The crypto/tls test TestServerHandshakeContextCancellation is flaky on plan9-arm, with errors like

--- FAIL: TestServerHandshakeContextCancellation (0.01s)
    handshake_server_test.go:1975: Unexpected server handshake error: EOF
    handshake_server_test.go:1985: Server connection was not closed when the context was canceled
FAIL
FAIL	crypto/tls	8.438s

Empirically I've found that inserting a 50 millisecond delay between the cli.writeRecord call and the following cancel prevents the failure. This suggests there's a race with the server's conn.HandshakeContext call.

I don't know whether this is related to #45106 but it seems possible.

@millerresearch
Copy link
Contributor Author

Yes, it is related to #45106. I can make the TestClientHandshakeContextCancellation test fail repeatably on plan9-arm too, by runniing it with '-count 100'. There too, I can prevent the race by inserting a delay between the conn.readClientHello and the cancel.

@dr2chase
Copy link
Contributor

Would you call this a duplicate of #45106, or not? Same root cause, isn't it?

@dr2chase dr2chase added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Mar 30, 2021
@millerresearch
Copy link
Contributor Author

Yes, I would say it's the same flaw appearing in two different places.

@gopherbot
Copy link

Change https://golang.org/cl/305250 mentions this issue: crypto/tls: fix flaky handshake cancellation tests

@bcmills
Copy link
Member

bcmills commented Apr 15, 2021

FWIW, this has also reproduced on platforms other than plan9:

2021-04-02T14:40:43-3651eff/freebsd-amd64-11_2
2021-03-30T03:28:19-3394586/openbsd-amd64-68
2021-03-24T21:20:10-179bcd7/darwin-amd64-10_12
2020-12-14T20:56:03-dea6d94/linux-amd64-jessie
2020-12-14T18:06:06-828746e/darwin-amd64-race
2020-11-12T21:21:18-60b1253/android-arm-corellium
2020-11-09T19:46:24-a2d0147/android-amd64-emu

plan9

2021-04-15T16:09:16-5631c4b/plan9-arm
2021-04-15T15:48:19-1d20a36/plan9-arm
2021-04-15T10:21:10-b1c4cc5/plan9-arm
2021-04-15T09:18:03-61a08fc/plan9-arm
2021-04-15T08:44:21-0184b44/plan9-arm
2021-04-14T21:58:06-c3931ab/plan9-arm
2021-04-14T19:57:35-1a8f0a7/plan9-arm
2021-04-14T19:54:26-a89ace1/plan9-arm
2021-04-14T14:03:55-e9cc31e/plan9-arm
2021-04-14T03:14:51-728e3dc/plan9-arm
2021-04-14T01:28:16-eb433ed/plan9-arm
2021-04-14T00:25:33-8dcc071/plan9-arm
2021-04-13T22:55:30-8c2a8b1/plan9-arm
2021-04-13T22:31:20-b4881d9/plan9-arm
2021-04-13T21:18:03-9913f82/plan9-arm
2021-04-13T13:56:21-13a4e8c/plan9-arm
2021-04-12T17:32:47-8b859be/plan9-arm
2021-04-12T17:28:43-5d80f8a/plan9-arm
2021-04-12T16:30:17-585b522/plan9-arm
2021-04-12T02:29:32-7beb988/plan9-arm
2021-04-10T03:38:08-6382ec1/plan9-arm
2021-04-09T23:54:31-554d2c4/plan9-arm
2021-04-09T19:11:12-756e2b1/plan9-arm
2021-04-09T18:49:05-c3faff7/plan9-arm
2021-04-09T17:56:50-0ad4688/plan9-arm
2021-04-09T14:36:20-77b3269/plan9-arm
2021-04-09T00:09:47-19034fa/plan9-arm
2021-04-07T13:14:57-b55d900/plan9-arm
2021-04-06T20:22:15-f5efa5a/plan9-arm
2021-04-06T18:01:39-55bac87/plan9-arm
2021-04-05T22:43:42-d446cb7/plan9-arm
2021-04-05T20:53:42-79b2e14/plan9-arm
2021-04-05T20:39:06-2701515/plan9-arm
2021-04-05T17:42:13-9abedf4/plan9-arm
2021-04-05T16:22:16-a06b08e/plan9-arm
2021-04-05T15:30:15-a4b8241/plan9-arm
2021-04-04T20:04:37-4230a6e/plan9-arm
2021-04-03T21:06:18-9e7bc80/plan9-arm
2021-04-03T01:45:17-0182113/plan9-arm
2021-04-02T19:45:52-41cf18e/plan9-arm
2021-04-02T19:27:06-34b87b4/plan9-arm
2021-04-02T12:44:37-a78b12a/plan9-arm
2021-04-02T05:24:14-aebc0b4/plan9-arm
2021-04-01T22:35:25-27d3062/plan9-arm
2021-04-01T00:51:26-ec721d9/plan9-arm
2021-04-01T00:51:24-1f29e69/plan9-arm
2021-04-01T00:51:23-3304b22/plan9-arm
2021-03-31T03:52:40-0e8a72b/plan9-arm
2021-03-31T00:52:58-6d2a557/plan9-arm
2021-03-31T00:52:26-f2717b3/plan9-arm
2021-03-30T21:20:51-e0ce0af/plan9-arm
2021-03-30T15:43:47-e4a4161/plan9-arm
2021-03-29T06:21:31-d10241f/plan9-arm
2021-03-25T17:01:28-82a1e0f/plan9-arm
2021-03-25T14:42:40-53941b6/plan9-arm
2021-03-25T13:57:08-9f4d5c9/plan9-arm
2021-03-25T04:21:29-dec3d00/plan9-arm
2021-03-25T03:19:56-4889afe/plan9-arm
2021-03-24T21:20:10-179bcd7/plan9-arm
2021-03-24T16:26:07-6f62f85/plan9-arm
2021-03-24T14:52:14-975b097/plan9-arm
2021-03-24T14:20:32-747f426/plan9-arm
2021-03-23T19:05:35-2887ef4/plan9-arm
2021-03-23T05:12:39-f4b9183/plan9-arm
2021-03-23T04:23:52-0265b64/plan9-arm
2021-03-23T03:49:17-b8371d4/plan9-arm
2021-03-23T01:36:23-b182ba7/plan9-arm
2021-03-19T17:31:59-4829031/plan9-arm
2021-03-19T14:27:48-196b104/plan9-arm
2021-03-19T01:38:59-9136d95/plan9-arm
2021-03-19T01:04:37-6704843/plan9-arm
2021-03-18T22:18:32-90b1ed1/plan9-arm
2021-03-18T13:31:52-9de49ae/plan9-arm
2021-03-18T03:42:56-6517844/plan9-arm
2021-03-18T01:46:58-f5e6d3e/plan9-arm
2021-03-18T00:23:25-51e4bb2/plan9-arm
2021-03-17T19:15:18-5423f60/plan9-arm
2021-03-17T17:50:50-8628bf9/plan9-arm
2021-03-17T16:53:00-70d54df/plan9-arm
2021-03-17T00:18:28-63b0a0a/plan9-arm
2021-03-16T20:46:00-72d98df/plan9-arm
2020-12-09T01:34:53-ae9b442/plan9-arm
2020-12-07T17:29:52-9c0e2db/plan9-arm
2020-12-07T07:59:54-c155931/plan9-arm
2020-12-04T08:49:16-b67b7dd/plan9-arm
2020-12-01T19:47:12-50b16f9/plan9-arm
2020-11-28T03:50:50-358d354/plan9-arm
2020-11-24T00:50:11-762eda3/plan9-arm
2020-11-23T19:58:25-48a1a51/plan9-arm
2020-11-21T03:28:08-3f5a975/plan9-arm
2020-11-13T23:26:54-4f63e0a/plan9-arm
2020-11-10T18:42:47-8f2db14/plan9-arm
2020-11-10T17:59:22-da3957a/plan9-arm

@bcmills bcmills changed the title crypto/tls: TestServerHandshakeContextCancellation is flaky on Plan 9 crypto/tls: TestServerHandshakeContextCancellation is flaky Apr 15, 2021
@bcmills bcmills added this to the Backlog milestone Apr 15, 2021
@bcmills bcmills changed the title crypto/tls: TestServerHandshakeContextCancellation is flaky crypto/tls: TestServerHandshakeContextCancellation failures with "Unexpected server handshake error: EOF" Apr 15, 2021
@bcmills
Copy link
Member

bcmills commented Apr 16, 2021

@golang golang locked and limited conversation to collaborators Apr 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants