Skip to content

Browser control service hangs for 15s and leaves zombies on startup failure #8611

Closed

Description

@Wren-OC

Bug Description

When the browser control service spawns Chromium, it enters a while loop waiting for the CDP port to become reachable. If Chromium exits immediately (e.g. due to port conflict, missing libraries, or profile lock), the loop continues for the full 15 seconds before throwing a timeout error.

Additionally, because the Gateway often runs as PID 1 in Docker containers, the dead Chromium process becomes a zombie (<defunct>) because the parent process does not explicitly reap it (or is busy waiting in the loop).

Symptoms

  1. browser start hangs for 15 seconds then fails with "Can't reach the openclaw browser control service".
  2. ps aux shows [chromium] <defunct> processes accumulating.

Root Cause

  1. Logic: The startup loop in chrome.js checks isChromeReachable but does not check proc.exitCode or listen for the exit event. It waits blindly.
  2. Infrastructure: Node.js as PID 1 does not handle zombie reaping of adopted children (orphans).

Proposed Fix

  1. Modify chrome.js to race the wait loop against proc.on('exit'). If the process exits, reject immediately with the exit code.
  2. Recommend tini (--init) in Docker documentation to handle zombie reaping at the system level.

Activity

  1. added
    bug
    on Feb 4, 2026
  2. sebslight commented on Feb 4, 2026

    @sebslight
    Contributor

    Duplicate of #3941

  3. locked as resolved and limited conversation to collaborators on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions