This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

kernel issue

Hi,

I have a kernel issue as below. Is there anybody know what happened. 

HYBRID invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0, oom_score_adj=0
Backtrace:
[<80045b7c>] (dump_backtrace+0x0/0x10c) from [<803561d0>] (dump_stack+0x18/0x1c)
r7:00000000 r6:00000000 r5:86d042c0 r4:000201da
[<803561b8>] (dump_stack+0x0/0x1c) from [<8009be9c>] (dump_header+0x60/0x138)
[<8009be3c>] (dump_header+0x0/0x138) from [<8009c1f8>] (oom_kill_process+0x50/0x1f8)
r8:873e4000 r7:00000254 r6:00000000 r5:86d042c0 r4:000201da
[<8009c1a8>] (oom_kill_process+0x0/0x1f8) from [<8009c604>] (out_of_memory+0x264/0x2e0)
[<8009c3a0>] (out_of_memory+0x0/0x2e0) from [<8009f6f4>] (__alloc_pages_nodemask+0x430/0x51c)
[<8009f2c4>] (__alloc_pages_nodemask+0x0/0x51c) from [<800a1064>] (__do_page_cache_readahead+0x9c/0x1e8)
[<800a0fc8>] (__do_page_cache_readahead+0x0/0x1e8) from [<800a11dc>] (ra_submit+0x2c/0x34)
[<800a11b0>] (ra_submit+0x0/0x34) from [<800a146c>] (ondemand_readahead+0x1ac/0x1bc)
[<800a12c0>] (ondemand_readahead+0x0/0x1bc) from [<800a15c4>] (page_cache_sync_readahead+0x70/0x78)
[<800a1554>] (page_cache_sync_readahead+0x0/0x78) from [<8009b138>] (generic_file_aio_read+0x2ec/0x738)
r6:00000000 r5:00000000 r4:000b0fff
[<8009ae4c>] (generic_file_aio_read+0x0/0x738) from [<801397a8>] (nfs_file_read+0xd0/0x104)
[<801396d8>] (nfs_file_read+0x0/0x104) from [<800c0300>] (do_sync_read+0xa0/0xec)
[<800c0260>] (do_sync_read+0x0/0xec) from [<800c0dd4>] (vfs_read+0xb0/0xd8)
r8:2bcb7000 r7:00008000 r6:873e5f70 r5:2bcb7000 r4:86cf3180
[<800c0d24>] (vfs_read+0x0/0xd8) from [<800c0ec0>] (sys_read+0x44/0x70)
r7:00008000 r6:86cf3180 r5:00000000 r4:000a8000
[<800c0e7c>] (sys_read+0x0/0x70) from [<80041da0>] (ret_fast_syscall+0x0/0x30)
r8:80041f48 r7:00000003 r6:2acfc000 r5:00028158 r4:00028158
Mem-info:
Normal per-cpu:
CPU 0: hi: 42, btch: 7 usd: 37
HighMem per-cpu:
CPU 0: hi: 186, btch: 31 usd: 174
active_anon:121416 inactive_anon:20735 isolated_anon:0
active_file:198 inactive_file:238 isolated_file:0
unevictable:0 dirty:0 writeback:0 unstable:0
free:4699 slab_reclaimable:283 slab_unreclaimable:773
mapped:20859 shmem:20748 pagetables:554 bounce:0
Normal free:16112kB min:1440kB low:1800kB high:2160kB active_anon:93792kB inactive_anon:0kB active_file:140kB inactive_file:236kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:130048kB mlocked:0kB dirty:0kB writeback:0kB mapped:16kB shmem:0kB slab_reclaimable:1132kB slab_unreclaimable:3092kB kernel_stack:640kB pagetables:2216kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:583 all_unreclaimable? yes
lowmem_reserve[]: 0 3680 3680
HighMem free:2684kB min:460kB low:1760kB high:3064kB active_anon:391872kB inactive_anon:82940kB active_file:652kB inactive_file:716kB unevictable:0kB isolated(anon):0kB isolated(file):0kB present:471048kB mlocked:0kB dirty:0kB writeback:0kB mapped:83420kB shmem:82992kB slab_reclaimable:0kB slab_unreclaimable:0kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB writeback_tmp:0kB pages_scanned:2054 all_unreclaimable? yes
lowmem_reserve[]: 0 0 0
Normal: 18*4kB 31*8kB 17*16kB 7*32kB 23*64kB 6*128kB 1*256kB 1*512kB 2*1024kB 1*2048kB 2*4096kB = 16112kB
HighMem: 543*4kB 36*8kB 0*16kB 1*32kB 1*64kB 1*128kB 0*256kB 0*512kB 0*1024kB 0*2048kB 0*4096kB = 2684kB
21184 total pagecache pages
163584 pages of RAM
5044 free pages
11747 reserved pages
898 slab pages
39739 pages shared
0 pages swap cached
[ pid ] uid tgid total_vm rss cpu oom_adj oom_score_adj name
[ 68] 0 68 489 49 0 -17 -1000 udevd
[ 1067] 42 1067 831 40 0 0 0 dbus-daemon
[ 1072] 0 1072 735 24 0 0 0 telnetd
[ 1079] 0 1079 750 53 0 0 0 syslogd
[ 1081] 0 1081 734 47 0 0 0 klogd
[ 1103] 0 1103 629 46 0 0 0 login
[ 1105] 0 1105 782 35 0 0 0 sh
[ 1180] 0 1180 734 20 0 0 0 sh
[ 1198] 0 1198 438 39 0 0 0 remote_debug_cl
[ 1273] 0 1273 75233 64632 0 0 0 HYBRID
[ 1277] 0 1277 196658 95085 0 0 0 dvr_rdk_demo_mc
[ 1303] 0 1303 15813 701 0 0 0 HNVR_audio_api.
[ 1320] 0 1320 630 47 0 0 0 login
[ 1321] 0 1321 782 33 0 0 0 sh
[ 1323] 0 1323 782 62 0 0 0 top
Out of memory: Kill process 1277 (dvr_rdk_demo_mc) score 596 or sacrifice child
Killed process 1277 (dvr_rdk_demo_mc) total-vm:786632kB, anon-rss:298104kB, file-rss:82236kB

  • The log indicates dvr_rdk_mcfw_demo application was killed by the kernel as kernel ran out of memory (oom_killer). Under what scenario are you seeing this issue ? What is your kernel bootargs mem= parameter. Apart from dvr_rdk_mcfw_demo what other application are you running. Are you running something like DVD backup ?

  • My memory configuration is "mem=128m mem=512M@0xE0000000 vmalloc=512M". When the kernel crash, the video output disappear.

    I just run video decoding and have  this issue after one week.

  • If display is blank it indicates VPSS M3 has mostly crashed. Can you connect to VPSS_m3 using CCS+JTAG and check the status .

    Are you running with fan+heat sink.Is it running on UDworks DVR board or your custom board ? Also can you measure the chip temperature when you see the crash.

  • Sorry, my video output is still alive. The video loss is due to wire was  broken, but the kernel panic is still there. Could you teach me how to use CCS+JTAG to check the status ? My board has fan, heat sink.

  • If video is alive then VPSS_M3 is fine. I dont think it is required to connect CCS+JTAG.Kernel panic is then due to running out of memory. Which usecase are your running ? Are you running any application other than mcfw demo. I see another process called "HYBRID" .Is it possible to the run the mcfw demo without running the other process.The oom issue can occur due to memory leak. Are you deleting and recreating the demo or are you just leaving it running ? In running state, the mcfw demo does not allocate any dynamic memory so I am not sure why you get oom issue.

  • We are running "decode display example", but we modify some programs to dynamic switching resolution and codec type to do memory testing. "HYBRID" is our host program and its function is to provide video stream to "decode and display" program. The same program have worked fine for a long time if we don't change resolution or codec type.

  • What is the sequence of APIs you are invoking for dynamic resolution change and codec type change ? Looks like there is a memory leak which results in out of memory condition during long run. mcfw API layer does not allocate any memory when switching resolution or changing codec type. Can you try malloc_stats() or mallinfo() or /proc/meminfo and check if you are able to locate the leak.

  • MemTotal: 607348 kB
    MemFree: 272632 kB
    Buffers: 0 kB
    Cached: 130848 kB
    SwapCached: 0 kB
    Active: 217396 kB
    Inactive: 101272 kB
    Active(anon): 187872 kB
    Inactive(anon): 82940 kB
    Active(file): 29524 kB
    Inactive(file): 18332 kB
    Unevictable: 0 kB
    Mlocked: 0 kB
    HighTotal: 486400 kB
    HighFree: 161280 kB
    LowTotal: 120948 kB
    LowFree: 111352 kB
    SwapTotal: 0 kB
    SwapFree: 0 kB
    Dirty: 0 kB
    Writeback: 0 kB
    AnonPages: 187848 kB
    Mapped: 76316 kB
    Shmem: 82992 kB
    Slab: 4208 kB
    SReclaimable: 1196 kB
    SUnreclaim: 3012 kB
    KernelStack: 488 kB
    PageTables: 964 kB
    NFS_Unstable: 0 kB
    Bounce: 0 kB
    WritebackTmp: 0 kB
    CommitLimit: 303672 kB
    Committed_AS: 364636 kB
    VmallocTotal: 1826816 kB
    VmallocUsed: 310564 kB
    VmallocChunk: 1478100 kB