Potential EGL issue causing xwayland-kiosk-helper to segfault on KVM virtual machine

Hi,

My kiosk snap fails to run on the Ubuntu Core KVM virtual machine (ubuntu-core-18-amd64.img.xz) using xwayland-kiosk-helper.

I’ve seen two separate errors. The first appeared to be a permission problem (similar to errors I’ve seen before on Ubuntu Desktop):

Jul 13 20:11:16 localhost systemd[1]: Started Service for snap application krellian-kiosk.krellian-kiosk.
Jul 13 20:11:21 localhost krellian-kiosk.krellian-kiosk[1157]: mkdir: cannot create directory ‘/run/user/0’: Permission denied

That seemed to mysteriously resolve itself after a period of time.

Then I get the more persistent and reproduceable error:

Jul 14 14:52:40 linux krellian-kiosk.krellian-kiosk[10545]: glamor: EGL version 1.4:
Jul 14 14:52:40 linux krellian-kiosk.krellian-kiosk[10545]: (EE)
Jul 14 14:52:40 linux krellian-kiosk.krellian-kiosk[10545]: Fatal server error:
Jul 14 14:52:40 linux krellian-kiosk.krellian-kiosk[10545]: (EE) wl_display@1: error 2: no memory
Jul 14 14:52:40 linux krellian-kiosk.krellian-kiosk[10545]: (EE)
Jul 14 14:52:41 linux krellian-kiosk.krellian-kiosk[10545]: i3: Cannot open display
Jul 14 14:52:41 linux krellian-kiosk.krellian-kiosk[10545]: /snap/krellian-kiosk/x1/bin/xwayland-kiosk-launch: line 151: 10817 Segmentation fault      "$@"

This segfault in the xwayland-kiosk-launch command is the same error people are seeing on the Raspberry Pi 4 for similar kiosk snaps.

Does it maybe have a similar underlying cause? Is this EGL problem something that is likely to be fixed for the VM? Being able to test my snap locally on a VM would really help improve my development flow.

Should I file a bug for this, and if so where?

Thanks

what kvm software are you using ?
note that you will need virgl support …

I installed qemu-kvm as per https://ubuntu.com/download/kvm

How do I know whether I have virgl support?

If it’s relevant, kvm-ok says that “KVM acceleration can be used” on my system.

depends … the qemu-kvm in 20.04 should support GL/GLES via virgl if you set the right switches in the qemu command call …

but former releases did not support virgl …

you can try the qemu-virgil snap (and use the command outlined in “snap info qemu-virgil” to run the image)