Repository navigation
Avoid a reference Restls server deadlock in carrier tests - #12
Merged
Merged
Conversation
The pinned reference Restls server holds its write lock while waiting for a client record. If a client record that asks for a reply arrives at that point, the read side blocks on the same lock and the server stops reading. The default script asks for replies in its first two records, and HTTP/2 transports write from both ends at once, so the TLS 1.2 case over gRPC or HTTP occasionally hung until the job timed out. The client was not at fault: it had sent everything and the reference server had stopped reading. Over HTTP/2 transports, use the default script without its reply commands. The plain transport keeps the default script and still covers replies. A watchdog now closes a stalled stream after 20 seconds so a hang fails the subtest instead of the whole job. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TestTLSCarriersAgainstPinnedReference/*/grpc/03-restlsoccasionally hung until the compatibility job hit its 10-minute timeout.Cause
The hang is in the pinned reference Restls server (
restls-client-gov0.1.9,restls_server.go), not in our client.The deadlock, from the reference peer's goroutines while hung:
WriteholdswriteMu, then waits inwaitToClientWritablefor a client record.Readgets a client record asking for a reply (ActResponse > 0) and callswriteRestlsRecords(nil). That blocks on the samewriteMu.From the socket queues while hung:
Why the TLS 1.2 case over gRPC/HTTP hits it:
250?100<1,350~100<1,...) asks for replies in its first two records.Change (test only)
Testing
make testand arm64make vetpass for darwin, linux and android. On windows,make vetfails only in ignored localbin/packages, the same as on main.🤖 Generated with Claude Code