Zenika / alpine-chrome

Chrome Headless docker images built upon alpine official image
https://hub.docker.com/r/zenika/alpine-chrome
Apache License 2.0
1.78k stars 239 forks source link

zenika/alpine-chrome:100-with-puppeteer has segmentation fault during apk-upgrade #227

Open JeffMathewSyngenta opened 1 year ago

JeffMathewSyngenta commented 1 year ago

Describe the bug There is a segmentation fault that occurs during apk upgrade.

To Reproduce

  1. From any docker host run: docker run -it --user root zenika/alpine-chrome:100-with-puppeteer /bin/sh
  2. Within the interactive session run the following commands:
  3. apk update
  4. apk upgrade
C:\Users\me>docker run -it --user root zenika/alpine-chrome:100-with-puppeteer /bin/sh
/usr/src/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
v20230329-1235-g19d55ea329b [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v20230329-989-g60d6099329f [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v20230329-982-gb756bb4e14e [http://dl-cdn.alpinelinux.org/alpine/edge/testing]
v3.12.12-45-g8116a127ec [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
OK: 30604 distinct packages available
/usr/src/app # apk upgrade
Upgrading critical system libraries and apk-tools:
(1/3) Installing libcrypto3 (3.1.0-r3)
(2/3) Installing libssl3 (3.1.0-r3)
(3/3) Upgrading apk-tools (2.12.9-r1 -> 2.14.0_rc1-r0)
Executing busybox-1.35.0-r7.trigger
Executing ca-certificates-20211220-r0.trigger
Continuing the upgrade transaction with new apk-tools:
Segmentation fault
/usr/src/app # apk list
Segmentation fault

This can also be reproduced by the following dockerfile

FROM zenika/alpine-chrome:100-with-puppeteer
USER root
RUN apk update && apk upgrade

What is the expected behavior? No seg fault What is the actual behavior? seg fault Further calls to apk binary fail. Eg: apk list

Possible solution Switching to zenika/alpine-chrome:with-puppeteer shows no error with the above reproduction steps. This is strange because I think these tags reference the same image?

Logs

Versions This problem repros in two host setups:

Windows Host Windows 11 Pro 22H2 22621.1555

Docker version 20.10.21, build baeda1f

CircleCi ubuntu-2204:2023.02.1 Docker version 20.10.23, build 7155243 Linux 5.15.0-1028-aws #32-Ubuntu SMP Mon Jan 9 12:28:07 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

dewadg commented 1 year ago

Got the same issue, but works well in :with-node

zigarn commented 1 year ago

Need to update the README but 100-with-puppeteer is a 1 year old image built when Chromium with in version 100. On the opposite with-puppeteer is the latest build of the image and at the current time it's built on top of alpine 3.17 with Chromium 112. Between the 2 versions, a lot of upgrades and cleanup has been made on the use of alpine repositories.

So if you can and it fixes the issue, please use a more recent version of the image: https://hub.docker.com/r/zenika/alpine-chrome/tags?name=with-puppeteer