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.

Syslink Multi Process handling

Please let me know if any of this information is invalid and if there is away to make this works.  Thanks in advance,
Johny.

We are trying to running multi process and receive an assertion in syslink

Assertion at Line no: 1239 in /home/user/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (handle != NULL) : failed
Assertion at Line no: 695 in /home/user/ti-ezsdk_dm814x-evm_5_05_02_00/component-sources/syslink_2_20_02_20/packages/ti/syslink/ipc/hlos/usr/MessageQ.c: (queueId != MessageQ_INVALIDMESSAGEQ) : failed
ServiceMgr_prime: MessageQ_put failed: status = 0xfffffffe

....................

Looking around and talking with TI field engineer, the issue is that syslink does not support multi process. To get this error all you need to do is run two gst-launch command at the same time, i.e.  gst-launch-0.10 filesrc location=clip2.mp4  ! qtdemux ! h264parse ! omx_h264dec ! omx_scaler ! fakesink

-----------------

Looking at the code, syslink only allow one heapID to be register in MessageQ.c line 1747:

GT_setFailureReason (curTrace,
                                 GT_4CLASS,
                                 "MessageQ_registerHeap",
                                 status,
                                 "Specified heap is already registered.!");
Just for fun, I commented this Failure check out to see what happen - the idea is to have the heap to be shared.
Run into the next issue, which is the NameServer_add - report a duplication because the name is generic (we could change this to have name relate to the pid or something so it will be unique and we won't have this issue).  For a quick work around, I comment out the code for checking the duplication.  This allow the second gst-launch command to run with no issue until the first gst-launch command finished and clean up.  You will see this error:
*** MessageQ_alloc: Heap id is not registered with MessageQ!
        Error [0xfffffff2] at Line no: 1327 in file /home/johny/CodeHG/bsp-ti81xx-hg/mods/syslink_2_21_01_05/packages/ti/syslink/utils/hlos/knl/Linux/.c
knl/Linux/MessageQDrv.c MessageQDrv_ioctl - CMD_MESSAGEQ_DESTROY 
*** MessageQ_alloc: Heap id is not registered with MessageQ!
        Error [0xfffffff2] at Line no: 1327 in file /home/johny/CodeHG/bsp-ti81xx-hg/mods/syslink_2_21_01_05/packages/ti/syslink/utils/hlos/knl/Linux/.c
*** MessageQ_alloc: Heap id is not registered with MessageQ!

 I think this happen because the first gst-launch unregister the heap so if we can change syslink to keep a ref count of the heap register and don't clean up until all the command that got run goes down it could works.   

Please let me know if this do able or what I am thinking is just wrong.  There is no way syslink can works like that.

Thanks again,

Johny.

  • Hi TI,

    Why the above mentioned error is?
    I am also facing similar issue

  • Speaking from a SysLink POV, SysLink does support multi-process applications without modifications.  What you are running into is that the DVSDK software only supports single instance application.  I'm not intimately familiar with the entire software stack provided (hoping others chime in) but I know that at least the DVSDK's firmware loader doesn't support such.

    At a minimum, the Firmware Loader would have to be developed in such a way that keeps all the SysLink application resources active (e.g. SR0, Heaps, etc).  I suspect the firmware for the other slave cores will also have to be restructured to support such an approach.

  • Arnie, thanks for the reply. guess  i was looking in the wrong place.

    Johny.