AnsweredAssumed Answered

QtMediaplayer Qt-5.12.4 play movies physical memory leak

Question asked by liqun wei on Aug 19, 2019
Latest reply on Aug 26, 2019 by Diego Adrian Cuevas

Yocto-4.14.78

Kernel version: 4.14.78

Qt version: 5.12.4

We are using QtMeidiaPlayer to play movies, such as avi, mp4, mkv, h264 and so.

It's about one hour after we start playing moveis, some log occurs as the following:

 

[  603.278905] cma: cma_alloc: alloc failed, req-size: 338 pages, ret: -12

[  603.285713] mxc_vpu 2040000.vpu_fsl: Physical memory allocation error!

[  603.292248] mxc_vpu 2040000.vpu_fsl: Physical memory allocation error!

[  603.302766] cma: cma_alloc: alloc failed, req-size: 338 pages, ret: -12

[  603.309873] mxc_vpu 2040000.vpu_fsl: Physical memory allocation error!

[  603.316795] mxc_vpu 2040000.vpu_fsl: Physical memory allocation error!

 

Our board's configuration is:

 

[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.14.78 (jenkins@buildhost) (gcc version 7.3.0 (GCC)) #1 PREEMPT Thu Aug 15 09:45:28 CST 2019
[ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Freescale i.MX6 DualLite SABRE Smart Device Board
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] Reserved memory: created CMA memory pool at 0x3c000000, size 320 MiB
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] ------------[ cut here ]------------
[ 0.000000] WARNING: CPU: 0 PID: 0 at arch/arm/kernel/devtree.c:157 arm_dt_init_cpu_maps+0x114/0x16c
[ 0.000000] DT /cpu 2 nodes greater than max cores 1, capping them
[ 0.000000] Modules linked in:
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.14.78 #1
[ 0.000000] Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree)

[ 0.000000] CPU: All CPU(s) started in SVC mode.
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 260096
[ 0.000000] Kernel command line: console=ttymxc0,115200 consoleblank=0 display=video=mxcfb0:dev=lcd,1024x600@60,if=RGB24,bpp=32 gpumemsize=128 GPU3DMinClk=8 ldo-mode-activate=1 fec_mac=80:7A:7F:02:97:5D logoType=1 ubi.mtd=9 root=ubi0:rootfs ro rootfstype=ubifs rootflags=sync mtdparts=gpmi-nand:8m(boot),1m(mac),1m(parameter),8m(kernel),1m(dtb),25m(minimal_system),1m(tmpdata_partition),140m(user_partition),35m(sys_config_partition),500m(rootfs),-(update) hardwareID=0x36
[ 0.000000] logoType_setup enter s=1 logoType = 1
[ 0.000000] hardwareID_setup enter str=0x36
[ 0.000000] Genway: HGI16 project, phase 2.0.
[ 0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Memory: 697856K/1048576K available (8192K kernel code, 431K rwdata, 2576K rodata, 1024K init, 413K bss, 23040K reserved, 327680K cma-reserved, 0K highmem)
[ 0.000000] Virtual kernel memory layout:
[ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB)
[ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
[ 0.000000] vmalloc : 0xc0800000 - 0xff800000 (1008 MB)
[ 0.000000] lowmem : 0x80000000 - 0xc0000000 (1024 MB)
[ 0.000000] pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
[ 0.000000] modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
[ 0.000000] .text : 0x80008000 - 0x80900000 (9184 kB)
[ 0.000000] .init : 0x80c00000 - 0x80d00000 (1024 kB)
[ 0.000000] .data : 0x80d00000 - 0x80d6bea0 ( 432 kB)
[ 0.000000] .bss : 0x80d6d000 - 0x80dd44d4 ( 414 kB)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16

 

And here is some advice from QT technical support:

it might be related to iMX6 kernel issues, would it be possible to know the version of linux kernel? or disk caches to fix,

      for n in 1 2 3 ; do echo $n > /proc/sys/vm/drop_caches ; done 

Also if there is reproducible leak, need to create as simple as possible application, make a bug report and provide the example to us.

Try the following tips from NXP:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcommunity.nxp.com%2Fthread%2F485056&data=02%7C01%7Cliqun.wei%40cn.abb.com%7C1342644f8fd94450f57008d7220e2884%7C372ee9e09ce04033a64ac07073a91ecd%7C0%7C0%7C637015316508023923&sdata=KuSddvTYT0rn3TFQQtJuZG7CSCOXPhkyZGuvpRtrx%2Fg%3D&reserved=0

 

We have tried these advices,but we still failed to play after the kernel shows the same error log.

 

That's all information about this issue, how could it be and how can I fix it?

It there any solution?

 

Any help would be appriciated.

 

Thank you!

Outcomes