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.

DVRRDK4.1 memory error



hi,all.
I am working on UDWORK dm8168, with the DVRRDK4.1.

I have used eth_offload,Previewed 4-channel storaged 11 (the resolution of channels greater than or equal to 2k).

But after half an hour ,System memory error. Error message is below:


WARNING: at /home/kez/DVRRDK_04.01.00.02/dvr_rdk/mcfw/src_bios6/eth_offload/linux/build/../src/offload_arm_emac.c:687 offload_rx_queue.clone.12+0x5c/0xfc [eth_offload]()
Modules linked in: eth_offload ti81xxhdmi ti81xxfb vpss osa_kermod syslink
Backtrace:
[<c004f350>] (dump_backtrace+0x0/0x110) from [<c03c65bc>] (dump_stack+0x18/0x1c)
 r6:bf13be94 r5:000002af r4:00000000 r3:60000113
[<c03c65a4>] (dump_stack+0x0/0x1c) from [<c00775e4>] (warn_slowpath_common+0x54/0x6c)
[<c0077590>] (warn_slowpath_common+0x0/0x6c) from [<c0077620>] (warn_slowpath_null+0x24/0x2c)
 r8:d9feab40 r7:2149c7bb r6:d9feab40 r5:00000000 r4:de6eb8f0
r3:00000009
[<c00775fc>] (warn_slowpath_null+0x0/0x2c) from [<bf13a658>] (offload_rx_queue.clone.12+0x5c/0xfc [eth_offload])
[<bf13a5fc>] (offload_rx_queue.clone.12+0x0/0xfc [eth_offload]) from [<bf13a7d8>] (offload_rxHandler+0xe0/0xec [eth_offload])
 r7:2149c7bb r6:de6ec4a8 r5:d9fea800 r4:d96d4e40
[<bf13a6f8>] (offload_rxHandler+0x0/0xec [eth_offload]) from [<bf139048>] (ETH_OFFLOAD_Q_Poll+0x48/0x98 [eth_offload])
 r8:00000080 r7:00000080 r6:00000000 r5:00000032 r4:d96a8bc0
r3:bf13a6f8
[<bf139000>] (ETH_OFFLOAD_Q_Poll+0x0/0x98 [eth_offload]) from [<bf13a4a8>] (offload_napi_poll+0x40/0x9c [eth_offload])
 r7:d9feab64 r6:00000080 r5:c0574b40 r4:d9feab40
[<bf13a468>] (offload_napi_poll+0x0/0x9c [eth_offload]) from [<c03466a8>] (net_rx_action+0x6c/0x15c)
 r7:0000012c r6:00000001 r5:c0574b40 r4:d9feab64
[<c034663c>] (net_rx_action+0x0/0x15c) from [<c007c4ac>] (__do_softirq+0x84/0x114)
[<c007c428>] (__do_softirq+0x0/0x114) from [<c007c89c>] (irq_exit+0x48/0x98)
[<c007c854>] (irq_exit+0x0/0x98) from [<c004107c>] (asm_do_IRQ+0x7c/0x9c)
[<c0041000>] (asm_do_IRQ+0x0/0x9c) from [<c03c883c>] (__irq_usr+0x3c/0xa0)
Exception stack(0xd93adfb0 to 0xd93adff8)
dfa0:                                     00000000 00060000 407dd850 00000000
dfc0: 64d162e8 64d163f0 43bdae68 43be22e4 00000003 40a29a88 00000000 407c9738
dfe0: 00000000 64d162b0 40730494 407304b4 60000010 ffffffff
 r5:fa200000 r4:ffffffff
---[ end trace 2407aa184d025a47 ]---
 [ETH_OFFLOAD]: skb alloc failed!!!
dvrmain: page allocation failure. order:0, mode:0x4020
Backtrace:
[<c004f350>] (dump_backtrace+0x0/0x110) from [<c03c65bc>] (dump_stack+0x18/0x1c)
 r6:c0574634 r5:00000000 r4:00004020 r3:60000193
[<c03c65a4>] (dump_stack+0x0/0x1c) from [<c00ba284>] (__alloc_pages_nodemask+0x4fc/0x560)
[<c00b9d88>] (__alloc_pages_nodemask+0x0/0x560) from [<c00d73f4>] (new_slab+0x7c/0x200)
[<c00d7378>] (new_slab+0x0/0x200) from [<c00d7a6c>] (__slab_alloc.clone.66+0x114/0x1e0)
 r8:c033f54c r7:00000020 r6:a0000113 r5:d9c02400 r4:00000000
r3:003fffff

……


After analysis, I blocked in the startup script:
#sysctl -w net.core.rmem_max=33554432
#sysctl -w net.core.wmem_max=33554432
and
#echo 3 > /proc/sys/vm/drop_caches
#./drop_cache.sh&

After the above processing, in the case of UDP captures video streams,
the NVR runs OK and upto 48hrs long run tests.
But,under TCP captures,the NVR runs fail after 10 minutes run, memory error also.

  • No one knows?Use your experience, give me some advice, thank you!

  • Hi

    At runtime you seem to be running out of system memory, hence the driver is unable to allocate memory for new packets.

    This could happen if

    1. You are overall running your application under tight memory conditions

    2. Your application is also reading and writing data concurrently to any block device(Hard disk) - in this case the kernel will grow the buffer cache to make use of free memory. The memory allocated for buffer cache will be reclaimed by the kernel  when there is memory crunch in the system. Since the driver buffer allocation cannot wait for the kerenl to reclaim memory, it will fail the allocation request(hence the dump). In this case, you can either tune the sysfs parameters to flush dirty pages to disk or use the posix_fadvise() in your application to indicate to the kernel if the buffer cache contents are not needed for your application(use flag POSIX_FADV_DONTNEED for the file)

    You can check and confirm if it is actual issue by periodically monitoring the amount of free memory in the system with "free" command from the system console

    Regards

    Sriram