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.

Video processing program can only run once



Hi, I am working on dm8168 EVM. My software does video capture | DSP processing | Display. 

This chain works from start to end, but has some internal issues making my program to run only once, after that it dumps some errors and make the program unavailable to run  the 2nd or n times,

WARNING: at mm/vmalloc.c:1387 __vunmap+0x58/0xd4()
Trying to vfree() nonexistent vm area (d3807000)
Modules linked in: cmemk syslink vpss ti81xxfb ti81xxhdmi ti81xxvo ti81xxvin
Backtrace: 
[<c004ac28>] (dump_backtrace+0x0/0x110) from [<c039121c>] (dump_stack+0x18/0x1c)
 r7:c53e9df0 r6:c00c2ed8 r5:c0461397 r4:0000056b
[<c0391204>] (dump_stack+0x0/0x1c) from [<c006ed20>] (warn_slowpath_common+0x54/0x6c)
[<c006eccc>] (warn_slowpath_common+0x0/0x6c) from [<c006eddc>] (warn_slowpath_fmt+0x38/0x40)
 r9:c53e8000 r8:000000a7 r7:00000001 r6:00000000 r5:d3807000
r4:00000000
[<c006eda4>] (warn_slowpath_fmt+0x0/0x40) from [<c00c2ed8>] (__vunmap+0x58/0xd4)
 r3:d3807000 r2:c0461419
[<c00c2e80>] (__vunmap+0x0/0xd4) from [<c00c2fd8>] (vfree+0x40/0x48)
 r7:00000005 r6:bf10a284 r5:d3807000 r4:00000000
[<c00c2f98>] (vfree+0x0/0x48) from [<bf041b78>] (MemoryOS_free+0x84/0x110 [syslink])
[<bf041af4>] (MemoryOS_free+0x0/0x110 [syslink]) from [<bf036c98>] (Memory_free+0x88/0x100 [syslink])
 r6:00000010 r5:d3807000 r4:00000000
[<bf036c10>] (Memory_free+0x0/0x100 [syslink]) from [<bf08c2f4>] (MessageQDrv_ioctl+0x500/0x9b8 [syslink])
 r6:00000005 r5:00000000 r4:00000000
[<bf08bdf4>] (MessageQDrv_ioctl+0x0/0x9b8 [syslink]) from [<c00d85a8>] (vfs_ioctl+0x28/0x44)
[<c00d8580>] (vfs_ioctl+0x0/0x44) from [<c00d8cb8>] (do_vfs_ioctl+0x500/0x540)
[<c00d87b8>] (do_vfs_ioctl+0x0/0x540) from [<c00d8d50>] (sys_ioctl+0x58/0x7c)
[<c00d8cf8>] (sys_ioctl+0x0/0x7c) from [<c0046e00>] (ret_fast_syscall+0x0/0x30)
 r8:c0046fc8 r7:00000036 r6:40825310 r5:c018f356 r4:bed1a3f0
