[BUG] Page crashes in headless chromium in Docker
See original GitHub issueContext:
- Playwright Version: 1.5.2 chromium (in 1.4.0 with previous browser version it was fine)
- Operating System: Ubuntu Bionic
- Node.js version: 12.18.3
- Browser: Chromium 88.0.4287.0
Description: We have tests run in Docker. Image based on official PW image (check the Dockerfile below). From time to time some of tests fail because of page crash (usually during opening website main page after logging in). It happens randomly and I was not able to reproduce it in headless mode. I even don’t know how to reproduce it at all. So it has been happening only when run in Docker.
I turned on pw:browser logging and was able to grab browser logs:
2020-11-02T09:35:21.342Z pw:browser [err] [1102/093521.342698:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
2020-11-02T09:35:23.307Z pw:browser [err] [1102/093523.307796:ERROR:cert_issuer_source_aia.cc(104)] AiaRequest::OnFetchCompleted got error -301
2020-11-02T09:35:23.308Z pw:browser [err] [1102/093523.308301:ERROR:ssl_client_socket_impl.cc(962)] handshake failed; returned -1, SSL error code 1, net_error -202
2020-11-02T09:35:24.269Z pw:browser [err] Received signal 11 SEGV_MAPERR 7f9adb995000
2020-11-02T09:35:24.343Z pw:browser [err] #0 0x55afd03ae2f9 base::debug::CollectStackTrace()
2020-11-02T09:35:24.358Z pw:browser [err] #1 0x55afd0324743 base::debug::StackTrace::StackTrace()
2020-11-02T09:35:24.414Z pw:browser [err] #2 0x55afd03ade9b base::debug::(anonymous namespace)::StackDumpSignalHandler()
2020-11-02T09:35:24.414Z pw:browser [err] #3 0x7f9adb35f8a0 (/lib/x86_64-linux-gnu/libpthread-2.27.so+0x1289f)
2020-11-02T09:35:24.421Z pw:browser [err] #4 0x55afce35b444 device::OneWriterSeqLock::WriteBegin()
2020-11-02T09:35:24.465Z pw:browser [err] #5 0x55afd17fa079 cc::DroppedFrameCounter::ReportFrames()
2020-11-02T09:35:24.490Z pw:browser [err] #6 0x55afd1845b81 cc::CompositorFrameReporter::TerminateReporter()
2020-11-02T09:35:24.517Z pw:browser [err] #7 0x55afd184559f cc::CompositorFrameReporter::~CompositorFrameReporter()
2020-11-02T09:35:24.540Z pw:browser [err] #8 0x55afd18455ca cc::CompositorFrameReporter::~CompositorFrameReporter()
2020-11-02T09:35:24.566Z pw:browser [err] #9 0x55afd18449b6 base::internal::VectorBuffer<>::DestructRange<>()
2020-11-02T09:35:24.598Z pw:browser [err] #10 0x55afd1844d31 base::circular_deque<>::erase()
2020-11-02T09:35:24.626Z pw:browser [err] #11 0x55afd1844568 cc::CompositorFrameReportingController::DidPresentCompositorFrame()
2020-11-02T09:35:24.655Z pw:browser [err] #12 0x55afd1873ccf cc::ProxyImpl::DidPresentCompositorFrameOnImplThread()
2020-11-02T09:35:24.676Z pw:browser [err] #13 0x55afd1806602 cc::LayerTreeHostImpl::DidPresentCompositorFrame()
2020-11-02T09:35:24.707Z pw:browser [err] #14 0x55afd1b66a70 cc::mojo_embedder::AsyncLayerTreeFrameSink::OnBeginFrame()
2020-11-02T09:35:24.719Z pw:browser [err] #15 0x55afce4973dd viz::mojom::CompositorFrameSinkClientStubDispatch::Accept()
2020-11-02T09:35:24.746Z pw:browser [err] #16 0x55afd0a92696 mojo::InterfaceEndpointClient::HandleValidatedMessage()
2020-11-02T09:35:24.773Z pw:browser [err] #17 0x55afd0a98f98 mojo::internal::MultiplexRouter::ProcessIncomingMessage()
2020-11-02T09:35:24.792Z pw:browser [err] #18 0x55afd0a9879c mojo::internal::MultiplexRouter::Accept()
2020-11-02T09:35:24.824Z pw:browser [err] #19 0x55afd0a90cfe mojo::Connector::DispatchMessage()
2020-11-02T09:35:24.840Z pw:browser [err] #20 0x55afd0a9142e mojo::Connector::ReadAllAvailableMessages()
2020-11-02T09:35:24.861Z pw:browser [err] #21 0x55afd0aa8209 mojo::SimpleWatcher::OnHandleReady()
2020-11-02T09:35:24.893Z pw:browser [err] #22 0x55afd0370bc6 base::TaskAnnotator::RunTask()
2020-11-02T09:35:24.914Z pw:browser [err] #23 0x55afd038173d base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl()
2020-11-02T09:35:25.007Z pw:browser [err] #24 0x55afd0381438 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork()
2020-11-02T09:35:25.040Z pw:browser [err] #25 0x55afd0338b6a base::MessagePumpDefault::Run()
2020-11-02T09:35:25.076Z pw:browser [err] #26 0x55afd0381d5d base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run()
2020-11-02T09:35:25.126Z pw:browser [err] #27 0x55afd035895e base::RunLoop::Run()
2020-11-02T09:35:25.149Z pw:browser [err] #28 0x55afcfef8105 blink::scheduler::WorkerThread::SimpleThreadImpl::Run()
2020-11-02T09:35:25.166Z pw:browser [err] #29 0x55afd03bf17a base::(anonymous namespace)::ThreadFunc()
2020-11-02T09:35:25.166Z pw:browser [err] #30 0x7f9adb3546db start_thread
2020-11-02T09:35:25.166Z pw:browser [err] #31 0x7f9ad59caa3f clone
2020-11-02T09:35:25.166Z pw:browser [err] r8: 0000000000000003 r9: 0000000000000bf7 r10: 0000000000000006 r11: 0018e64030ddfc9e
2020-11-02T09:35:25.166Z pw:browser [err] r12: 000000000000002e r13: aaaaaaaaaaaaaaaa r14: 0000014a6353ad48 r15: aaaaaaaaaaaaaaaa
2020-11-02T09:35:25.166Z pw:browser [err] di: 00007f9adb995000 si: 0000400000000000 bp: 00007f9ac9e63be0 bx: 0000000000000000
2020-11-02T09:35:25.166Z pw:browser [err] dx: ffff800000000000 ax: 000000000000002e cx: 0000000000000000 sp: 00007f9ac9e63be0
2020-11-02T09:35:25.167Z pw:browser [err] ip: 000055afce35b444 efl: 0000000000010206 cgf: aaaa000000000033 erf: 0000000000000006
2020-11-02T09:35:25.167Z pw:browser [err] trp: 000000000000000e msk: 0000000000000000 cr2: 00007f9adb995000
2020-11-02T09:35:25.167Z pw:browser [err] [end of stack trace]
2020-11-02T09:35:25.167Z pw:browser [err] Calling _exit(1). Core file will not be generated.
Dockerfile:
FROM mcr.microsoft.com/playwright:bionic
USER root
RUN apt-get update \
&& apt-get install -y gnupg2 \
&& apt-get install -y wget --no-install-recommends \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt update \
&& apt install yarn \
&& yarn add playwright-chromium@1.5.2
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
WORKDIR e2e
# Configure yarn
RUN npm set strict-ssl false \
&& export NODE_OPTIONS=--max_old_space_size=4096 \
&& yarn config set registry https://nexus.devops.bfsaws.net/repository/NPMPROXY
COPY package.json /e2e/
COPY yarn.lock /e2e/
COPY tsconfig.json /e2e/
COPY .env.dev-secrets /e2e/
# Restore packages
RUN yarn
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
Issue 715363: Chrome crashes/fails to load when /dev/shm is ...
1. Create a Docker container with the default /dev/shm size (64MB) or smaller (ideally, say, 10MB) · 2. Launch Chrome inside the container...
Read more >Run headless chrome in Docker suddely crashes - Ask Ubuntu
Downgrading kernel to 4.18.0-25-generic solves the issue. Seems to be an incompatibility between Docker and Kernel 5.0.0.
Read more >headless chrome on docker M1 error - unable to discover ...
Found an answer! The key is: match container version to host version. it could accomplished by just do not specifying platform version.
Read more >Troubleshooting - Puppeteer
Chromium currently does not provide arm64 binaries for Linux. ... there's no good sandbox for Chrome to use, it will crash with the...
Read more >Selenium webdriver, chromedriver and chrome with docker ...
selenium.common.exceptions.WebDriverException: Message: unknown error: Chrome failed to start: crashed. (unknown error: DevToolsActivePort file doesn't ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@mxschmitt I’ve run tests several times after change and finally got a page crash. So it looks like the issue was not in Docker image.
Just in case, options for launching browser context:
@mxschmitt okay, I changed my Dockerfile to use mcr.microsoft.com/playwright:v1.5.2-bionic. I will keep an eye on tests and will comment here. Let’s keep it opened for a week.