Skip to content

[Bug]: 1.62.0 run-server hangs forever when multiple processes share one launchServer #42046

Description

@dunnbot

Version

1.62.0

Steps to reproduce

A PHP test suite (Pest 5 + pest-plugin-browser) drives Playwright through playwright run-server --mode launchServer. Under parallel test execution, several worker processes connect to a single run-server instance.

  1. Start playwright run-server --host 127.0.0.1 --port <port> --mode launchServer
  2. Connect N worker processes (here 10) to that one server and drive browsers concurrently
  3. Run a suite of 235 browser tests

Expected behavior

The run finishes, or a broken connection surfaces as an error. On 1.61.1 the identical suite completes in ~55s.

Actual behavior

On 1.62.0 the run reports most of its progress and then hangs permanently — no error, no timeout, no exit. Observed identically on a local macOS machine and on ubuntu-latest GitHub Actions runners, so it isn't environment-specific. The GitHub job had to be cancelled after 22 minutes of total silence.

Inspecting the stuck workers, every one holds a socket to the shared run-server port in CLOSE_WAIT:

php 79778 ... 14u IPv4 ... TCP 127.0.0.1:63154->127.0.0.1:63147 (CLOSE_WAIT)
php 79780 ... 14u IPv4 ... TCP 127.0.0.1:63163->127.0.0.1:63147 (CLOSE_WAIT)
php 79785 ... 14u IPv4 ... TCP 127.0.0.1:63155->127.0.0.1:63147 (CLOSE_WAIT)

The server end has closed, the client end never does, and the processes sit in state R — busy-spinning rather than blocking, which is why no timeout ever fires. Killing the run-server process does not release them; they keep spinning.

Separately, each run leaves its run-server process behind after the suite exits, so they accumulate across runs.

Bisect

Same suite, same test framework, same OS, only the playwright npm version changed:

Version Result
1.60.0 passes, ~57s
1.61.1 passes, ~55s
1.62.0 hangs indefinitely

Confirmed A/B/A: reinstalling 1.62.0 reproduced the hang, and returning to 1.61.1 passed again.

Serial execution on 1.62.0 is unaffected — 235 tests pass in ~194s. The hang requires multiple clients against one launchServer.

Currently pinned to ~1.61.1 as a workaround.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions