You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
tcpDest dials once and never reconnects — a receiver restart is a permanent blind #339
Found by the red-team harness (findings.md harness row 20261114T085910, re-pinned by the Phase 4 premortem audit; docs/redteam-plan.md rows rt-4-7 / rt-11-5 measure it next).
Mechanism
pkg/xtcp/destinations_tcp.go: net.Dial at newTCPDest, and Send has no retry path — every subsequent envelope writes broken pipe forever after the receiver closes, even when the receiver is listening again. TCP-destination telemetry stays blind until a daemon restart. Counters do light up (destTCP/Write/error, Poller/envelopeFlush/error) but nothing repairs.
Measured
The harness hit this by restarting the catcher (the jsonl sink) mid-run: every subsequent envelope errored until the daemon was restarted.
Fix directions
reconnect with backoff on write error (bounded attempts, jitter), and/or
a destTCP/reconnect counter + a delivered-stale alert so the blind is paged, not just logged.
Scenarios
rt-4-7 (broker-outage recovery) and rt-11-5 (L2 delivery kill) measure the outage family; when a reconnect lands, their expectations flip in the same PR.
Fixed by PR #348 (with the expectation flip on the row that pinned it): the tcp destination's worker now reconnects — a failed write closes the conn and the next attempt re-dials under full-jitter backoff (the cap derived like the s3 ladder), with a bounded attempt budget per envelope and a write deadline bounding each dial.
Measured by rt-4-7 (BLOCKED 15/15, evidence 20261126T110001-209ab068a-1548426): with the catcher stopped, the outage is counted (destTCP Write/error=24, Dial/error=25, xtcp_tcp_dropped_total=9) and polling continues — and the catcher restart heals delivery with no daemon restart (reconnects=1, 2482 lines/6 s after return; the pre-fix run measured 0 lines/6 s with the catcher back until a daemon restart). rt-11-5's de-poison arcs confirm the same on the L2 blackhole variant.
Startup also no longer aborts on a down sink: newTCPDest validates the address and leaves dialing to the worker, so the daemon starts with the sink unreachable and heals when it returns.
Correction: the fix landed in PR #352 (not #348 as referenced above — that number went to an unrelated PR in the meantime). The branch is redteam/tcp-dest-queue-worker, commit 55f387519.
Activity
docs(redteam): cross-reference the filed follow-up issues (#337-#343)
randomizedcoder commentedon Nov 26, 2026
Fixed by PR #348 (with the expectation flip on the row that pinned it): the tcp destination's worker now reconnects — a failed write closes the conn and the next attempt re-dials under full-jitter backoff (the cap derived like the s3 ladder), with a bounded attempt budget per envelope and a write deadline bounding each dial.
Measured by rt-4-7 (BLOCKED 15/15, evidence
20261126T110001-209ab068a-1548426): with the catcher stopped, the outage is counted (destTCPWrite/error=24, Dial/error=25,xtcp_tcp_dropped_total=9) and polling continues — and the catcher restart heals delivery with no daemon restart (reconnects=1, 2482 lines/6 s after return; the pre-fix run measured 0 lines/6 s with the catcher back until a daemon restart). rt-11-5's de-poison arcs confirm the same on the L2 blackhole variant.Startup also no longer aborts on a down sink:
newTCPDestvalidates the address and leaves dialing to the worker, so the daemon starts with the sink unreachable and heals when it returns.randomizedcoder commentedon Nov 27, 2026
Correction: the fix landed in PR #352 (not #348 as referenced above — that number went to an unrelated PR in the meantime). The branch is
redteam/tcp-dest-queue-worker, commit55f387519.Merge pull request #352 from randomizedcoder/redteam/tcp-dest-queue-w…