Web process crashes loading any site
At first sight this appeared to be an issue with Webkit but I'm skeptical of that. No other GNOME app using Webkit seems to have this issue.
Reproduction
Open Epiphany and go to, say, gnome.org.
Expected
It loads the page.
Actual
System
Ubuntu 20.04.1 LTS
64 bit
GNOME Version 3.36.3
Windowing System X11
AMD® Ryzen 7 2700 eight-core processor × 16
Radeon RX 570 Series
With AMD proprietary drivers: https://drivers.amd.com/drivers/linux/amdgpu-pro-20.20-1098277-ubuntu-20.04.tar.xz
Error Output
jesse@ubuntu:~/Projects$ LIBGL_DEBUG=verbose epiphany
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jesse/.drirc: No such file or directory.
libGL: using driver amdgpu for 23
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jesse/.drirc: No such file or directory.
libGL: pci id for fd 23: 1002:67df, driver radeonsi
libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL error: MESA-LOADER: failed to open radeonsi (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: radeonsi
libGL: using driver amdgpu for 23
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jesse/.drirc: No such file or directory.
libGL: pci id for fd 23: 1002:67df, driver radeonsi
libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: /usr/lib/x86_64-linux-gnu/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open \$${ORIGIN}/dri/radeonsi_dri.so: \$${ORIGIN}/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open /usr/lib/dri/radeonsi_dri.so: /usr/lib/dri/radeonsi_dri.so: cannot open shared object file: No such file or directory
libGL error: MESA-LOADER: failed to open radeonsi (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: radeonsi
libGL: MESA-LOADER: failed to open /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: /usr/lib/x86_64-linux-gnu/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open \$${ORIGIN}/dri/swrast_dri.so: \$${ORIGIN}/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libGL: MESA-LOADER: failed to open /usr/lib/dri/swrast_dri.so: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
(WebKitWebProcess:2): Gdk-ERROR **: 10:42:41.576: The program 'WebKitWebProcess' received an X Window System error.
This probably reflects a bug in the program.
The error was '32'.
(Details: serial 219 error_code 32 request_code 152 (GLX) minor_code 34)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the GDK_SYNCHRONIZE environment
variable to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
** (epiphany:78165): WARNING **: 10:42:41.727: Web process crashed
The complete failure to load any of the Mesa driver shared objects (radeonsi, swrast) is strange since they all exist and in the machine native architecture.
jesse@ubuntu:/usr/lib/x86_64-linux-gnu/dri$ ls
amdgpu_dri.so r200_dri.so radeonsi_dri.so
i915_dri.so r200_dri.so~ radeonsi_dri.so~
i965_dri.so r300_dri.so radeonsi_drv_video.so
iris_dri.so r300_dri.so~ radeonsi_drv_video.so~
kms_swrast_dri.so r600_dri.so swrast_dri.so
kms_swrast_dri.so~ r600_dri.so~ swrast_dri.so~
nouveau_dri.so r600_drv_video.so virtio_gpu_dri.so
nouveau_drv_video.so r600_drv_video.so~ vmwgfx_dri.so
nouveau_vieux_dri.so radeon_dri.so vmwgfx_dri.so~
You can see that Epiphany eventually loads the amdgpu driver. But it is curious that this behaviour is in contrast to other GNOME apps.
jesse@ubuntu:/usr/lib/x86_64-linux-gnu/dri$ LIBGL_DEBUG=verbose gnome-maps
libGL: Running in DRI3 mode
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/tls/amdgpu_dri.so
libGL: OpenDriver: trying /usr/lib/x86_64-linux-gnu/dri/amdgpu_dri.so
/opt/amdgpu/share/libdrm/amdgpu.ids version: 1.0.0
(org.gnome.Maps:81494): Cogl-WARNING **: 11:01:10.653: driver/gl/cogl-pipeline-opengl.c:750: GL error (1280): Invalid enumeration value
Which loads amdgpu first and without issue. Now, even if I point to the amdgpu driver, Epiphany still crashes, it is just less noisy.
jesse@ubuntu:/usr/lib/x86_64-linux-gnu/dri$ LIBGL_DEBUG=verbose MESA_LOADER_DRIVER_OVERRIDE=amdgpu epiphany
libGL: Can't open configuration file /etc/drirc: No such file or directory.
libGL: Can't open configuration file /home/jesse/.drirc: No such file or directory.
** (epiphany:83835): WARNING **: 11:14:35.184: Web process crashed
Interestingly we don't get the X Window System error nor the issue with failing to load the extant shared objects. But the web process crashes nonetheless.
Other GNOME apps that use WebKit like Geary and FeedReader have no issue at all and I have been using them regularly. All these and Epiphany I have installed as native apps (not snaps or flatpaks). If it were a problem with WebKit I would expect this issue to exist for these other apps that use it. This is why I'm reporting it as an Epiphany bug.