Skip to content

fix: set explicit screen when spawning own xvfb #6199

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

Merged
merged 3 commits into from
Jan 22, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cli/lib/exec/xvfb.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ const util = require('../util')

const xvfb = Promise.promisifyAll(new Xvfb({
timeout: 30000, // milliseconds
xvfb_args: ['-screen', '0', '1280x1024x24'], // need to explicitly define screen otherwise electron will crash
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took this value from freedesktop/xorg-xserver but there has to be something rotten with ubuntu's xvfb, because it's mentioned in man as well as in code that -screen is default to 1280x1024x24 🤔

Copy link
Contributor Author

@isnotgood isnotgood Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually ubuntu uses this packag bionic/xvfb which contains older version with:

#define VFB_DEFAULT_WIDTH      1280
#define VFB_DEFAULT_HEIGHT     1024
#define VFB_DEFAULT_DEPTH         8

So I thought that Electron is freaking out because of the bit depth, but when I start Xvbf with 8bits electron is still fine with that even without -screen at all 🤷‍♂

Copy link
Contributor Author

@isnotgood isnotgood Jan 21, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So latest development indicates that it could be problem somewhere else and this is just red herring:

[2031:0121/105922.460578:FATAL:memory.cc(22)] Out of memory. size=65536
We detected that the Chromium Renderer process just crashed.

This is the equivalent to seeing the 'sad face' when Chrome dies.
(...)

Not sure if related thou, because some of our tests pass. Definitely not related, it was /dev/shm set to 16MB

onStderrData (data) {
if (debugXvfb.enabled) {
debugXvfb(data.toString())
Expand Down