Skip to content
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

chromium crashes with VNC_RESOLUTION=1920x1080 (too small space on /dev/shm) #53

Closed
raghavkarol opened this issue Nov 21, 2017 · 5 comments

Comments

@raghavkarol
Copy link

See. elgalu/docker-selenium#20 (comment)

@toschneck
Copy link
Contributor

Thx @raghavkarol for the hint. I can't reproduce the error in the current version. It's still a problem? I tried:

docker run -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser https://labs.consol.de

and all works fine. If so, can you please provide the commands to reproduce the error?

@raghavkarol
Copy link
Author

Sure, e.g., http://map.norsecorp.com and some other heavy URLs crash chromium and chrome.

The command below consistently crashes chrome:
docker run -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/

while this works:
docker run -it -v /dev/shm:/dev/shm -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/

@toschneck
Copy link
Contributor

toschneck commented Nov 27, 2017

@raghavkarol Ok I took a look at it and the error is reproducible. Due to the fact that our images are not designed to run as root see #3 we can't adjust our startup script to your mentioned solution.
In my opinion the best way for this is to set the flag docker run -it --shm-size=256m like described at: https://stackoverflow.com/questions/30210362/how-to-increase-the-size-of-the-dev-shm-in-docker-container.
To prevent that others will fall into this issue, I will add a hint at the README.md.
This should work also for you, or?

docker run --shm-size=256m -it -p 6901:6901 -e VNC_RESOLUTION=1920x1080 consol/centos-xfce-vnc:1.2.2 chromium-browser http://map.norsecorp.com/

@toschneck toschneck changed the title [Possible Solution] chromium crashes with VNC_RESOLUTION=1920x1080 chromium crashes with VNC_RESOLUTION=1920x1080 Nov 27, 2017
@toschneck toschneck changed the title chromium crashes with VNC_RESOLUTION=1920x1080 chromium crashes with VNC_RESOLUTION=1920x1080 (too small space on /dev/shm) Nov 27, 2017
@ghost ghost removed the IN PROGRESS label Dec 4, 2017
toschneck pushed a commit to ConSol/sakuli that referenced this issue Dec 4, 2017
@slpcat
Copy link

slpcat commented Oct 20, 2018

patch for kubernetes to fix shm size

    livenessProbe:
      tcpSocket:
        port: 5901
      initialDelaySeconds: 1
      timeoutSeconds: 1
    ### checks if http-vnc connection is working
    readinessProbe:
      httpGet:
        path: /
        port: 6901
        scheme: HTTP
      initialDelaySeconds: 1
      timeoutSeconds: 1
    volumeMounts:
      - mountPath: /dev/shm
        name: shm
  volumes:
  - name: shm
    emptyDir:
      sizeLimit: 1024Mi
      medium: Memory

@conmarti
Copy link

I've found another solution for this issue. Both Chromium and Chrome support --disable-dev-shm-usage flag. So there's no need to raise the shm-size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants