Hello,
We encountered a bug while trying nested Wayland compositing on a MX6Q board. The setup is as follows:
- Weston on fbdev as system compositor, using FSL patched Weston (behavior described below happens both with gal2d and standard gl renderer)
- A custom compositor built with QtWayland, as a session compositor over Weston.
- Apps launched into the session compositor.
Launching clients onto Weston works perfectly (including the session compositor), but when it comes to launching applications into the session compositor the applications crash without being able to initialize EGL. The backtrace is:
#0 wl_global_create (display=0x0, interface=0x74aa9d00 <wl_viv_interface>, version=version@entry=1, data=data@entry=0x0, bind=0x74abae8c <gcoWL_BindWLViv>) at src/wayland-server.c:918
#1 0x74abc8dc in gcoOS_InitLocalDisplayInfo (Display=<optimized out>,
localDisplay=0xf7c28) at ../user/gc_hal_user_wayland.c:2279
#2 0x74c85568 in veglInitLocalDisplayInfo (Display=<optimized out>) at
gc_egl_platform.c:347
#3 0x76ffa632 in WaylandEglClientBufferIntegration::initializeHardware
(this=0x2910d0, waylandDisplay=0xfd238) at
../../../../hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp:161
#4 0x76fb39f6 in QtWayland::Compositor::initializeHardwareIntegration
(this=this@entry=0x28ee18) at wayland_wrapper/qwlcompositor.cpp:291
#5 0x76fb3c52 in QtWayland::Compositor::init (this=0x28ee18) at
wayland_wrapper/qwlcompositor.cpp:170
#6 0x76fbf7ac in QWaylandCompositor::QWaylandCompositor
(this=0x7efff798, window=0x7efff774, socketName=0x0, extensions=...) at
compositor_api/qwaylandcompositor.cpp:68
#7 0x0000d86a in ?? ()
#1 0x74abc8dc in gcoOS_InitLocalDisplayInfo (Display=<optimized out>,
localDisplay=0xf7c28) at ../user/gc_hal_user_wayland.c:2279
#2 0x74c85568 in veglInitLocalDisplayInfo (Display=<optimized out>) at
gc_egl_platform.c:347
The problem apparently is that into the Vivante chain the Wayland display passed over becomes NULL and is then given to wl_global_create.
The very same configuration on different hardware/drivers works perfectly.
Thanks for any help.
We also have have same kind of problem on imx6q and stack trace without using nested compositing, we use patched Qt 5.3 + Erik Larsson's patches adapted to eglfs + qtwayland. Wayland clients start failing similarily after starting a few in compositor.
Kernel is 3.10.17_1.0.0, tried 1.0.2 also but there we get kernel crashes in gpu driver quite soon.
We also use 2 framebuffers with compositor on one and another process using one just by eglfs (no wayland), and when client limit hits, the plain eglfs process may die Kernel may also panic depending on kernel version.
Tried also yocto fsl community image (dizzy) with weston opengl es renderer, and there we can launch quite many small weston-simple-egl clients, but randomly some may fail to libwayland: not a valid object id error (or similar). Using fullsreen ones cause kernel crashes when killing them when using over maybe 7 fullscreen clients.
The issue reported in this and other threads is caused by an error on the Wayland version of the GPU drivers that causes that not all memory is freed when destroying a surface window (without killing the parent application).
This causes the memory to be depleted and the Kernel crash.
GPU driver team is already addressing the issue.
Cheers,
Hugo
Hi Victor, thanks for your reply.
Do you have any estimate on when the bug will be fixed? For some of our customers upgrading to a newer kernel might not be an option, so it would be nice to know what to expect in that regard.
Thanks
Could you please share your QtWayland compositor with us?
Which BSP version are you currently using.
Cheers,
Hugo
To give further context, the function referred to in
WaylandEglClientBufferIntegration::initializeHardware
(this=0x2910d0, waylandDisplay=0xfd238) at
../../../../hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp:161
Is merely eglInitialize, which returns an EGL BAD DISPLAY error. This happens only when doing nested compositing.
Hi,
Send your post to imx community (e.g. i.MX Community ) to get it visible for active members.
Saurabh
Moved, thanks