Skip to content

Terminate poisoned Playground PHP-WASM workers#2012

Merged
chubes4 merged 2 commits into
mainfrom
fix/2010-worker-rejection-exit
Jul 24, 2026
Merged

Terminate poisoned Playground PHP-WASM workers#2012
chubes4 merged 2 commits into
mainfrom
fix/2010-worker-rejection-exit

Conversation

@chubes4

@chubes4 chubes4 commented Jul 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • overlay @wp-playground/cli@3.1.46 so worker v1/v2 terminate after a fatal WebAssembly.RuntimeError originating from php.wasm
  • preserve the released CLI behavior for ordinary unhandled rejections
  • cover the real worker-thread boundary for both worker variants

Root cause

The Playground CLI worker logs and swallows every unhandledRejection, behavior introduced by WordPress/wordpress-playground#2682. A fatal PHP-WASM runtime rejection poisons the worker, but the worker remains alive and the parent recipe request waits until its 25-minute timeout. The parent-process handling merged in #2011 cannot observe a rejection raised inside the worker thread.

This is a temporary downstream overlay while WordPress/wordpress-playground#4160 tracks the owning upstream repair.

Fixes #2010.

Verification

  • npm ci
  • npm run build
  • npm run test:playground-worker-runtime-rejection
  • npm run test:phpunit-runtime-rejection
  • npm run test:playground-phpunit-readonly-cache-integration
  • npm run test:php-wasm-extension-manifests

The worker regression verifies that both v1 and v2 workers survive an ordinary unhandled rejection, then exit nonzero and propagate the reproduced php.wasm.zif_mysqli_poll runtime rejection.

AI assistance

OpenAI GPT-5.6 Sol via OpenCode investigated the worker boundary, drafted the overlay and regression coverage, and ran the listed verification. Chris Huber reviewed and remains responsible for the change.

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.

PHPUnit recipes hang after PHP WASM mysqli_poll runtime crash

1 participant