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

Electron 8: Linux unit tests are not starting #95415

Closed
bpasero opened this issue Apr 16, 2020 · 12 comments
Closed

Electron 8: Linux unit tests are not starting #95415

bpasero opened this issue Apr 16, 2020 · 12 comments
Assignees
Labels
linux Issues with VS Code on Linux unit-test-failure
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Apr 16, 2020

It seems evident that we have issues running our tests with Electron 8.

E.g. https://monacotools.visualstudio.com/DefaultCollection/Monaco/_build/results?buildId=71995&view=results

@bpasero bpasero changed the title Electron 8: unit tests are not passing Electron 8: Linux unit tests are not starting Apr 20, 2020
@bpasero bpasero added the linux Issues with VS Code on Linux label Apr 20, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 20, 2020

Pushed changes that seem to help macOS, but Linux is still entirely broken and not even starting the tests:

.build/electron/code-exploration: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by .build/electron/code-exploration)
/__w/1/s/.build/electron/code-exploration: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /__w/1/s/.build/electron/code-exploration)
[1444:0420/074319.126225:WARNING:discardable_shared_memory_manager.cc(199)] Less than 64MB of free space in temporary directory for shared memory files: 63
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"
Xlib:  extension "RANDR" missing on display ":10".
[1444:0420/074319.323355:ERROR:bus.cc(393)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
(electron) The default value of app.allowRendererProcessReuse is deprecated, it is currently "false".  It will change to be "true" in Electron 9.  For more information please check https://github.com/electron/electron/issues/18397
[1444:0420/074319.348232:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[1467:0420/074319.385360:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
[1444:0420/074319.725571:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 1 time(s)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[1444:0420/074319.772832:WARNING:gpu_process_host.cc(935)] Reinitialized the GPU process after a crash. The reported initialization time was 27 ms
[1495:0420/074319.778036:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
[1444:0420/074319.914018:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 2 time(s)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[1444:0420/074319.949666:WARNING:gpu_process_host.cc(935)] Reinitialized the GPU process after a crash. The reported initialization time was 16 ms
[1505:0420/074319.954354:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
[1444:0420/074320.070486:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 3 time(s)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[1512:0420/074320.092145:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.
[1444:0420/074320.096272:WARNING:gpu_process_host.cc(935)] Reinitialized the GPU process after a crash. The reported initialization time was 0 ms
[1512:0420/074320.097028:ERROR:gpu_channel_manager.cc(459)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.
[1512:0420/074320.106618:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
[1444:0420/074320.225318:WARNING:gpu_process_host.cc(1166)] The GPU process has crashed 4 time(s)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[1519:0420/074320.247360:ERROR:sandbox_linux.cc(374)] InitializeSandbox() called with multiple threads in process gpu-process.

@deepak1556
Copy link
Collaborator

@bpasero this is the reason why the gpu process is crashing

Less than 64MB of free space in temporary directory for shared memory files: 63
gpu_channel_manager.cc(459)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

Can we free up some space in the vm ?

@bpasero
Copy link
Member Author

bpasero commented Apr 20, 2020

@deepak1556 interesting, to be clear, is this disk space to free or more memory?

@deepak1556
Copy link
Collaborator

On linux /dev/shm needs to have atleast 64MB of space for shared memory to be used by chromium. We can either try increasing that memory in CI if possible (I would say 4GB/8GB is a good amount) or we can use --disable-dev-shm-usage as outlined here puppeteer/puppeteer#1834

@bpasero
Copy link
Member Author

bpasero commented Apr 20, 2020

I don't think that command line argument helps, I can reproduce now running the docker image:

root@b2d7abbdd0f0:~# DISPLAY=:10 ./electron --no-sandbox --disable-dev-shm-usage --disable-gpu
./electron: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by ./electron)
/root/electron: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /root/electron)
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank"

Electron 8.2.3 - Build cross platform desktop apps with JavaScript, HTML, and CSS
Usage: electron [options] [path]

A path to an Electron app may be specified. It must be one of the following:
  - index.js file.
  - Folder containing a package.json file.
  - Folder containing an index.js file.
  - .html/.htm file.
  - http://, https://, or file:// URL.

Options:
  -i, --interactive     Open a REPL to the main process.
  -r, --require         Module to preload (option can be repeated).
  -v, --version         Print the version.
  -a, --abi             Print the Node ABI version.
Xlib:  extension "RANDR" missing on display ":10".
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[2984:0420/120330.937759:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[3007:0420/120330.981019:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[3025:0420/120331.023597:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[3034:0420/120331.059460:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[3041:0420/120331.094133:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
/proc/self/exe: /lib/x86_64-linux-gnu/libdbus-1.so.3: no version information available (required by /proc/self/exe)
[3048:0420/120331.127820:FATAL:x11_util.cc(1312)] Unsupported visual with rgb mask 0x0, 0x0, 0x0.  Please report this to https://crbug.com/1025266
[2963:0420/120331.131368:FATAL:gpu_data_manager_impl_private.cc(1034)] The display compositor is frequently crashing. Goodbye.
Trace/breakpoint trap
root@b2d7abbdd0f0:~# 

Any clues how to make changes to the shared memory thingy to try?

@deepak1556
Copy link
Collaborator

deepak1556 commented Apr 20, 2020

The command line did work, gpu process no longer crashes. The fatal error that is remaining in the output is wrt initializing headless display. Some dependency changed in 8 that our docker container is missing, will look into it tomorrow.

@deepak1556
Copy link
Collaborator

deepak1556 commented Apr 20, 2020

Okay its an upstream bug fixed by https://bugs.chromium.org/p/chromium/issues/detail?id=1025266#c19 , will backport the fix in electron.

@bpasero
Copy link
Member Author

bpasero commented Apr 20, 2020

Oh ok great, let me know when I can try again.

@bpasero bpasero self-assigned this Apr 20, 2020
@bpasero bpasero added this to the April 2020 milestone Apr 20, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 21, 2020

This seems fine now. Though I am seeing more test failures now in the integration tests.

@bpasero bpasero closed this as completed Apr 21, 2020
@bpasero
Copy link
Member Author

bpasero commented Apr 21, 2020

All good now.

@jeffrafter
Copy link

@bpasero I was trying to find the build/change that fixed this? Did the fix get backported to electron?

@deepak1556
Copy link
Collaborator

deepak1556 commented Apr 22, 2020

@jeffrafter we didn't backport the chromium fix, the right solution here is to avoid using 8bit color depth with xvfb that is no longer supported by chromium. Can use 16, 24 or 32 and pass it to xvfb options like -screen 0 1024x768x24

@github-actions github-actions bot locked and limited conversation to collaborators Jun 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linux Issues with VS Code on Linux unit-test-failure
Projects
None yet
Development

No branches or pull requests

3 participants