Skip to content

fix(runner): force-kill worker that hangs on stop - #40637

Merged
pavelfeldman merged 1 commit into
microsoft:mainfrom
dgozman:fix-39753
May 5, 2026
Merged

fix(runner): force-kill worker that hangs on stop#40637
pavelfeldman merged 1 commit into
microsoft:mainfrom
dgozman:fix-39753

Conversation

@dgozman

@dgozman dgozman commented May 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Watchdog around __stop__: if the worker process does not exit within 5 min (overridable via PWTEST_CHILD_PROCESS_TIMEOUT for tests), it is force-killed (taskkill /T /F on Windows, SIGKILL elsewhere).
  • Force-kill emits a new processError event that the dispatcher reports via reporter.onError, so a hung worker fails the run.

Fixes #39753

Adds a watchdog around the `__stop__` round-trip: if the child process
does not exit within 5 minutes (overridable via PWTEST_CHILD_PROCESS_TIMEOUT
for tests), it is force-killed using `taskkill /T /F` on Windows and
SIGKILL elsewhere. Force-kill emits a new `processError` event that the
dispatcher surfaces via reporter.onError so the run fails.

Fixes microsoft#39753
@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "MCP"

12 failed
❌ [chromium] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:207 › should enter annotate mode on fresh dashboard.tsx mount with -s --annotate @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:231 › should annotate via direct browser_annotate MCP call @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:264 › should annotate when context has no fixed viewport @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:301 › should cancel browser_annotate when the MCP request is aborted @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:332 › should cancel browser_annotate when the MCP client disconnects @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:361 › should switch screencast to -s session on show --annotate @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:410 › should disengage annotate mode when --annotate client disconnects @mcp-windows-latest-chromium
❌ [chromium] › mcp/dashboard.spec.ts:477 › save recording streams WebM bytes to the chosen file @mcp-windows-latest-chromium
❌ [webkit] › mcp/dashboard.spec.ts:164 › should capture annotations via show --annotate @mcp-windows-latest-webkit
❌ [webkit] › mcp/dashboard.spec.ts:185 › should start dashboard and annotate when no dashboard is running @mcp-windows-latest-webkit
❌ [webkit] › mcp/http.spec.ts:103 › http transport browser lifecycle (isolated) @mcp-windows-latest-webkit

6892 passed, 1052 skipped


Merge workflow run.

@github-actions

github-actions Bot commented May 5, 2026

Copy link
Copy Markdown
Contributor

Test results for "tests 1"

3 flaky ⚠️ [chromium-library] › library/video.spec.ts:719 › screencast › should work with video+trace `@chromium-ubuntu-22.04-node22`
⚠️ [firefox-library] › library/inspector/cli-codegen-3.spec.ts:224 › cli codegen › should generate frame locators (4) `@firefox-ubuntu-22.04-node20`
⚠️ [webkit-page] › page/page-set-input-files.spec.ts:38 › should upload a folder `@webkit-ubuntu-22.04-node20`

41632 passed, 850 skipped


Merge workflow run.

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.

[Bug]: Playwright randomly not exitting

2 participants