i.MX8M CMA memory leak with Qt/QML

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX8M CMA memory leak with Qt/QML

174 次查看
kluszon
Contributor III

I have a device based on the Variscite iMX8M with Yocto system. In OS is working a single Qt/QML application responds for playing multimedia. It prepares pipelines for GStreamer. The application from the multimedia side is very simple. I provide a specific pipeline to the MediaPlayer component in QML.  I'm conducting final tests and I noticed the CMA memory leak while playing long-term 4K video. A video is playing in a loop and it's changing to the next every half hour. After around ~15 hours, playing video stopped, and the CMA Free Memory was 0kB. (It can be repeated faster with changing video after minute). We can also find in the journal information about problem with memory allocation by GStreamer. My customisation for U-Boot and Kernel are very limited to simple things and they shouldn't affect on such things. It looks like a bug in the system, probably in gstreamer or vpu driver, or Qt. An interesting thing is that after the closing application, the memory doesn't return to its original value (to the value from before running the application).

My system is based on Kirkstone with the newest Kernel 5.15-2.0 (branch: 5.15-2.0.x-imx) and U-Boot (branch: lf_v2022.04). I have in the system 983.04 MB of total CMA memory. 

I did a test with playing a video in a bash loop, and here the problem doesn't exist. My conclusion is that there is somewhere between Qt and Gstreamer or in VPU driver.

Is there any solution for it? Is there any other test which I can do?

Attached:
- Boot log
- Kernel error during the change of video
- Memory leak chart

0 项奖励
回复
4 回复数

116 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

This looks like a bug, but with the 6.12 this does not happen I tested a similar video with the EVK and everything runs smoothly, just check it, if the problem persist contact Variscite.

Regards

 

0 项奖励
回复

97 次查看
kluszon
Contributor III
I understand, you don't see and kernel warning in journalctl during playing such a video from an application using QML MediaPlayer and CMA memory looks good. Is it true?
0 项奖励
回复

89 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Correct!

0 项奖励
回复

27 次查看
kluszon
Contributor III
I have at the moment Yocto Scarthgap (kernel 6.6.52) with Qt 6.8.1. Can you provide more information about playing H.265 4K video from Qt6? I tried the official example, but in my case, it doesn't work with such a video.
0 项奖励
回复