Hello,
I apologize in advance if this is not the appropriate forum to post this, and would appreciate it if a TI employee could move it to a more appropriate forum if it exists.
I am having an intermittent problem with a codec engine algorithm I developed. When it occurs, it happens on the first call to VIDANALYTICS_control after calling VIDANALYTICS_create. The following is a CE_DEBUG=2 log of the error:
@5,104,675us: [+0 T:0x45a82460 S:0x45a81644] ti.sdo.ce.vidanalytics.VIDANALYTICS - VIDANALYTICS_create> Enter (engine=0xf3fd0, name='vmd', params=0x45a818b0 (size=0x24))
@5,104,827us: [+0 T:0x45a82460 S:0x45a81614] CV - VISA_create(0xf3fd0, 'vmd', 0x45a818b0, 0x3060, 'ti.sdo.ce.vidanalytics.IVIDANALYTICS')
@5,104,888us: [+0 T:0x45a82460 S:0x45a81514] CV - VISA_create2(0xf3fd0, 'vmd', 0x45a818b0, 0x24, 0x3060, 'ti.sdo.ce.vidanalytics.IVIDANALYTICS')
@5,104,949us: [+0 T:0x45a82460 S:0x45a814fc] OM - Memory_alloc> Enter(0x34)
@5,105,010us: [+0 T:0x45a82460 S:0x45a814fc] OM - Memory_alloc> return (0x45b00c98)
@5,105,041us: [+0 T:0x45a82460 S:0x45a814fc] OM - Memory_alloc> Enter(0x4)
@5,105,102us: [+0 T:0x45a82460 S:0x45a814fc] OM - Memory_alloc> return (0x45b00c60)
@5,105,133us: [+0 T:0x45a82460 S:0x45a814f4] OC - Comm_alloc> Enter(poolId=0x0, msg=0x45b00c60, size=3060)
@5,105,224us: [+0 T:0x45a82460 S:0x45a814f4] OC - Comm_alloc> msg=0x44e76880, returning (0)
@5,105,285us: [+0 T:0x45a82460 S:0x45a8149c] CE - Engine_createNode(0xf3fd0, 'vmd', 3060, 0x45a818b0, 0x24, 0x45a8160c)
@5,105,316us: [+0 T:0x45a82460 S:0x45a8149c] CE - Engine> allocNode Enter(engine=0xf3fd0, impId='vmd')
@5,105,377us: [+0 T:0x45a82460 S:0x45a81484] OM - Memory_alloc> Enter(0x20)
@5,105,407us: [+0 T:0x45a82460 S:0x45a81484] OM - Memory_alloc> return (0x45b00eb0)
@5,105,468us: [+0 T:0x45a82460 S:0x45a8149c] CE - Engine> allocNode(). Calling (Comm_create(gppfromnode_1479_1, 0x45b00eb8, NULL)
@5,105,560us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_create> Enter(queueName='gppfromnode_1479_1', queue=0x45b00eb8, attrs=0x0)
@5,105,590us: [+0 T:0x45a82460 S:0x45a8145c] OM - Memory_alloc> Enter(0x4)
@5,105,651us: [+0 T:0x45a82460 S:0x45a8145c] OM - Memory_alloc> return (0x45b00c70)
@5,106,323us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_create> return (0x45b00c70)
@5,106,414us: [+0 T:0x45a82460 S:0x45a8147c] OC - Comm_put> Enter(queue=0x0, msg=0x44e75880)
@5,106,506us: [+0 T:0x45a82460 S:0x45a8147c] OC - Comm_put> return (0)
@5,106,567us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_get> Enter(queue=0x10000, msg=0x45a81524, timeout=-1)
@5,159,637us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
@5,159,759us: [+0 T:0x45a82460 S:0x45a8147c] OC - Comm_put> Enter(queue=0x0, msg=0x44e75880)
@5,159,820us: [+0 T:0x45a82460 S:0x45a8147c] OC - Comm_put> return (0)
@5,159,881us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_get> Enter(queue=0x10000, msg=0x45a81524, timeout=-1)
@5,160,003us: [+0 T:0x45a82460 S:0x45a81474] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
@5,160,064us: [+4 T:0x45a82460 S:0x45a8149c] CE - Engine_createNode> created node(stdIn=0x2, stdOut=0x10001, msgq=0x45b00c70, algName='vmd', rmsNode=0x87f19098, algHandle=0x87f19180)
@5,160,125us: [+0 T:0x45a82460 S:0x45a81404] OC - Comm_put> Enter(queue=0x0, msg=0x44e75880)
@5,160,186us: [+0 T:0x45a82460 S:0x45a81404] OC - Comm_put> return (0)
@5,160,247us: [+0 T:0x45a82460 S:0x45a813fc] OC - Comm_get> Enter(queue=0x10000, msg=0x45a8149c, timeout=-1)
@5,160,552us: [+0 T:0x45a82460 S:0x45a813fc] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
[DSP] @0,217,556tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - processRmsCmd(0x873048a8, 4056): cmd = 0
[DSP] @0,217,622tk: [+0 T:0x87f145f4 S:0x87f1849c] OM - Memory_alloc> Enter(size=0x18)
[DSP] @0,217,676tk: [+0 T:0x87f145f4 S:0x87f1849c] OM - Memory_alloc> return (0x87f19098)
[DSP] @0,217,728tk: [+0 T:0x87f145f4 S:0x87f1849c] OM - Memory_alloc> Enter(size=0x6)
[DSP] @0,217,774tk: [+0 T:0x87f145f4 S:0x87f1849c] OM - Memory_alloc> return (0x87f190b0)
[DSP] @0,217,833tk: [+0 T:0x87f145f4 S:0x87f1845c] OM - Memory_alloc> Enter(size=0x20)
[DSP] @0,217,880tk: [+0 T:0x87f145f4 S:0x87f1845c] OM - Memory_alloc> return (0x87f190b8)
[DSP] @0,217,932tk: [+0 T:0x87f145f4 S:0x87f1842c] OM - Memory_alloc> Enter(size=0x24)
[DSP] @0,217,979tk: [+0 T:0x87f145f4 S:0x87f1842c] OM - Memory_alloc> return (0x87f190d8)
[DSP] @0,218,052tk: [+0 T:0x87f145f4 S:0x87f1843c] ti.sdo.ce.vidanalytics.VIDANALYTICS - VIDANALYTICS_create> Enter (engine=0x0, name='vmd', params=0x873048c0 (size=0x24))
[DSP] @0,218,142tk: [+0 T:0x87f145f4 S:0x87f18404] CV - VISA_create(0x0, 'vmd', 0x873048c0, 0x3060, 'ti.sdo.ce.vidanalytics.IVIDANALYTICS')
[DSP] @0,218,217tk: [+0 T:0x87f145f4 S:0x87f182f4] CV - VISA_create2(0x0, 'vmd', 0x873048c0, 0x24, 0x3060, 'ti.sdo.ce.vidanalytics.IVIDANALYTICS')
[DSP] @0,218,305tk: [+0 T:0x87f145f4 S:0x87f1828c] CE - Engine_open> Enter('local', 0x87f182dc, 0x873048c0)
[DSP] @0,218,366tk: [+0 T:0x87f145f4 S:0x87f1826c] OM - Memory_alloc> Enter(size=0x2c)
[DSP] @0,218,415tk: [+0 T:0x87f145f4 S:0x87f1826c] OM - Memory_alloc> return (0x87f19150)
[DSP] @0,218,476tk: [+0 T:0x87f145f4 S:0x87f1828c] CE - Engine_open> return(-2014211760)
[DSP] @0,218,544tk: [+0 T:0x87f145f4 S:0x87f182d4] OM - Memory_alloc> Enter(size=0x34)
[DSP] @0,218,591tk: [+0 T:0x87f145f4 S:0x87f182d4] OM - Memory_alloc> return (0x87f19180)
[DSP] @0,218,646tk: [+0 T:0x87f145f4 S:0x87f182ac] ti.sdo.ce.alg.Algorithm - Algorithm_create> Enter(fxns=0x87e75268, idma3Fxns=0x87e758ec, iresFxns=0x0, params=0x873048c0, attrs=0x87f183f0)
[DSP] @0,218,743tk: [+0 T:0x87f145f4 S:0x87f1828c] OM - Memory_alloc> Enter(size=0x10)
[DSP] @0,218,791tk: [+0 T:0x87f145f4 S:0x87f1828c] OM - Memory_alloc> return (0x87f191b8)
[DSP] @0,297,064tk: [+5 T:0x87f145f4 S:0x87f18204] VMD - +VMD_TI_init(0x87400000, 0x87f19538, 0x00000000, 0x873048c0)
[DSP] @0,297,143tk: [+6 T:0x87f145f4 S:0x87f18204] VMD - +VMD_TI_init
[DSP] @0,297,184tk: [+6 T:0x87f145f4 S:0x87f18204] VMD - VMD: Parameters OK
[DSP] @0,297,235tk: [+6 T:0x87f145f4 S:0x87f181a4] VMD - +vmd_init_conv_mask()
[DSP] @0,297,277tk: [+6 T:0x87f145f4 S:0x87f181a4] VMD - -vmd_init_conv_mask() -> OK
[DSP] @0,297,323tk: [+6 T:0x87f145f4 S:0x87f181dc] VMD - +vmd_init_fg_mask()
[DSP] @0,305,072tk: [+6 T:0x87f145f4 S:0x87f181dc] VMD - -vmd_init_fg_mask() -> OK
[DSP] @0,305,171tk: [+6 T:0x87f145f4 S:0x87f18204] VMD - VMD: params->
[DSP] .size=36
[DSP] .maxHeight=96
[DSP] .maxWidth=144
[DSP] .maxFrameRate=60000
[DSP] .maxRules==10
[DSP] @0,305,245tk: [+6 T:0x87f145f4 S:0x87f18204] VMD - VMD: params->
[DSP] .mean_weight=0x03ff
[DSP] .bg_global_thres=0x0800
[DSP] .bg_thres_factor=0x7800
[DSP] @0,305,315tk: [+6 T:0x87f145f4 S:0x87f18204] VMD - -VMD_TI_init
[DSP] @0,305,453tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - +VMD_TI_dmaGetChannels()
[DSP] @0,305,497tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - -VMD_TI_dmaGetChannels()
[DSP] @0,305,576tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - +VMD_TI_dmaGetChannels()
[DSP] @0,305,620tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - -VMD_TI_dmaGetChannels()
[DSP] @0,305,819tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - +VMD_TI_dmaInit()
[DSP] @0,305,869tk: [+6 T:0x87f145f4 S:0x87f1824c] VMD - -VMD_TI_dmaInit()
[DSP] @0,305,918tk: [+0 T:0x87f145f4 S:0x87f182ac] ti.sdo.ce.alg.Algorithm - Algorithm_create> return (0x87f191b8)
[DSP] @0,305,983tk: [+5 T:0x87f145f4 S:0x87f182f4] CV - VISA_create> local codec created (name='vmd', handle=0x87f191b8)
[DSP] @0,306,051tk: [+0 T:0x87f145f4 S:0x87f1843c] ti.sdo.ce.vidanalytics.VIDANALYTICS - VIDANALYTICS_create> return (0x87f19180)
[DSP] @0,306,125tk: [+4 T:0x87f145f4 S:0x87f18404] OT - Thread_create > name: "vmd#0", pri: -1, stack size: 8448, stack seg: 0
[DSP] @0,307,154tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - processRmsCmd(0x873048a8, 4056): cmd = 1
[DSP] @0,307,744tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - processRmsCmd(0x873048a8, @5,164,367us: [+0 T:0x45a82460 S:0x45a81404] OC - Comm_put> Enter(queue=0x0, msg=0x44e75880)
@5,164,459us: [+0 T:0x45a82460 S:0x45a81404] OC - Comm_put> return (0)
@5,164,520us: [+0 T:0x45a82460 S:0x45a813fc] OC - Comm_get> Enter(queue=0x10000, msg=0x45a8149c, timeout=-1)
@5,164,642us: [+0 T:0x45a82460 S:0x45a813fc] OC - Comm_get> MSGQ_get() status=0x8000, return (0)
4056): cmd = 5
[DSP] @0,307,800tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - remote time = 0x0, trace buffer size = 4032
[DSP] @0,314,896tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - processRmsCmd(0x873048a8, 4056): cmd = 5
[DSP] @0,314,952tk: [+0 T:0x87f145f4 S:0x87f185b4] CR - remote time = 0x0, trace buffer size = 4032
@5,169,586us: [+0 T:0x45a82460 S:0x45a81434] CE - Engine_fwriteTrace> returning count [4650]
@5,169,647us: [+2 T:0x45a82460 S:0x45a8149c] CE - Engine_createNode> Returning 0x45b00eb0
@5,169,738us: [+5 T:0x45a82460 S:0x45a81514] CV - VISA_create> remote codec created (name='vmd', localQueueID=0x10001, remoteQueueID=0x0002)
@5,169,799us: [+0 T:0x45a82460 S:0x45a81644] ti.sdo.ce.vidanalytics.VIDANALYTICS - VIDANALYTICS_create> return (0x45b00c98)
@5,169,891us: [+0 T:0x45a82460 S:0x45a8146c] ti.sdo.ce.vidanalytics.VIDANALYTICS - VIDANALYTICS_control> Enter (handle=0x45b00c98, id=3, dynParams=0x41a84924 (size=0x62c), status=0x45a81538 (size=0x158)
@5,169,952us: [+4 T:0x45a82460 S:0x45a813dc] CV - VISA_getMaxMsgSize(0x45b00c98): returning 0x1000
@5,170,013us: [+5 T:0x45a82460 S:0x45a813e4] CV - VISA_allocMsg> Allocating message for messageId=0x0002fe01
@5,170,074us: [+0 T:0x45a82460 S:0x45a813c4] CV - VISA_call(visa=0x45b00c98, msg=0x44e76880): messageId=0x0002fe01, command=0x1
@5,170,135us: [+0 T:0x45a82460 S:0x45a8138c] OC - Comm_put> Enter(queue=0x2, msg=0x44e76880)
@5,170,227us: [+0 T:0x45a82460 S:0x45a8138c] OC - Comm_put> return (0)
@5,170,288us: [+0 T:0x45a82460 S:0x45a81384] OC - Comm_get> Enter(queue=0x10001, msg=0x45a8147c, timeout=-1)
At this point it hangs and requires a reboot to recover. As you can see, it fails very early in the VIDANALYTICS_control call. When it works normally (I can post an example if requested), there are several more lines printed out before finally entering my algorithm's control function.
Other forum threads on the topic have suggested that this could occur if the code on the DSP crashes. I have instrumented my code with debug statements that show when a function I wrote is entered & exited and in my analysis, every entry into one of my functions is followed by an exit of the same function. This tells me at least that the code did not crash within one of my custom functions.
My question is, how do I go about debugging and fixing this problem? I am using DVSDK 3.01.00.10, Codec Engine 2.25.02.11, DMAI 2.05.00.12, XDAIS 6.25.02.11, and our custom algorithm doing VMD using VLIB is integrated into cs1omap3530 1.01.00.
Thanks,
Dennis