Skip to content

Chromium v141 crashes with SIGTRAP on launch() with setExecutablePath in Docker, but works via connectOverCDP #1871

@juanmanuelromeraferrio

Description

@juanmanuelromeraferrio

Version

1.56.0

Steps to reproduce

Steps to reproduce

  • Run inside a Docker container (AL2023 Linux).
  • Download the Chromium binary compatible with the Playwright version (Chromium 141.0.7390.37).
  • Execute the following Java code using launch():
try (Playwright playwright = Playwright.create()) {
    BrowserType.LaunchOptions options = new BrowserType.LaunchOptions();
    
    // Pointing to the specific downloaded binary
    options.setExecutablePath(Paths.get("/path/to/chrome-linux64/chrome"));

    // THIS ACTION CRASHES
    Browser browser = playwright.chromium().launch(options);
}

Expected behavior

The browser should launch successfully and allow the test to proceed, given that the binary is valid and runs successfully when executed manually via the command line in the same container.

Actual behavior

The browser process starts but immediately crashes with a SIGTRAP signal before the test can proceed.

/home/jenkins/workspace/standard-boot-reference-apps.snapshot/refboot-rest/.gradle/browsers/chrome/linux-141.0.7390.37/chrome-linux64/chrome --disable-field-trial-config --disable-background-networking --disable-background-timer-throttling --disable-backgrounding-occluded-windows --disable-back-forward-cache --disable-breakpad --disable-client-side-phishing-detection --disable-component-extensions-with-background-pages --disable-component-update --no-default-browser-check --disable-default-apps --disable-dev-shm-usage --disable-extensions --disable-features=AcceptCHFrame,AvoidUnnecessaryBeforeUnloadCheckSync,DestroyProfileOnBrowserClose,DialMediaRouteProvider,GlobalMediaControls,HttpsUpgrades,LensOverlay,MediaRouter,PaintHolding,ThirdPartyStoragePartitioning,Translate,AutoDeElevate,RenderDocument --enable-features=CDPScreenshotNewSurface --allow-pre-commit-input --disable-hang-monitor --disable-ipc-flooding-protection --disable-popup-blocking --disable-prompt-on-repost --disable-renderer-backgrounding --force-color-profile=srgb --metrics-recording-only --no-first-run --password-store=basic --use-mock-keychain --no-service-autorun --export-tagged-pdf --disable-search-engine-choice-screen --unsafely-disable-devtools-self-xss-warnings --edge-skip-compat-layer-relaunch --enable-automation --headless --hide-scrollbars --mute-audio --blink-settings=primaryHoverType=2,availableHoverTypes=2,primaryPointerType=4,availablePointerTypes=4 --no-sandbox --user-data-dir=/home/jenkins/workspace/standard-boot-reference-apps.snapshot/.gradle/tmp/playwright_chromiumdev_profile-fKyzbj --remote-debugging-pipe --no-startup-window
     -   - <launched> pid=413
     -   - [pid=413][err] [1202/154847.512043:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
     -   - [pid=413][err] [1202/154847.512091:ERROR:third_party/crashpad/crashpad/util/file/file_io_posix.cc:145] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
     -   - [pid=413] <gracefully close start>
     -   - [pid=413] <kill>
     -   - [pid=413] <will force kill>
     -   - [pid=413] <process did exit: exitCode=null, signal=SIGTRAP>
     -   - [pid=413] starting temporary directories cleanup
     -   - [pid=413] finished temporary directories cleanup
     -   - [pid=413] <gracefully close end>
         at app//com.microsoft.playwright.impl.WaitableResult.get(WaitableResult.java:54)
         at app//com.microsoft.playwright.impl.ChannelOwner.runUntil(ChannelOwner.java:138)
         at app//com.microsoft.playwright.impl.Connection.sendMessage(Connection.java:131)
         at app//com.microsoft.playwright.impl.ChannelOwner.sendMessage(ChannelOwner.java:124)
         at app//com.microsoft.playwright.impl.BrowserTypeImpl.launch(BrowserTypeImpl.java:48)
         at app//com.microsoft.playwright.impl.BrowserTypeImpl.launch(BrowserTypeImpl.java:35)
         at app//com.me.standard.reference.boot.PlaywrightTest.setup(PlaywrightTest.java:49)

Additional context

I have confirmed that the binary is healthy and the environment is capable of running it. I verified this by isolating the launch mechanism:

1. Manual Launch (Working): If I run the exact same binary in the background using a shell command with a port (bypassing the Pipe connection):

/path/to/chrome --headless=new --no-sandbox --disable-gpu --remote-debugging-port=9222

2. Connect via Playwright (Working): I can then successfully run my tests by changing the Java code to:

playwright.chromium().connectOverCDP("http://localhost:9222");

Hypothesis: The crash seems specific to the launch() method, likely due to the use of --remote-debugging-pipe or specific flags injected by Playwright causing a conflict (likely a security/trap issue) in this Docker environment with Chromium v141.

Environment

  • OS: AL2023 in Docker
  • Playwright Java Version: 1.56.0
  • Browser: Chromium 141.0.7390.37 (Bundled/Downloaded)
  • Java Version: 21

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions