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

chrome-launcher does not work on docker ubuntu (even with xvfb-run) #83

Closed
jeanbza opened this issue Nov 22, 2016 · 9 comments
Closed

Comments

@jeanbza
Copy link

jeanbza commented Nov 22, 2016

The problem: Running karma + karma-chrome-launcher on ubuntu docker container does not work

Steps tried:

Anyone have other ideas?

Example tiny project with docker container. This repo contains a replicable error:

root@e69e39f2f599:/karma# xvfb-run npm test

> @ test /karma
> ./node_modules/karma/bin/karma start karma.conf.js --single-run --log-level debug

22 11 2016 17:20:02.713:DEBUG [config]: Loading config /karma/karma.conf.js
22 11 2016 17:20:02.720:DEBUG [config]: autoWatch set to false, because of singleRun
22 11 2016 17:20:02.722:DEBUG [plugin]: Loading karma-* from /karma/node_modules
22 11 2016 17:20:02.724:DEBUG [plugin]: Loading plugin /karma/node_modules/karma-chrome-launcher.
22 11 2016 17:20:02.745:DEBUG [plugin]: Loading plugin /karma/node_modules/karma-jasmine.
22 11 2016 17:20:02.747:DEBUG [plugin]: Loading inlined plugin (defining launcher:my_chrome).
22 11 2016 17:20:02.757:DEBUG [web-server]: Instantiating middleware
22 11 2016 17:20:02.818:INFO [karma]: Karma v1.3.0 server started at http://localhost:9876/
22 11 2016 17:20:02.819:INFO [launcher]: Launching browser my_chrome with unlimited concurrency
22 11 2016 17:20:02.828:INFO [launcher]: Starting browser Chrome
22 11 2016 17:20:02.829:DEBUG [temp-dir]: Creating temp dir at /karma/karma-95080039
22 11 2016 17:20:02.831:DEBUG [launcher]: google-chrome --user-data-dir=/karma/karma-95080039 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling --disable-device-discovery-notifications --disable-gpu --no-sandbox http://localhost:9876/?id=95080039
22 11 2016 17:20:03.011:DEBUG [launcher]: Process Chrome exited with code 0
22 11 2016 17:20:03.011:ERROR [launcher]: Cannot start Chrome

22 11 2016 17:20:03.012:DEBUG [temp-dir]: Cleaning temp dir /karma/karma-95080039
22 11 2016 17:20:03.016:INFO [launcher]: Trying to start Chrome again (1/2).
22 11 2016 17:20:03.017:DEBUG [launcher]: Restarting Chrome
22 11 2016 17:20:03.017:DEBUG [temp-dir]: Creating temp dir at /karma/karma-95080039
22 11 2016 17:20:03.018:DEBUG [launcher]: google-chrome --user-data-dir=/karma/karma-95080039 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling --disable-device-discovery-notifications --disable-gpu --no-sandbox http://localhost:9876/?id=95080039
22 11 2016 17:20:03.174:DEBUG [launcher]: Process Chrome exited with code 0
22 11 2016 17:20:03.175:ERROR [launcher]: Cannot start Chrome

22 11 2016 17:20:03.175:DEBUG [temp-dir]: Cleaning temp dir /karma/karma-95080039
22 11 2016 17:20:03.178:INFO [launcher]: Trying to start Chrome again (2/2).
22 11 2016 17:20:03.179:DEBUG [launcher]: Restarting Chrome
22 11 2016 17:20:03.180:DEBUG [temp-dir]: Creating temp dir at /karma/karma-95080039
22 11 2016 17:20:03.181:DEBUG [launcher]: google-chrome --user-data-dir=/karma/karma-95080039 --no-default-browser-check --no-first-run --disable-default-apps --disable-popup-blocking --disable-translate --disable-background-timer-throttling --disable-device-discovery-notifications --disable-gpu --no-sandbox http://localhost:9876/?id=95080039
22 11 2016 17:20:03.342:DEBUG [launcher]: Process Chrome exited with code 0
22 11 2016 17:20:03.343:ERROR [launcher]: Cannot start Chrome

22 11 2016 17:20:03.344:DEBUG [temp-dir]: Cleaning temp dir /karma/karma-95080039
22 11 2016 17:20:03.346:ERROR [launcher]: Chrome failed 2 times (cannot start). Giving up.
22 11 2016 17:20:03.347:DEBUG [karma]: Run complete, exiting.
22 11 2016 17:20:03.347:DEBUG [launcher]: Disconnecting all browsers
npm ERR! Test failed.  See above for more details.
@jeanbza
Copy link
Author

jeanbza commented Nov 22, 2016

Note: replacing the code in karma that kills all launcher logs with code that sends launcher logs to stderr/stdout indicates to me that the google-chrome process just hangs and never gets started.

When I run the google-chrome process myself it works just fine. Going to try the script-launcher and see if I can script this to work heh.

@myitcv
Copy link

myitcv commented Feb 16, 2017

@jadekler we had a working setup using karma-chrome-launcher and xvfb-run until today... when I rebuilt our image (which is based on buildpack-deps:xenial) and now Chrome fails to launch with symptoms similar to those you describe.

As yet I'm unclear what changed to cause things to stop working; could I guess be any number of:

  • Docker version (tried on 1.12.6 and 1.13.1)
  • Chrome version (tried both 56.0.2924.87 and 57.0.2987.54)
  • Base image version (we are using buildpack-deps:xenial)

I note your work in https://github.com/jadekler/git-karma-on-ubuntu-container, but again, even with chromedriver, nothing.

The interesting thing is that launching Chrome via an interactive docker run, everything is fine (chromedriver also works). It's just that within our CI setup (which happens to be an internal Gitlab setup) we get nothing.

Posting here in case there is any light you can help shed on the situation?

@myitcv
Copy link

myitcv commented Feb 16, 2017

Replying to self... I've still not managed to track down what's going wrong here... despite resorting to strace to try and see where things are hanging within the Chrome process.

