Skip to content

Log what holds TCP connections when a Windows e2e attempt fails - #610

Merged
yansfil merged 1 commit into
mainfrom
diag/windows-sockets
Oct 6, 2026
Merged

yansfil merged 1 commit into
mainfrom
diag/windows-sockets

Conversation

@yansfil

@yansfil yansfil commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Refs #582

Summary

Chromium's net::ERR_NO_BUFFER_SPACE (WSAENOBUFS) on a loopback connect to a test's hided hit 3 of 469 Windows e2e jobs since 2026-10-04, once in the PR @platform lane as the 7th test of the job; no run recorded what held the sockets.
On a Windows CI run the web suite now adds a reporter that, for each failed test attempt and at that moment, logs three [windows sockets] lines: the TCP connection count, the count by state, and the ten owning process names holding the most.
A passing attempt runs nothing, other systems and local runs do not load the reporter, and nothing waits, retries or changes a timeout.

[windows sockets] <test> (attempt 1): TCP connections: <n>
[windows sockets] <test> (attempt 1): by state: <State> <n>, ...
[windows sockets] <test> (attempt 1): by process: <name> <n>, ...

Review

  • 조심해서 볼 파일: web/playwright.config.ts - the reporter is added only when CI is set and the platform is Windows; onTestEnd runs one PowerShell Get-NetTCPConnection per failed attempt, catches any error into a summary unavailable: line, and never throws into the run.

Evidence

  • 확인한 것: reporter wiring, locally with a throwaway spec of one passing and one failing test and the reporter added on the command line: only the failing attempt logged, and without PowerShell (macOS) it logged summary unavailable: Error: spawnSync powershell.exe ENOENT and the run went on.
  • 확인한 것: web/e2e/windows-sockets.unit.ts runs windowsTcpSummary on the real runner in the Windows check lane (web test) and checks the three lines; skipped elsewhere.
  • 확인한 것: pnpm --dir web lint, pnpm --dir desktop typecheck, and a typecheck of the reporter, the unit test and web/playwright.config.ts under the desktop e2e settings pass.
  • 확인하지 못한 것: the reporter on a real Windows failure; it prints only when a Windows e2e attempt fails.

Chromium's ERR_NO_BUFFER_SPACE (WSAENOBUFS) on a loopback connect to a
test's hided left nothing saying who held the sockets. On a Windows CI run
the web suite now adds a reporter that, for each failed attempt, logs the
TCP connection count by state and by owning process name at that moment;
a passing attempt runs nothing.
@yansfil
yansfil merged commit a990dd7 into main Oct 6, 2026
19 checks passed
@yansfil
yansfil deleted the diag/windows-sockets branch October 6, 2026 04:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant