使用camerademo测试程序的报错日志如下:
root@TinaLinux:/# camerademo NV21 1920 1088 30 bmp /mnt 5
[CAMERA]**********************************************************
[CAMERA]* *
[CAMERA]* this is camera test. *
[CAMERA]* *
[CAMERA]**********************************************************
[CAMERA]**********************************************************
[CAMERA] open /dev/video0!
[CAMERA]**********************************************************
[CAMERA]**********************************************************
[CAMERA] The path to data saving is /mnt.
[CAMERA] The number of captured photos is 5.
[CAMERA] save bmp format
[ 764.388290] [VIN_ERR]vin is not support this pixelformat
[ 764.394479] [VIN_ERR]vin is not support this pixelformat
[ 764.400589] [VIN_ERR]vin is not support this pixelformat
[ 764.406728] [VIN_ERR]vin is not support this pixelformat
[ 764.412844] [VIN_ERR]vin is not support this pixelformat
[ 764.419176] [VIN_ERR]vin is not support this pixelformat
[ 764.425348] [VIN_ERR]vin is not support this pixelformat
[ 764.431457] [VIN_ERR]vin is not support this pixelformat
[ 764.437596] [VIN_ERR]vin is not support this pixelformat
[ 764.443706] [VIN_ERR]vin is not support this pixelformat
[ 764.449847] [VIN_ERR]vin is not support this pixelformat
[ 764.455978] [VIN_ERR]vin is not support this pixelformat
[CAMERA]**********************************************************
[CAMERA] Using format parameters NV21.
[CAMERA] camera pixelformat: NV21
[CAMERA] Resolution size : 1920 * 1088
[CAMERA] The photo save path is /mnt.
[CAMERA] The number of photos taken is 5.
begin ion_alloc_open
pid: 910, g_alloc_context = 0x2ecd0
[CAMERA] Camera capture framerate is 20/1
[CAMERA] VIDIOC_S_FMT succeed
[CAMERA] fmt.type = 9
[CAMERA] fmt.fmt.pix_mp.width = 1920
[CAMERA] fmt.fmt.pix_mp.height = 1088
[CAMERA] fmt.fmt.pix_mp.pixelformat = NV21
[CAMERA] fmt.fmt.pix_mp.field = 1
[CAMERA] stream on succeed
[CAMERA] camera0 capture num is [0]
[CAMERA_PROMPT] the time interval from the start to the first frame is 178 ms
[ 764.811529] camerademo invoked oom-killer: gfp_mask=0x24200ca(GFP_HIGHUSER_MOVABLE), nodemask=0, order=0, oom_score_adj=0
[ 764.823985] CPU: 0 PID: 910 Comm: camerademo Not tainted 4.9.191 #2
[ 764.831027] Hardware name: sun8iw21
[ 764.834986] [] (unwind_backtrace) from [] (show_stack+0x10/0x14)
[ 764.843900] [] (show_stack) from [] (dump_header+0x7c/0x1cc)
[ 764.852217] [] (dump_header) from [] (oom_kill_process+0xe4/0x4dc)
[ 764.861108] [] (oom_kill_process) from [] (out_of_memory+0x2d0/0x3fc)
[ 764.870358] [] (out_of_memory) from [] (__alloc_pages_nodemask+0x8a8/0x954)
[ 764.880362] [] (__alloc_pages_nodemask) from [] (handle_mm_fault+0x1cc/0xbb4)
[ 764.890352] [] (handle_mm_fault) from [] (do_page_fault+0x1a4/0x314)
[ 764.899447] [] (do_page_fault) from [] (do_DataAbort+0x34/0xb4)
[ 764.908039] [] (do_DataAbort) from [] (__dabt_usr+0x3c/0x40)
[ 764.916614] Exception stack(0xc3945fb0 to 0xc3945ff8)
[ 764.922278] 5fa0: b65a9090 b6dbb580 00000780 00000440
[ 764.931466] 5fc0: 00000067 00000425 b65a9fff 00000525 00000072 b6dbbaa6 00001685 00051b70
[ 764.940744] 5fe0: 00000097 bed434b8 00000086 00015294 80000010 ffffffff
[ 764.948409] Mem-Info:
[ 764.950972] active_anon:1520 inactive_anon:5609 isolated_anon:0
[ 764.950972] active_file:25 inactive_file:30 isolated_file:0
[ 764.950972] unevictable:0 dirty:0 writeback:0 unstable:0
[ 764.950972] slab_reclaimable:210 slab_unreclaimable:1187
[ 764.950972] mapped:27 shmem:5609 pagetables:18 bounce:0
[ 764.950972] free:228 free_pcp:2 free_cma:0
[ 764.986906] Node 0 active_anon:6080kB inactive_anon:22436kB active_file:100kB inactive_file:120kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:108kB dirty:0kB writeback:0kB shmem:22436kB writeback_tmp:0kB unstable:0kB pages_scanned:0 all_unreclaimable? yes
[ 765.014129] Normal free:912kB min:920kB low:1148kB high:1376kB active_anon:6080kB inactive_anon:22436kB active_file:100kB inactive_file:120kB unevictable:0kB writepending:0kB present:65536kB managed:55780kB mlocked:0kB slab_reclaimable:840kB slab_unreclaimable:4748kB kernel_stack:416kB pagetables:72kB bounce:0kB free_pcp:8kB local_pcp:8kB free_cma:0kB
[ 765.049244] lowmem_reserve[]: 0 0 0
[ 765.053174] Normal: 44kB (UME) 28kB (UM) 116kB (U) 132kB (U) 164kB (M) 0128kB 3256kB (UM) 0512kB 01024kB 02048kB 0*4096kB = 912kB
[ 765.067452] 5664 total pagecache pages
[ 765.071649] 0 pages in swap cache
[ 765.075387] Swap cache stats: add 0, delete 0, find 0/0
[ 765.081457] Free swap = 0kB
[ 765.084695] Total swap = 0kB
[ 765.087917] 16384 pages RAM
[ 765.091046] 0 pages HighMem/MovableOnly
[ 765.095402] 2439 pages reserved
[ 765.098921] 0 pages cma reserved
[ 765.102532] [ pid ] uid tgid total_vm rss nr_ptes nr_pmds swapents oom_score_adj name
[ 765.112328] [ 817] 0 817 236 29 4 0 0 0 sh
[ 765.121702] [ 910] 0 910 3986 1516 11 0 0 0 camerademo
[ 765.131850] Out of memory: Kill process 910 (camerademo) score 106 or sacrifice child
[ 765.140645] Killed process 910 (camerademo) total-vm:15944kB, anon-rss:6016kB, file-rss:48kB, shmem-rss:0kB
[ 765.154000] oom_reaper: reaped process 910 (camerademo), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
Killed
在网上检索了相关信息,OOM错误一般是内存不足或者溢出导致,而使用free命令查看内存使用情况似乎并不紧缺