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.

DM365 DEI_Main blocked sometimes ?

Hi,

we run DEI JPEG and H264 together.but we find some time the DEI will be blocked.

Below is the GDB debug info:

(gdb) thread 2
[Switching to thread 2 (Thread 1158734992 (LWP 363))]#0  0x4057027c in ioctl
    () from /lib/libc.so.6
(gdb) bt
#0  0x4057027c in ioctl () from /lib/libc.so.6
#1  0x4196420c in VICP_wait ()
   from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
#2  0x4195f6a4 in VICPSYNC_wait ()
   from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
#3  0x41927764 in DEI_Main ()
   from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
#4  0x41926c5c in DEI_TI_encode ()
   from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
#5  0x00000240 in ?? ()
Backtrace stopped: frame did not save the PC

any idea ?

 

and the cfg file is

var osalGlobal = xdc.useModule('ti.sdo.ce.osal.Global');
osalGlobal.runtimeEnv = osalGlobal.LINUX;

environment['xdc.cfg.check.fatal'] = 'false';

//var videnc   = xdc.module('ti.sdo.ce.video1.IVIDENC1');
var DMAI = xdc.loadPackage('ti.sdo.dmai');


var RMAN = xdc.useModule('ti.sdo.fc.rman.RMAN');
RMAN.useDSKT2 = false;
RMAN.persistentAllocFxn = "__ALG_allocMemory";
RMAN.persistentFreeFxn = "__ALG_freeMemory";
RMAN.semCreateFxn = "Sem_create";
RMAN.semDeleteFxn = "Sem_delete";
RMAN.semPendFxn = "Sem_pend";
RMAN.semPostFxn = "Sem_post";
RMAN.tableSize = 10;
RMAN.trace = true;
RMAN.debug = true;


var EDMA3 = xdc.useModule('ti.sdo.fc.edma3.Settings');
EDMA3.globalInit = true;
EDMA3.maxQdmaChannels = [10,10,10,10];
EDMA3.trace = false;
EDMA3.debug = false;

 

var vicp = xdc.useModule('ti.sdo.linuxutils.vicp.VICP');
vicp.debug = false;


var HDVICP = xdc.useModule('ti.sdo.fc.ires.hdvicp.HDVICP');
HDVICP.trace = false;
HDVICP.debug = false;

//Change this to VICP if the chip is not DM355
var VICP = xdc.useModule('ti.sdo.fc.ires.vicp.VICP2');
VICP.debug = true;

var VICPSYNC = xdc.useModule('ti.sdo.fc.vicpsync.VICPSYNC');
VICPSYNC.debug = false;

 

var HDVICPSYNC = xdc.useModule('ti.sdo.fc.hdvicpsync.HDVICPSYNC');
HDVICPSYNC.debug = false;
HDVICPSYNC.trace = false;

var VICP = xdc.useModule('ti.sdo.fc.memutils.MEMUTILS');

ADDRSPACE = xdc.useModule('ti.sdo.fc.ires.addrspace.ADDRSPACE');

var MEMTCM = xdc.useModule('ti.sdo.fc.ires.memtcm.MEMTCM');
MEMTCM.cmemBlockId = 1; //Since we use _1 in our insmod command.

var EDMA3CHAN = xdc.useModule('ti.sdo.fc.ires.edma3chan.EDMA3CHAN');
EDMA3CHAN.trace = false;
EDMA3CHAN.debug = false;

var LSP = xdc.useModule('ti.sdo.linuxutils.edma.EDMA');
LSP.debug = false;

var CMEM = xdc.useModule('ti.sdo.linuxutils.cmem.CMEM');

var ALG_MEM = xdc.useModule('ti.sdo.ce.alg.Settings');
ALG_MEM.useHeap = true;

xdc.loadPackage("ti.sdo.ce.video2");
xdc.loadPackage("ti.sdo.fc.hdvicpsync");

/*
 *  ======== Engine Configuration ========
 */

var H264ENC = xdc.useModule('ti.sdo.codecs.h264enc.ce.H264ENC');
var JPEGENC = xdc.useModule('ti.sdo.codecs.jpegenc.ce.JPEGENC');
var DEI = xdc.useModule('ti.sdo.codecs.dei.ce.DEI');


var Engine = xdc.useModule('ti.sdo.ce.Engine');
var myEngine = Engine.create("encode", [
    {name: "jpegenc", mod: JPEGENC, local: true, groupId: 1},
    {name: "h264enc", mod: H264ENC, local: true, groupId: 1},
        {name: "dei", mod: DEI, local: true, groupId: 1},
]);

Program.main = null;

 

  • Can you explain more on the problem ? What does block mean ? Do you see jpeg not returning from the process call or jpeg does not get scheduled ?

     

    regards

    Yashwant

  • The problem occurs when using gstreamer, DEI & JPEG Encoder together. (DVSDK 2.10.01.18, Linuxutils 2.24.02, Framework components 2.24.01, LSP 2.10, JPEG Encoder 01.00.00.09, DEI 1.70.00, gstreamer plugin 2.0). Sometimes, the gstreamer pipeline will freeze or hang, and we get the following backtrace: 

    (gdb) i thr
      8 Thread 1150514320 (LWP 392)  0x4057027c in ioctl () from /lib/libc.so.6
      7 Thread 1127834768 (LWP 389)  0x4057027c in ioctl () from /lib/libc.so.6
      6 Thread 1119446160 (LWP 388)  0x405e64bc in pthread_cond_wait@@GLIBC_2.4 ()
       from /lib/libpthread.so.0
      5 Thread 1111057552 (LWP 387)  0x405e64bc in pthread_cond_wait@@GLIBC_2.4 ()
       from /lib/libpthread.so.0
      4 Thread 1099121808 (LWP 386)  0x405e64bc in pthread_cond_wait@@GLIBC_2.4 ()
       from /lib/libpthread.so.0
      2 Thread 1090659472 (LWP 381)  0x40570c50 in select () from /lib/libc.so.6
    * 1 Thread 1073882144 (LWP 378)  0x4056e1e0 in poll () from /lib/libc.so.6
    (gdb) thr 8
    [Switching to thread 8 (Thread 1150514320 (LWP 392))]#0  0x4057027c in ioctl
        () from /lib/libc.so.6
    (gdb) bt
    #0  0x4057027c in ioctl () from /lib/libc.so.6
    #1  0x4197f064 in VICP_wait ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #2  0x4197b2cc in VICPSYNC_wait ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #3  0x41943388 in DEI_Main ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #4  0x41942880 in DEI_TI_encode ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #5  0x00000240 in ?? ()
    Backtrace stopped: frame did not save the PC
    (gdb) thr 7
    [Switching to thread 7 (Thread 1127834768 (LWP 389))]#0  0x4057027c in ioctl
        () from /lib/libc.so.6
    (gdb) bt
    #0  0x4057027c in ioctl () from /lib/libc.so.6
    #1  0x4197f064 in VICP_wait ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #2  0x4197b2cc in VICPSYNC_wait ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #3  0x41956410 in JPEGENC_TI_mbLoop_EDMA_JPEG ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #4  0x41955160 in JPEGENC_TI_start ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #5  0x41950f50 in JPEGENC_TI_encode ()
       from /usr/lib/gstreamer-0.10/libgstticodecplugin.so
    #6  0x419e73dc in ?? () from /usr/lib/gstreamer-0.10/libgstticodecplugin.so

  • Hi:

    I have met this problem too,it will be blocked at DEI process call (VIDENC1_process) ,I run DEI and H264 together .

    dvsdk: DVSDK 4_02_00_06

     

    regards

    aGuang

  • Hi:

    I've met this probelm too.  Have you solved this problem?

    My situation is I run DEI and H264 together.  

    when I open the web, stream thread will cost much cpu, and DEI will block.

    regards!