---[ end trace d30740812d61338e ]---
Unable to handle kernel paging request at virtual address d3a1d004
pgd = c53e0000
[d3a1d004] *pgd=843a7011, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1]
last sysfs file: /sys/devices/platform/vpss/graphics0/enabled
Modules linked in: cmemk syslink vpss ti81xxfb ti81xxhdmi ti81xxvo ti81xxvin
CPU: 0    Tainted: G        W    (2.6.37-ridgerun #7)
PC is at Memory_free+0x8c/0x100 [syslink]
LR is at Memory_free+0x38/0x100 [syslink]
pc : [<bf036c9c>]    lr : [<bf036c48>]    psr: a0000013
sp : c53e9e48  ip : 00000000  fp : c53e9e6c
r10: bed1a450  r9 : c53e8000  r8 : 000000a7
r7 : 00000005  r6 : 00000288  r5 : d3808000  r4 : d3a1d000
r3 : d3a1d000  r2 : d3a1d000  r1 : 00050000  r0 : bf0ae4a3
Flags: NzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 10c5387d  Table: 853e0019  DAC: 00000015
Process gst-launch-0.10 (pid: 167, stack limit = 0xc53e82e8)
Stack: (0xc53e9e48 to 0xc53ea000)
9e40:                   d3808000 00000288 d3807000 00000000 c018f35b 00000005
9e60: c53e9e8c c53e9e70 bf049240 bf036c1c 00000005 00000005 000000a7 00000000
9e80: c53e9ef4 c53e9e90 bf08bfbc bf04905c c018f35b bed1a450 00008000 0011f230
9ea0: 0011f200 40799c18 00000000 40852000 00000000 5fe28000 c018f355 d3a41000
9ec0: c53e9f04 c53e9ed0 c00bb670 d3807000 00000000 c4987a00 00000005 00000005
9ee0: bed1a450 00000000 c53e9f04 c53e9ef8 c00d85a8 bf08be00 c53e9f74 c53e9f08
9f00: c00d8cb8 c00d858c c4720318 c525d378 00000000 00000000 fffffffd 00000000
9f20: c53e9f54 c53e9f30 c039538c c00421c4 c4cf801c c481b340 00000015 c525d600
9f40: c53e8000 c0046e68 c53e9f6c 00000000 bed1a450 c018f35b 00000005 c4987a00
9f60: c53e8000 00000000 c53e9fa4 c53e9f78 c00d8d50 c00d87c4 c53e9fac 00000001
9f80: c0391b04 bed1a450 c018f35b 40825310 00000036 c0046fc8 00000000 c53e9fa8
9fa0: c0046e00 c00d8d04 bed1a450 c018f35b 00000005 c018f35b bed1a450 00000002
9fc0: bed1a450 c018f35b 40825310 00000036 00000001 00000002 40141d38 00000002
9fe0: 4082535c bed1a428 407b34e0 4067eaec 20000010 00000005 6215204f 32c1b806
Backtrace: 
[<bf036c10>] (Memory_free+0x0/0x100 [syslink]) from [<bf049240>] (MessageQ_free+0x1f0/0x250 [syslink])
 r6:00000005 r5:c018f35b r4:00000000
[<bf049050>] (MessageQ_free+0x0/0x250 [syslink]) from [<bf08bfbc>] (MessageQDrv_ioctl+0x1c8/0x9b8 [syslink])
 r4:00000000
[<bf08bdf4>] (MessageQDrv_ioctl+0x0/0x9b8 [syslink]) from [<c00d85a8>] (vfs_ioctl+0x28/0x44)
[<c00d8580>] (vfs_ioctl+0x0/0x44) from [<c00d8cb8>] (do_vfs_ioctl+0x500/0x540)
[<c00d87b8>] (do_vfs_ioctl+0x0/0x540) from [<c00d8d50>] (sys_ioctl+0x58/0x7c)
[<c00d8cf8>] (sys_ioctl+0x0/0x7c) from [<c0046e00>] (ret_fast_syscall+0x0/0x30)
 r8:c0046fc8 r7:00000036 r6:40825310 r5:c018f35b r4:bed1a450
Code: e1a01006 e1a02004 eb002b96 ea00000c (e5943004) 
---[ end trace d30740812d61338f ]---

How can this get fixed so the program runs smooth and can execute it as many times as wanted ?

I am using ezsdk-5_05_02_00, m3 firmware loaded +  drivers. 

I would really apreciate some help on this. -Regards



  • Hello,

    Are you using gstreamer?

    BR

    Margarita

  • Hi Margarita thanks for the reply, 

    Yes i am using gstreamer.

    I dont know if gst can be contributing to this after-run issue. The log mainly points to driver problems (syslink for example), there should be something that can clear out why this is hapenning after the program exists. I am using also Codec Engine. 

    Best Regards

    -Jose L.

  • Hello,

    Could you post your bootargs? Also are you  observing syslink errors when you start the application second time?

    You could check this topic also:

    http://e2e.ti.com/support/dsp/davinci_digital_media_processors/f/717/p/245285/864506.aspx

    http://e2e.ti.com/support/embedded/linux/f/354/t/225015.aspx?pi196120=1

    Could you check the tear down of the pipe?

    Best Regards,

    Margarita


  • Hi, 

    Regarding the bootargs, 

    mem=168M@0x80000000, i have reduced partition for Linux (no Linux partition 2). Also m3 firmware and DSP goes according to EZSDK Memory Map, this is true because I have other more basic demos that run smooth without syslink warnings or backtraces. 

    According to the post you copied, there was a suggestion of increasing vmalloc, it may help fixing this ones:

    WARNING: at mm/vmalloc.c:1387 __vunmap+0x58/0xd4()\

    When I attempt to run the pipeline for the second time it wont, 

    (gst-launch-0.10:173):
    Setting pipeline to PAUSED ...
    unrecoverable error: The cause of the error could not be determined (0x80001001)
    Pipeline is PREROLLING ...
    Pipeline is PREROLLED ...
    Setting pipeline to PLAYING ...
    New clock: GstSystemClock
    unrecoverable error: One or more parameters were not valid (0x80001005)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    Assertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    unrecoverable erAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    ror: The port haAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    s lost one or moAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    re of its bufferAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    s and it thus unAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    populated (0x800Assertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    0101c)
    unrecoveAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
    rable error: TheAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed
     port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    unrecoverable error: The port has lost one or more of its buffers and it thus unpopulated (0x8000101c)
    Freeing pipeline ..
    This one is with the third run,
    gst-launch-0.10: OmxRpc.c:624: OmxRpc_Instance_init: Assertion `(OmxRpc_errorNone == retVal)' failed.
    Aborted

    Thanks,

    - Jose L.

  • Hello,

    Could you run, also:

     ./loggerSMDump.out 0x9e400000 0x100000 all

    This is avilable at /usr/share/ti/ti-uia folder in filesystem.

    Jose Lopez1 said:
    unrecoveAssertion at Line no: 380 in /home/jlopez/devdirs/dm8168-tievm-AUG_13-devdir/proprietary/ezsdk-5_05_02_00/ezsdk/component-sources/syslink_2_20_02_20/packages/ti/syslink/utils/hlos/knl/Linux/../../../../../../ti/syslink/utils/hlos/knl/ResTrack.c: (elem == NULL) : failed

    Getting the assertion in ResTrack.c line 380, means you have either not deleted a MessageQ, a HeapBufMP, or failed to call Notify_unregister (or Notify_unregisterSingle).

    Best Regards,

    Margarita