-
Notifications
You must be signed in to change notification settings - Fork 9.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker: The display compositor is frequently crashing. Goodbye. #3774
Comments
Found a solution: Set chrome to stable |
This seems to have broken again in latest stable. |
@nikhilo same here, did you find a solution? |
@rafael-paiva nope, just ended up downgrading to |
I'm using headless Firefox so my tests are not blocked. @franz101 can we re-open this issue? |
Can you guys share your docker container so that we can see this happenning locally? |
This is happening for me on These install Chrome @ 73.0.3683.75 Downgrading to |
@chrismllr do I understand correctly that it crashes for the Chrome that's bundled with the docker image? Does the Chromium version we bundle with Puppeteer crash the same way? |
It has also happened similar crashes while running tests for our project. By using Chromium@74.0.3723.0 (r637110: Puppeteer v1.13.0 bundled version) instead Chrome@73.0.3683.75, it gets working well. |
Chrome 73 breaks headless tests on CircleCI (see puppeteer/puppeteer#3774). While it's being investigated, using an older image should get us running tests again.
@aslushnikov Correct, it was the chrome in the prebuilt docker image. I may have jumped in based on a problem I was having elsewhere, but the bug seemed to be identical. |
Previously our E2E tests started failing with the following error. chrome not reachable 12:41:37 (Session info: headless chrome=73.0.3683.75) This issue was limited to the CI agent machines. In order to debug the issue, we SSH'd to ci-agent-8, became the jenkins user and changed to one of the workspace directories where the E2E tests are run. We than ran the E2E tests manually in order to reproduce the issue, as follows. make clone make pull make start docker-compose run publishing-e2e-tests bash Once inside the container where the tests are run, we were able to reproduce the issue with 'bundle exec rspec'. In order to investigate further, we then installed vim, in order to install the irb gem and start an irb console using 'bundle exec irb -Ispec'. Then we did require 'spec_helper' driver = Capybara.drivers[Capybara.current_driver].call driver.visit('https://google.com') driver.visit('https://google.com') Running the visit method twice yields the same error as when running the tests. Using 'docker exec' to start another bash console and inspect the running processes shows that Chrome itself is failing to start. root 252 245 11 17:26 pts/1 00:00:00 [chrome] <defunct> Running chrome manually with the options from the spec_helper then yields the following error, even though we hadn't changed these options. google-chrome-stable --disable-dev-shm-usage --disable-gpu --disable-web-security --disable-infobars --disable-notifications --headless --no-sandbox --window-size=1400,1400 https://google.com [0318/173719.964171:FATAL:gpu_data_manager_impl_private.cc(892)] The display compositor is frequently crashing. Goodbye. Searching online for this error indicates its related to a new version of Chrome, as per the following issue on the puppeteer repo. puppeteer/puppeteer#3774 Unfortunately it's not possible for us to downgrade Chrome, since Google only provide the latest version in their package repo, and the E2E tests are being run in transient containers, which have no older versions available to downgrade to. This is the point where we lost all hope. In Chapter 1 we experimented with running Chrome manually, based on https://developers.google.com/web/updates/2017/04/headless-chrome. google-chrome-stable --headless --no-sandbox https://google.com The success of this command indicated one of the options specified in the spec_helper was causing Chrome to crash, and experimentation showed this was '--disable-dev-shm-usage'. Removing this parameter fixed the error, but caused Chrome to crash for a different reason. /dev/shm is a tmpfs partition, but by default it is only 64M in size. Previously, we had specified the '--disable-dev-shm-usage' option to use /tmp instead, but the new release of Chrome makes this option unusable for some reason. The obvious remedy is to increase the size of /dev/shm. publishing-e2e-tests: shm_size: 2G <<< build: . The combination of removing the faulty option and specifying a larger size for /dev/shm meant we could then run the E2E tests successfully. And they all lived happily ever after.
Chapter 1: The Long Day ======================= Previously our E2E tests started failing with the following error. chrome not reachable 12:41:37 (Session info: headless chrome=73.0.3683.75) This issue was limited to the CI agent machines. In order to debug the issue, we SSH'd to ci-agent-8, became the jenkins user and changed to one of the workspace directories where the E2E tests are run. We than ran the E2E tests manually in order to reproduce the issue, as follows. make clone make pull make start docker-compose run publishing-e2e-tests bash Once inside the container where the tests are run, we were able to reproduce the issue with 'bundle exec rspec'. In order to investigate further, we then installed vim, in order to install the irb gem and start an irb console using 'bundle exec irb -Ispec'. Then we did require 'spec_helper' driver = Capybara.drivers[Capybara.current_driver].call driver.visit('https://google.com') driver.visit('https://google.com') Running the visit method twice yields the same error as when running the tests. Using 'docker exec' to start another bash console and inspect the running processes shows that Chrome itself is failing to start. root 252 245 11 17:26 pts/1 00:00:00 [chrome] <defunct> Running chrome manually with the options from the spec_helper then yields the following error, even though we hadn't changed these options. google-chrome-stable --disable-dev-shm-usage --disable-gpu --disable-web-security --disable-infobars --disable-notifications --headless --no-sandbox --window-size=1400,1400 https://google.com [0318/173719.964171:FATAL:gpu_data_manager_impl_private.cc(892)] The display compositor is frequently crashing. Goodbye. Searching online for this error indicates its related to a new version of Chrome, as per the following issue on the puppeteer repo. puppeteer/puppeteer#3774 Unfortunately it's not possible for us to downgrade Chrome, since Google only provide the latest version in their package repo, and the E2E tests are being run in transient containers, which have no older versions available to downgrade to. This is the point where we lost all hope. Chapter 2: The New Dawn ======================= In Chapter 1 we experimented with running Chrome manually, based on https://developers.google.com/web/updates/2017/04/headless-chrome. google-chrome-stable --headless --no-sandbox https://google.com The success of this command indicated one of the options specified in the spec_helper was causing Chrome to crash, and experimentation showed this was '--disable-dev-shm-usage'. Removing this parameter fixed the error, but caused Chrome to crash for a different reason. /dev/shm is a tmpfs partition, but by default it is only 64M in size. Previously, we had specified the '--disable-dev-shm-usage' option to use /tmp instead, but the new release of Chrome makes this option unusable for some reason. The obvious remedy is to increase the size of /dev/shm. publishing-e2e-tests: shm_size: 2G <<< build: . The combination of removing the faulty option and specifying a larger size for /dev/shm meant we could then run the E2E tests successfully. And they all lived happily ever after.
Ref the bug mentioned in puppeteer/puppeteer#3774
|
`FROM node:8-slim See https://crbug.com/795759RUN apt-get update && apt-get install -yq libgconf-2-4 Install latest chrome dev package and fonts to support major charsets (Chinese, Japanese, Arabic, Hebrew, Thai and a few others)Note: this installs the necessary libs to make the bundled version of Chromium that Puppeteerinstalls, work.RUN apt-get update && apt-get install -y wget --no-install-recommends It's a good idea to use dumb-init to help prevent zombie chrome processes.ADD https://github.com/Yelp/dumb-init/releases/download/v1.2.0/dumb-init_1.2.0_amd64 /usr/local/bin/dumb-init Uncomment to skip the chromium download when installing puppeteer. If you do,you'll need to launch puppeteer with:browser.launch({executablePath: 'google-chrome-unstable'})ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD trueRUN groupadd -r pptruser && useradd -r -g pptruser -G audio,video pptruser WORKDIR /home/pptruser/app Install puppeteer so it's available in the container.RUN npm i puppeteer Add user so we don't need --no-sandbox.RUN npm i -f Run everything after as non-privileged user.USER pptruser ` |
I switched over to |
how to you downgrade in the docker file? It's working now using a different docker container: but how do you set the chrome version to fixed? |
Having the same issue when running in ubuntu container under windows (not docker).
|
Im having the same issue on Google Chrome 74.0.3729.40 beta on WSL... Is this being worked by someone? should we create a bug report somewhere? |
In my case I resolved it by adding option --disable-features=VizDisplayCompositor. |
WSL-related issues are unrelated to Docker. Other than that, this seems to be fixed. |
@dpdudek Man after a couple of hours of dealing with this problem that option saved my day. Thanks! |
@larzuk91 When I enabled verbose log List of features is also available under chrome://flags, but now VizDisplayCompositor is not visible in my version of chrome ( 75.0.3770.80). |
Ohh, it's clearer now. Thanks a lot for helping me understand what was happening. The funny part is by disabling that feature, it only crashes 3 times and after that it works
Not sure why but I'm happy that I can run my tests locally :) |
THANK YOU!! |
Ran into the same error with an electron app I've had installed forever that sporadically broke. Solved with |
Hi,
I'm using a docker container with node:8-slim
and puppeteer 1.10.0. The container runs fine locally but on my Debian server I got the error Message:
gpu_data_manager_impl_private.cc(892)] The display compositor is frequently crashing. Goodbye.
I guess this might be chrome related and maybe caused through lack of memory.
.... Couldn't find anyone experiencing this error before.
The text was updated successfully, but these errors were encountered: