Repository navigation
fix(capture): don't close short-first-write TCP conns stalled in the inspectors - #466
Merged
Merged
Conversation
…inspectors The capture listener's http_inspector/tls_inspector stall on an INCONCLUSIVE first write: a raw-TCP client whose first chunk is <6 bytes never satisfies the sniffers, chain selection never runs, and Envoy's default 15s listener_filters_timeout CLOSES the connection (continue_on defaults false). Server-first protocols (MySQL-style greeting) would always hit this. Found chasing a phantom "~4-minute new-SA cold start": five independent probes all flipped at exactly request #100 — because the probe payload "p$i" crosses to >=6 bytes at p100. Payloads p1..p99 failed, p100+ worked, on ANY pod at ANY age (reproduced live: 4-byte write fails, 6-byte works, same pod, same second). SPIRE entry (<1s), SVID delivery (+4.8s), and LDS (+2s) were all innocent. Fix: listener_filters_timeout: 1s + continue_on_listener_filters_timeout: true on the capture listener. Inconclusive conns proceed to chain matching, where a TCP-service destination still wins on the /32 destination-IP tier (dest IP outranks every protocol tier) — short-first-write and server-first TCP work with at most +1s connect latency. Real HTTP/TLS clients send their preface immediately and never wait. envoy --mode validate green. Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_01N7oY7W8oDXrqDzFgoZh25S
This was referenced Sep 20, 2026
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.
The capture listener's inspectors stall on an inconclusive first write (<6 bytes raw TCP, or server-first protocols that write nothing) → chain selection never runs → Envoy's default 15s
listener_filters_timeoutcloses the conn.Found chasing a phantom "~4-min new-SA cold start": five probes all flipped at exactly request #100 — the payload
p$icrosses to ≥6 bytes atp100. Reproduced live on a steady-state pod: 4-byte first write fails, 6-byte works, same second. SPIRE/SDS/LDS were innocent (<5s each).Fix:
listener_filters_timeout: 1s+continue_on_listener_filters_timeout: true— inconclusive conns proceed to matching, where TCP-service dests still win on the /32 dest-IP tier. At most +1s connect latency for short-first-write/server-first TCP; HTTP/TLS clients never wait. Tests +envoy --mode validategreen.