Repository navigation
fix(connect): the minors of #111 and #117's reviews - #118
Merged
Merged
Conversation
#111 (review r106): - m1: the channel's own receive bound is one byte past both answer bounds, so a refusal a service passes on from a client whose bound equals the face's is never taken for the face's own (grpcio names the client's bound). - m2/m3: the docstring says a list of enums costs with the length of their names (measured 130x at 22 characters, 373x at 100, 687x at 200), so the JSON default's worst case depends on the service's enum names, and gives the measured process memory of a proto answer (54 to 98 MiB for 15 MiB). #117 (review r107): - m1: the client's SETTINGS, which completes its preface, goes to the server before the face waits for the server's, so a server that waits for the client's first is not stalled. - m2: a server that sends no SETTINGS within read_timeout gets the client a GOAWAY (INTERNAL_ERROR) naming why. - m3: a SETTINGS frame is scanned whole as it streams, holding one entry, so the server's limit is found wherever it is in the frame (not only in its first 256 bytes). A first frame is held to the 16 KiB any peer may send before it has the other's SETTINGS. Tests (each fails on main): test_a_refusal_naming_the_faces_own_bound_is_still_the_services, test_a_server_that_waits_for_the_clients_settings_is_not_stalled, test_a_server_that_sends_no_settings_gets_the_client_a_goaway, test_the_servers_limit_is_found_anywhere_in_its_settings (also fed one byte at a time). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…mes what happened Review r121 of #118: - B1: the GOAWAY for a server that sent no SETTINGS was the face's first frame to the client; RFC 9113 3.4 makes a server's first frame SETTINGS, and grpcio discarded the reason ("Expected SETTINGS frame as the first frame"). Every refusal of an opening is now an empty SETTINGS, then the GOAWAY. A real grpcio client logs "Got goaway [2] ... Debug Text: the gRPC server sent no SETTINGS within 0.5 s". - m1: the channel's receive bound is clamped to 2**31 - 1 (gRPC's channel arguments are C ints), so a bound at gRPC's largest starts again. - m2: the reason says what happened: no SETTINGS within N s, closed before its SETTINGS, a first frame of N bytes past the 16384 allowed, or a first frame that is not SETTINGS. - m3: the 16 KiB first-frame cap is tested in both directions; a client's oversized first frame gets SETTINGS + GOAWAY(FRAME_SIZE_ERROR). - m4: only the server's direction scans SETTINGS; the client's skips them as before (scan_bench: 14 GB/s, main 15 GB/s). - m5: a first frame that is not a SETTINGS frame on stream 0 without ACK is refused, from either peer, with GOAWAY(PROTOCOL_ERROR) naming it; the client's never reaches the server. Tests (each fails on 43edffd): test_a_server_that_sends_no_settings_gets_the_client_a_goaway (silent, closed, oversized, not-settings), test_a_grpc_client_hears_why_the_server_never_answered (a grpcio client in its own process), test_a_client_that_sends_no_settings_is_told_why, test_a_client_whose_first_frame_is_not_its_settings_is_refused (oversized, headers, settings-ack), test_a_bound_at_grpcs_largest_starts, and the client direction in test_the_servers_limit_is_found_anywhere_in_its_settings. 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.
Fixes the minor findings from the reviews of #111 (r106) and #117 (r107). Both of those PRs have merged.
#111
#117
read_timeout, the client now gets a GOAWAY (INTERNAL_ERROR) whose reason reads "the gRPC server sent no SETTINGS within N s".Classification: fixes, in the face.
Tests
These fail on main:
test_a_refusal_naming_the_faces_own_bound_is_still_the_servicestest_a_server_that_waits_for_the_clients_settings_is_not_stalledtest_a_server_that_sends_no_settings_gets_the_client_a_goawaytest_the_servers_limit_is_found_anywhere_in_its_settings: the limit sits past 360 bytes of other settings, and the frame is also fed one byte at a time.The face suite passes (56 cases).
go vetand the Connect Go tests pass, includingTestConnectOnlyServiceSyncs, now that Buf no longer rate-limits this machine.Review r121 (commit 4ecf543)
test_a_grpc_client_hears_why_the_server_never_answeredruns a grpcio client in its own process. Its transport logs "Got goaway [2] … Debug Text: the gRPC server sent no SETTINGS within 0.5 s".overflow_probe.py).scan_bench.py: 14 GB/s, against 15 GB/s on main.go vetand the fullgo test ./...pass.🤖 Generated with Claude Code