But I have found a (temporary) solution, an alternative to the approach @jadekler describes above (which we needed because @jadekler's solution did not work for us)

This solution works for us with Google Chrome 57.0.2987.54 beta

It involves defining a custom launcher and taking advantage of Chrome's new --headless flag:

// karma.conf.js

// ...

  browsers: ['OurChrome'],
  customLaunchers: {
    OurChrome: {
      base: 'Chrome',
      flags: ['--headless', '--disable-gpu', '--remote-debugging-port=9222']
    }
  },

// ...

At this point I also note karma-runner/karma#2489

@dignifiedquire is it worth trying to debug further with the strace output I have? Or is karma-runner/karma#2489 really the best way forward here?

@weblogixx
Copy link

A working version of a basic karma / gitlab config can be seen here (at least I was able to run it via gitlab-ci-multi-runner exec docker test --docker-privileged=true): https://gist.github.com/weblogixx/40b95a879977cdf586aba097b2ac7d75. Works completely without xvfb with the --headless flag. Thank you @myitcv, had at least 8 hours fun with configuring this today before I saw your comment 👍 .

@myitcv
Copy link

myitcv commented Feb 20, 2017

@weblogixx you don't need to run with privileged; you can instead run with the following security_opt:

[runners.docker]
    security_opt = ["{\"defaultAction\":\"SCMP_ACT_ERRNO\",\"syscalls\":[{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"accept\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"accept4\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"access\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"alarm\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"arch_prctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"bind\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"brk\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"capget\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"capset\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"chdir\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"chmod\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"chown\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"chown32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"chroot\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"clock_getres\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"clock_gettime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"clock_nanosleep\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"clone\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"close\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"connect\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"creat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"dup\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"dup2\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"dup3\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_create\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_create1\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_ctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_ctl_old\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_pwait\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_wait\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"epoll_wait_old\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"eventfd\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"eventfd2\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"execve\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"execveat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"exit\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"exit_group\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"faccessat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fadvise64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fadvise64_64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fallocate\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fanotify_init\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fanotify_mark\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchdir\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchmod\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchmodat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchown\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchown32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fchownat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fcntl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fcntl64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fdatasync\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fgetxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"flistxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"flock\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fork\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fremovexattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fsetxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fstat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fstat64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fstatat64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fstatfs\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fstatfs64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"fsync\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ftruncate\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ftruncate64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"futex\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"futimesat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getcpu\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getcwd\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getdents\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getdents64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getegid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getegid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"geteuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"geteuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getgid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getgroups\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getgroups32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getitimer\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getpeername\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getpgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getpgrp\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getpid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getppid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getpriority\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getrandom\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getresgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getresgid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getresuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getresuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getrlimit\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"get_robust_list\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getrusage\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getsid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getsockname\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getsockopt\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"get_thread_area\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"gettid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"gettimeofday\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"getxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"inotify_add_watch\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"inotify_init\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"inotify_init1\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"inotify_rm_watch\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"io_cancel\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ioctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"io_destroy\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"io_getevents\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ioprio_get\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ioprio_set\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"io_setup\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"io_submit\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"kill\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lchown\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lchown32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lgetxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"link\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"linkat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"listen\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"listxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"llistxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"_llseek\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lremovexattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lseek\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lsetxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lstat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"lstat64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"madvise\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"memfd_create\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mincore\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mkdir\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mkdirat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mknod\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mknodat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mlock\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mlockall\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mmap\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mmap2\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mprotect\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_getsetattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_notify\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_open\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_timedreceive\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_timedsend\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mq_unlink\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"mremap\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"msgctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"msgget\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"msgrcv\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"msgsnd\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"msync\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"munlock\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"munlockall\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"munmap\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"name_to_handle_at\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"nanosleep\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"newfstatat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"_newselect\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"open\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"open_by_handle_at\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"openat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pause\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pipe\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pipe2\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"poll\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ppoll\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"prctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pread64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"preadv\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"prlimit64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pselect6\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pwrite64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"pwritev\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"read\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"readahead\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"readlink\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"readlinkat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"readv\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"recvfrom\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"recvmmsg\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"recvmsg\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"remap_file_pages\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"removexattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rename\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"renameat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"renameat2\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rmdir\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigaction\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigpending\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigprocmask\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigqueueinfo\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigreturn\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigsuspend\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_sigtimedwait\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"rt_tgsigqueueinfo\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_getaffinity\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_getattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_getparam\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_get_priority_max\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_get_priority_min\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_getscheduler\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_rr_get_interval\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_setaffinity\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_setattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_setparam\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_setscheduler\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sched_yield\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"seccomp\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"select\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"semctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"semget\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"semop\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"semtimedop\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sendfile\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sendfile64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sendmmsg\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sendmsg\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sendto\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setdomainname\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setfsgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setfsgid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setfsuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setfsuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setgid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setgroups\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setgroups32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sethostname\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setitimer\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setns\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setpgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setpriority\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setregid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setregid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setresgid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setresgid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setresuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setresuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setreuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setreuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setrlimit\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"set_robust_list\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setsid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setsockopt\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"set_thread_area\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"set_tid_address\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setuid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setuid32\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"setxattr\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"shmat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"shmctl\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"shmdt\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"shmget\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"shutdown\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sigaltstack\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"signalfd\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"signalfd4\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"socket\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"socketpair\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"splice\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"stat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"stat64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"statfs\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"statfs64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"symlink\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"symlinkat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sync\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sync_file_range\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"syncfs\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"sysinfo\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"syslog\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"tee\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"tgkill\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"time\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timer_create\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timer_delete\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timerfd_create\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timerfd_gettime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timerfd_settime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timer_getoverrun\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timer_gettime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"timer_settime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"times\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"tkill\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"truncate\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"truncate64\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"ugetrlimit\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"umask\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"uname\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"unlink\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"unlinkat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"unshare\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"utime\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"utimensat\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"utimes\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"vfork\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"vhangup\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"vmsplice\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"wait4\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"waitid\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"write\"},{\"action\":\"SCMP_ACT_ALLOW\",\"args\":null,\"name\":\"writev\"}]}"]
    ...

(which is a string quoted version of https://github.com/jessfraz/dotfiles/blob/master/etc/docker/seccomp/chrome.json)

@jeanbza
Copy link
Author

jeanbza commented Feb 21, 2017

@myitcv Apologies for not seeing sooner. We also went with the custom script that chrome launcher runs.

@ain
Copy link

ain commented May 26, 2017

Could anyone please explain why was this ticket closed?

With the latest karma-chrome-launcher it still isn't working out of the box on GitLab CI, incl. with the @myitcv's suggestion above.

@SeanFacer
Copy link

Also experiencing this problem

@thediveo
Copy link

thediveo commented Mar 6, 2018

Gitlab CI runner in Debian Stretch container runner:

  • stock karma-chrome-launcher aka ChromeHeadless: fails
  • customLauncher with (only!) the flags --no-sandbox and --disable-setuid-sandbox works. The other options --disable-gpu and --remote-debugging-port=... aren't necessary.

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

No branches or pull requests

6 participants