Repository navigation
Conversation
ryjen
left a comment
There was a problem hiding this comment.
Independent review of the opt-in regression test at commit 40b78ef.
Required before offering this as an upstream test: The doneServing channel is sent to by every accepted connection, including dials that the client later times out and retries. With as many as 12 attempts per counted session, the fixed count*2 buffer does not bound all sends. A full channel blocks inside OnTCP before its deferred conn.Close(), manufacturing open connections and potentially contaminating the very teardown scenario being tested. Prefer removing this channel and relying on the client's successful read through EOF to establish completed server-first closes; alternatively use an explicitly nonblocking, per-attempt signal with reliable attribution.
Additional improvements: avoid asserting that a failed dial is definitely a TIME_WAIT collision (it is one hypothesis); make the manual standalone-process requirement explicit because the negative test leaves a stuck Close goroutine; document that 550 completed client sessions do not measure 550 gVisor TIME_WAIT endpoints.
The before/after evidence is valuable (old dependency fails 2/2; updated passes 6/6) and the test should stay separate from the minimal dependency PR.
Purpose
Review the opt-in Tailcat integration regression harness for upstream issue #151, separately from the dependency-only change in PR #1.
Base:
fix/netstack-close-151(patched dependency commit3064e971). Head:test/netstack-close-integration-151. This PR should contain only the newclose_regression_151_test.go.Before/after evidence
Same test body against:
mainat52fbad323: 2/2 completed 550 short-lived, server-first-close TCP sessions and thenServer.Close()failed to return within five seconds.3064e971: 6/6 completed 550 sessions andServer.Close()returned in ~1.8–2.7 ms after session setup.Run manually in a dedicated test process:
This test is excluded from the default suite, because the old dependency may leave
Server.Closehung. Run it in a dedicated Go test process; the failure path intentionally does not attempt potentially blocking cleanup. It uses a local in-process DERP/STUN setup and has bounded dials, overall execution, and close waiting.Review guidance
GitHub Actions workflows now run on fork PR #1; at the patched base head
8f2dccedb, Supply-chain, Test (including WebAssembly browser integration), and Nix CI all passed. This test PR is deliberately stacked and has no independent hosted check of the opt-in 550-session test.Review fix and exact-head validation (2026-10-19)
Commit
74439947removed the shared handler-completion channel, preventing test-induced handler blocking. The client reading to EOF now establishes server-first completion; TIME_WAIT remains a possible cause of stalled dials, not an independently instrumented count.The identical revised harness was tested on the original dependency (
52fbad323): 2/2 cases completed 550 sessions thenServer.Closeexceeded the five-second bound. On the updated dependency (3064e97): 3/3 cases passed, withServer.Closereturning approximately 1.6–2.1 ms after sessions finished. Fullgo test -p 2 -count=1 -timeout=120s ./...and taggedgo vet -p 2 -tags=tailcat_close_stress ./...passed. Diff checks clean. Review thread resolved; Nix, cross-platform, and supply-chain CI passed on the base PR #1 head.