Page MenuHomePhabricator

Xvfb causes _XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created
Closed, ResolvedPublic

Description

https://gerrit.wikimedia.org/r/#/c/integration/config/+/454706/ mounts tmp inside the CI Quibble containers as /tmp. That causes Xvfb to spurts a warning:

INFO:quibble.cmd:No DISPLAY, using Xvfb.
INFO:backend.Xvfb:Starting Xvfb on display :94
INFO:backend.ChromeWebDriver:Starting Chromedriver
INFO:quibble.use_headless:Display: :94
DEBUG:quibble.chromium_flags:Flags: ['', '--autoplay-policy=no-user-gesture-required', '--disable-pushstate-throttle', '--no-sandbox']
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Probably because /tmp has the UID of the Jenkins slave user (jenkins-deploy) while the process runs as nobody. Since that is not root (euid = effective uid != 0), Xvfb skips the directory creation.

Event Timeline

hashar created this task.Aug 24 2018, 8:44 AM
hashar updated the task description. (Show Details)Aug 24 2018, 8:52 AM

Xvfb / Xserver creates a /tmp/.X11-unix/94 unix socket and ensure the parent directory belong to root.

I tried locally by changing the owner of /tmp/.X11-unix/ to be non root:

$ Xvfb :94 -screen 0 1280x1024x24 -ac -nolisten tcp
_XSERVTransmkdir: Owner of /tmp/.X11-unix should be set to root

By instructing Xvfb to no more listen on a unix socket, it is no more created. That is done by passing -nolisten unix:

$ Xvfb :94 -screen 0 1280x1024x24 -ac -nolisten tcp -nolisten unix

Change 455110 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/quibble@master] Xvfb does not need to listen on a unix socket

https://gerrit.wikimedia.org/r/455110

Change 455110 merged by jenkins-bot:
[integration/quibble@master] Xvfb does not need to listen on a unix socket

https://gerrit.wikimedia.org/r/455110

Will be in Quibble 0.0.22

hashar claimed this task.Aug 27 2018, 2:34 PM
hashar moved this task from Backlog to In progress on the Quibble board.

Change 455860 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] docker: quibble 0.0.22

https://gerrit.wikimedia.org/r/455860

Change 455860 merged by jenkins-bot:
[integration/config@master] docker: quibble 0.0.22

https://gerrit.wikimedia.org/r/455860

Change 455861 had a related patch set uploaded (by Hashar; owner: Hashar):
[integration/config@master] Switch Jenkins jobs to Quibble 0.0.22 containers

https://gerrit.wikimedia.org/r/455861

Change 455861 merged by jenkins-bot:
[integration/config@master] Switch Jenkins jobs to Quibble 0.0.22 containers

https://gerrit.wikimedia.org/r/455861

hashar closed this task as Resolved.Aug 28 2018, 4:58 PM

Released in Quibble 0.0.22 and the CI jobs have been updated.