Hi,
I am facing issues(Physical memory and framebuffer memory allocation failures) while executing a specific combination of encode and decode operation.
I request your inputs on what is the reason behind the failures and guide us on how to resolve these.
Set up details and Observations given below.
Set up details
Hardware: IMX6Q Sabrelite Eval Board
Release: Yocto 1.4
Build: Linux 3.0.35_1.1.0
CPU: 996 MHz
VPU: 352 MHz
# of CPUs Online: 4
YUV File duration: 10 seconds
SD Card: 32GB UHS
Media Framework: GStreamer
Combination
|
Source | Process | Resolution | X | Y | FPS | Pixels |
IP Camera rtsp stream | Decode | D1 | 720 | 480 | 30 | 10368000 |
YUV File | Encode | 720p | 1280 | 720 | 30 | 27648000 |
YUV File | Encode | D1 | 720 | 480 | 30 | 10368000 |
YUV File | Encode | D1 | 720 | 480 | 30 | 10368000 |
TOTAL | 58752000 |
Command used to execute above combination
gst-launch-0.10 rtspsrc location=rtsp://192.168.1.4/live1.sdp latency=0 ! rtph264depay ! vpudec low-latency=true ! autovideosink & gst-launch-0.10 filesrc location=/media/mmcblk1p1/samples/vstream_30f_1280_720_10.yuv blocksize=1382400 ! 'video/x-raw-yuv,format=(fourcc)I420, width=1280, height=720, framerate=(fraction)30/1' ! vpuenc codec=6 bitrate=15728640 gopsize=1 framerate-nu=30 force-framerate=true ! ffmux_mp4 ! filesink location=sample1.mp4 sync=false & gst-launch-0.10 filesrc location=/media/mmcblk1p1/samples/vstream_30f_720_480_10_1.yuv blocksize= 518400 ! 'video/x-raw-yuv,format=(fourcc)I420, width=720, height=480, framerate=(fraction)30/1' ! vpuenc codec=6 bitrate=15728640 gopsize=1 framerate-nu=30 force-framerate=true ! ffmux_mp4 ! filesink location=sample2.mp4 sync=false & gst-launch-0.10 filesrc location=/media/mmcblk1p1/samples/vstream_30f_720_480_10_2.yuv blocksize= 518400 ! 'video/x-raw-yuv,format=(fourcc)I420, width=720, height=480, framerate=(fraction)30/1' ! vpuenc codec=6 bitrate=15728640 gopsize=1 framerate-nu=30 force-framerate=true ! ffmux_mp4 ! filesink location=sample3.mp4 sync=false &
Problems Encountered
Problem 1: While executing the above combination multiple times “Physical memory allocation error” got encountered.
Logs below
==============================================================
filesrc0:src: page allocation failure: order:9, mode:0xd1
[<80045ed0>] (unwind_backtrace+0x0/0xf8) from [<800ba534>] (warn_alloc_failed+0xcc/0x10c)
[<800ba534>] (warn_alloc_failed+0xcc/0x10c) from [<800bca7c>] (__alloc_pages_nodemask+0x4e8/0x728)
[<800bca7c>] (__alloc_pages_nodemask+0x4e8/0x728) from [<80048e48>] (__dma_alloc+0x9c/0x2f0)
[<80048e48>] (__dma_alloc+0x9c/0x2f0) from [<800494b4>] (dma_alloc_coherent+0x5c/0x64)
[<800494b4>] (dma_alloc_coherent+0x5c/0x64) from [<803c9460>] (vpu_alloc_dma_buffer+0x2c/0x68)
[<803c9460>] (vpu_alloc_dma_buffer+0x2c/0x68) from [<803c9c18>] (vpu_ioctl+0x77c/0x880)
[<803c9c18>] (vpu_ioctl+0x77c/0x880) from [<800faebc>] (do_vfs_ioctl+0x80/0x538)
[<800faebc>] (do_vfs_ioctl+0x80/0x538) from [<800fb3a8>] (sys_ioctl+0x34/0x60)
[<800fb3a8>] (sys_ioctl+0x34/0x60) from [<8003f100>] (ret_fast_syscall+0x0/0x30)
Mem-info:
DMA per-cpu:
CPU 0: hi: 90, btch: 15 usd: 76
CPU 1: hi: 90, btch: 15 usd: 0
CPU 2: hi: 90, btch: 15 usd: 83
[ERR]CPU 3: hi: 90, btch: 15 usd: 0
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 56
CPU 1: hi: 186, btch: 31 usd: 28
mem allocation failed!CPU 2: hi: 186, btch: 31 usd: 170
CPU 3: hi: 186, btch: 31 usd: 0
active_anon:5639 inactive_anon:243 isolated_anon:0
active_file:98209 inactive_file:70342 isolated_file:277
Got EOS from element "pipeline0". unevictable:1153 dirty:2168 writeback:1063 unstable:0
free:29548 slab_reclaimable:901 slab_unreclaimable:2081
mapped:2636 shmem:305 pagetables:607 bounce:0
DMA free:77792kB min:780kB low:972kB high:1168kB active_anon:1420kB inactive_anon:16kB active_file:108kB inactive_file:47524kB unevictable:1660kB isol
ated(anon):0kB isolated(file):0kB present:186944kB mlocked:1660kB dirty:2588kB writeback:1292kB mapped:756kB shmem:72kB slab_reclaimable:272kB slab_un
reclaimable:116kB kernel_stack:16kB pagetables:36kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:30 all_unreclaimable? no
lowmem_reserve[]: 0 705 705 705
Execution ended after 11024183045Normal free:40400kB min:3028kB low:3784kB high:4540kB active_anon:21136kB inactive_anon:956kB active_file:392728kB in
active_file:233844kB unevictable:2952kB isolated(anon):0kB isolated(file):1108kB present:722368kB mlocked:2952kB dirty:6084kB writeback:2960kB mapped:
9788kB shmem:1148kB slab_reclaimable:3332kB slab_unreclaimable:8208kB kernel_stack:936kB pagetables:2392kB unstable:0kB bounce:0kB writeback_tmp:0kB p
ages_scanned:309 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
- ns.
DMA: 188*4kB 156*8kB 139*16kB 83*32kB 78*64kB 59*128kB 54*256kB 43*512kB 22*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 77792kB
Normal: 1076*4kB 474*8kB 289*16kB 111*32kB 101*64kB 60*128kB 31*256kB 4*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 40400kB
169818 total pagecache pages
0 pages in swap cache
Setting pipeline to PAUSED ...Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
Setting pipeline to READY ...262144 pages of RAM
30130 free pages
37827 reserved pages
1595 slab pages
Setting pipeline to NULL ...17079 pages shared
0 pages swap cached
Physical memory allocation error!
Physical memory allocation error!
Freeing pipeline ...
==============================================================
Problem 2: Decode operation failed once as framebuffer memory allocation was not successful.
Logs below
==============================================================
rtpjitterbuffer: page allocation failure: order:11, mode:0xd1
[<80045ed0>] (unwind_backtrace+0x0/0xf8) from [<800ba534>] (warn_alloc_failed+0xcc/0x10c)
[<800ba534>] (warn_alloc_failed+0xcc/0x10c) from [<800bca7c>] (__alloc_pages_nodemask+0x4e8/0x728)
[<800bca7c>] (__alloc_pages_nodemask+0x4e8/0x728) from [<80048e48>] (__dma_alloc+0x9c/0x2f0)
[<80048e48>] (__dma_alloc+0x9c/0x2f0) from [<80049114>] (dma_alloc_writecombine+0x24/0x2c)
[<80049114>] (dma_alloc_writecombine+0x24/0x2c) from [<80291060>] (mxcfb_set_par+0x164/0x6a8)
[<80291060>] (mxcfb_set_par+0x164/0x6a8) from [<8027aaac>] (fb_set_var+0x12c/0x284)
[<8027aaac>] (fb_set_var+0x12c/0x284) from [<803932a8>] (config_disp_output+0xec/0x3e8)
[<803932a8>] (config_disp_output+0xec/0x3e8) from [<80393a90>] (mxc_vidioc_streamon+0x54/0x108)
[<80393a90>] (mxc_vidioc_streamon+0x54/0x108) from [<803880c4>] (__video_do_ioctl+0x1ae8/0x511c)
[<803880c4>] (__video_do_ioctl+0x1ae8/0x511c) from [<80386178>] (video_usercopy+0x13c/0x53c)
[<80386178>] (video_usercopy+0x13c/0x53c) from [<80385554>] (v4l2_ioctl+0x94/0x138)
[<80385554>] (v4l2_ioctl+0x94/0x138) from [<800faebc>] (do_vfs_ioctl+0x80/0x538)
[<800faebc>] (do_vfs_ioctl+0x80/0x538) from [<800fb3a8>] (sys_ioctl+0x34/0x60)
[<800fb3a8>] (sys_ioctl+0x34/0x60) from [<8003f100>] (ret_fast_syscall+0x0/0x30)
Mem-info:
DMA per-cpu:
CPU 0: hi: 90, btch: 15 usd: 0
CPU 1: hi: 90, btch: 15 usd: 0
CPU 2: hi: 90, btch: 15 usd: 0
CPU 3: hi: 90, btch: 15 usd: 4
Normal per-cpu:
CPU 0: hi: 186, btch: 31 usd: 0
CPU 1: hi: 186, btch: 31 usd: 0
CPU 2: hi: 186, btch: 31 usd: 0
CPU 3: hi: 186, btch: 31 usd: 0
active_anon:3447 inactive_anon:302 isolated_anon:0
active_file:128658 inactive_file:56662 isolated_file:0
unevictable:888 dirty:0 writeback:0 unstable:0
free:22705 slab_reclaimable:1022 slab_unreclaimable:1899
mapped:2892 shmem:342 pagetables:500 bounce:0
DMA free:85576kB min:780kB low:972kB high:1168kB active_anon:868kB inactive_anon:76kB active_file:34316kB inactive_file:33156kB unevictable:1188kB iso
lated(anon):0kB isolated(file):0kB present:186944kB mlocked:1188kB dirty:0kB writeback:0kB mapped:1508kB shmem:128kB slab_reclaimable:244kB slab_unrec
laimable:72kB kernel_stack:16kB pagetables:84kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:8 all_unreclaimable? no
lowmem_reserve[]: 0 705 705 705
Normal free:5244kB min:3028kB low:3784kB high:4540kB active_anon:12920kB inactive_anon:1132kB active_file:480316kB inactive_file:193492kB unevictable:
2364kB isolated(anon):0kB isolated(file):0kB present:722368kB mlocked:2364kB dirty:0kB writeback:0kB mapped:10060kB shmem:1240kB slab_reclaimable:3844
kB slab_unreclaimable:7524kB kernel_stack:752kB pagetables:1916kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
DMA: 194*4kB 174*8kB 157*16kB 94*32kB 109*64kB 84*128kB 59*256kB 18*512kB 27*1024kB 2*2048kB 1*4096kB 0*8192kB 0*16384kB 0*32768kB = 85576kB
Normal: 883*4kB 138*8kB 30*16kB 2*32kB 1*64kB 0*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB 0*8192kB 0*16384kB 0*32768kB = 5244kB
186299 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap = 0kB
Total swap = 0kB
262144 pages of RAM
23102 free pages
37847 reserved pages
1588 slab pages
13553 pages shared
0 pages swap cached
mxc_sdc_fb mxc_sdc_fb.0: Unable to allocate framebuffer memory
detected fb_set_par error, error code: -12
mxc_v4l2_output mxc_v4l2_output.0: ERR:config_disp_output fb_set_var ret:-12
mxc_v4l2_output mxc_v4l2_output.0: Config display output failed
root@imx6qsabrelite:/media/mmcblk1p1/samples# WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/MFW_GST_V4LSINK_INFO_T:auto
videosink0-actual-sink-mfw_v4l: A lot of buffers are being dropped.
Additional debug info:
/home/developer/Yocto-1.4/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesink.c(2875):
gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/MFW_GST_V4LSINK_INFO_T:autovideosink0-actual-sink-mfw_v4l:
There may be a timestamping problem, or this computer is too slow.
root@imx6qsabrelite:/media/mmcblk1p1/samples#
root@imx6qsabrelite:/media/mmcblk1p1/samples# WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/MFW_GST_V4LSINK_INFO_T:auto
videosink0-actual-sink-mfw_v4l: A lot of buffers are being dropped.
Additional debug info:
/home/developer/Yocto-1.4/build/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gstreamer/0.10.36-r2/gstreamer-0.10.36/libs/gst/base/gstbasesink.c(2875):
gst_base_sink_is_too_late (): /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/MFW_GST_V4LSINK_INFO_T:autovideosink0-actual-sink-mfw_v4l:
There may be a timestamping problem, or this computer is too slow.
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/MFW_GST_V4LSINK_INFO_T:autovideosink0-actual-sink-mfw_v4l: A lot of buffe
rs are being dropped.
Thanks,
Shilpa Chandrappa