Skip to content

fix(dashboard): retry singleton listen with backoff on Windows shutdown race#40641

Closed
Skn0tt wants to merge 1 commit intomicrosoft:mainfrom
Skn0tt:agents/singleton-acquisition-update-dashboardapp
Closed

fix(dashboard): retry singleton listen with backoff on Windows shutdown race#40641
Skn0tt wants to merge 1 commit intomicrosoft:mainfrom
Skn0tt:agents/singleton-acquisition-update-dashboardapp

Conversation

@Skn0tt
Copy link
Copy Markdown
Member

@Skn0tt Skn0tt commented May 5, 2026

When the previous dashboard instance is mid-shutdown on Windows, net.createServer().listen() can fail with EBUSY even after a failed net.connect() (because the pipe name is still transiently held by the kernel). This causes the singleton acquisition to fail rather than waiting for the previous instance to finish closing.

  • Retry server.listen with exponential backoff (100ms, 200ms, 400ms, 800ms, 1600ms) when the connect-then-listen path fails
  • Give up and reject after 5 retries (~3.1s total)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

Test results for "MCP"

30 failed
❌ [firefox] › mcp/cli-devtools.spec.ts:115 › per-part commands extract individual parts @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:138 › request* and response* commands support --filename @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:173 › response-body returns just the body @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:189 › request with out-of-range index @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:199 › tracing-start-stop @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:217 › video-start-stop @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:231 › video-chapter @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:239 › generate-locator @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:248 › highlight @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-devtools.spec.ts:265 › highlight --hide @mcp-windows-latest-firefox
❌ [firefox] › mcp/cli-session.spec.ts:99 › session stops when browser exits @mcp-windows-latest-firefox
❌ [firefox] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-firefox
❌ [firefox] › mcp/http.spec.ts:142 › http transport browser sigint @mcp-windows-latest-firefox
❌ [firefox] › mcp/launch.spec.ts:101 › isolated context @mcp-windows-latest-firefox
❌ [msedge] › mcp/cli-session.spec.ts:56 › close-all @mcp-windows-latest-msedge
❌ [msedge] › mcp/cli-session.spec.ts:99 › session stops when browser exits @mcp-windows-latest-msedge
❌ [msedge] › mcp/cli-session.spec.ts:113 › session reopen with different config @mcp-windows-latest-msedge
❌ [msedge] › mcp/cli-session.spec.ts:130 › workspace isolation - sessions in different workspaces are isolated @mcp-windows-latest-msedge
❌ [msedge] › mcp/cli-session.spec.ts:162 › list --all lists sessions from all workspaces @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:124 › daemon show: closing page exits the process @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:164 › should capture annotations via show --annotate @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:231 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:264 › should annotate when context has no fixed viewport @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:301 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:332 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:361 › should switch screencast to -s session on show --annotate @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:410 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-msedge
❌ [msedge] › mcp/dashboard.spec.ts:477 › save recording streams WebM bytes to the chosen file @mcp-windows-latest-msedge

6874 passed, 1052 skipped


Merge workflow run.

@Skn0tt Skn0tt closed this May 6, 2026
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