imx-gpu-viv file descriptor leak in EGL_WL_create_wayland_buffer_from_image on iMX8

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx-gpu-viv file descriptor leak in EGL_WL_create_wayland_buffer_from_image on iMX8

2,577 Views
zdobersek
Contributor II

I would like to report a file descriptor leak in the implementation of the eglCreateWaylandBufferFromImageWL API entrypoint as specified in the EGL_WL_create_wayland_buffer_from_image extension.

https://www.khronos.org/registry/EGL/extensions/WL/EGL_WL_create_wayland_buffer_from_image.txt

This leak is observed with imx-gpu-viv 6.4.0.p2.4-r0, built through Yocto and tested on different variants of the iMX8 platform, including the NXP iMX8M Quad Evaluation Kit.

When the specified entrypoint is called, the passed-in resource doesn't seem to be handled properly, causing a file descriptor to be leaked. With the default "budget" of 1024 file descriptors per process, an application can hit that limit and crash in a matter of seconds when the entrypoint has to be invoked for each frame that's to be displayed.

We have previously observed the same issue on iMX6 platforms that used the 32-bit variant of the graphics drivers. For those platforms, the problem appeared early in the 6.2.x release series, but has been fixed in the 6.2.4.p2 release, presumably in the following merge noted in the change log for that release:

> MGS-4151-3 merge veglCreateWaylandBufferFromImage fix

So for iMX6, the identical problem used to be observed until fixed in 6.2.4.p2, but for iMX8, it still appears to not be addressed in the 6.4.0.p2.4-r0.

A fix for this would be greatly appreciated.

5 Replies

2,549 Views
zdobersek
Contributor II

Can you specify the exact version? Because, as reported, it's not fixed in version 6.4.0.p2.4-aarch64.

0 Kudos

2,554 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello zdobersek,

 

in gpu drvier 6.4.0, this issue seems fixed.

 

Regards

 

0 Kudos

2,535 Views
zdobersek
Contributor II

I built a Yocto image from up-to-date Freescale layers, using the dunfell branch, for the iMX8MQ Evaluation Kit (MACHINE = "imx8mqevk"). The imx-gpu-viv version used there is 6.4.0.p2.4+aarch64.

The issue is still reproducible with this version of the graphics drivers.

If required, I can provide such an image, along with a sample program and tooling that shows the file descriptor leak in action.

2,499 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Attached the file for The build

 

2,480 Views
zdobersek
Contributor II

I have tested these binaries, copying them over to the board, and the problem is fixed. Thank you for providing the build.

I can manage with copying over the binaries until a new official release is provided.