-
Notifications
You must be signed in to change notification settings - Fork 17.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
crypto/tls: deadlock/hang in handshake #71269
Comments
FTR I managed to simplify this down to this code: https://github.com/porridge/go-tls-hang-repro Unfortunately building in playground times out. |
are you sure it's not a problem of your pipe? switching it out for net.Listen("tcp", ":0") seems to make it work |
CC @golang/security |
This comment has been minimized.
This comment has been minimized.
@seankhliao I think the pipe works fine, but |
(BTW I was not able to reproduce this when using TCP on Linux even when reducing the socket buffer sizes to minimum allowed.) |
Go version
go version go1.23.4 linux/amd64
Output of
go env
in your module/workspace:What did you do?
We have a test which sets up a TLS connection using custom CA, certificates and VerifyPeerCertificate function.
In Go 1.23.x some interaction between these settings causes both the client and the server to hang in
crypto/tls.(*Conn).flush()
indefinitely.I'm still working on getting a minimal repro case running (the TLS config setup is quite involved in our codebase).
But since apparently this is already fixed in 1.24rc1, I'm reporting this early in the hope that maintainers will be able to say "oh right commit suchandsuch hapened to fix this, let's just backport".
Fully reproducible with:
Then bump
1.22.5
to1.23.4
ingo.mod
and try again 👉🏻 failure, see stack traces below.Then try the same with
GOTOOLCHAIN=go1.24rc1
👉🏻 success.FTR, the "Error watching TLS certificate directory" message is irrelevant.
What did you see happen?
What did you expect to see?
Success, like in the 1.22 and 1.24rc1 cases.
The text was updated successfully, but these errors were encountered: