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.

Linux/AM5726: Pipeline stops due to error in libdce

Part Number: AM5726

Tool/software: Linux

Hello,

I am running pipeline as below

gst-launch-1.0 -e v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=15/1' ! tee name=p ! queue min-threshold-buffers=2 ! rtspserver ! fakesink p. ! queue ! ducatijpegdec ! tee name=t ! queue min-threshold-buffers=2 ! queue  leaky=2 ! videocrop left = 1824 right=912 ! queue ! videoscale ! video/x-raw , format=NV12 , height=240 , width=320 ! eiovready ! fakesink t. ! queue ! videorate ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=1/1' ! multifilesink location=/dev/shm/snap/snap1.jpeg max-files=1

After 12 days. pipeline stops after giving below error.

MmRpc_use: Error: unable to declare buffer use
[123798.918258] rpmsg_rpc rpmsg-dce: unwinding UVA to RDA translations! translation 1 
[123798.930108] rpmsg_rpc rpmsg-dce: failed to translate all pointers for remote core! ../git/libdce_linux.c:115: dce_buf_lock ERROR: Failed eError == DCE_EOK error val -5MmRpc_call: Error: write failed ../git/libdce.c:965: process ERROR: Failed eError == DCE_EOK error val -5

e2e.ti.com/.../2571281

I have already done all the changes mentioned in the above thread.

Please do needful.

Regards,

Prerak

  • Hello Prerak,

    I am sorry but I do not see vpe element in your pipeline.
    Please add this element and set capsfilter after it to perform some operation like csc or scaling or both.
    Example in case input is NV12, input resolution is 1280x720:
    ducatijpegdecvpe ! 'video/x-raw, format=(string)YUY2, width=(int)1920, height=(int)1080'

    BR
    Margarita

  • Hi Margarita,

    sorry i have posted wronge pipeline.
    Below is the corrected one.

    gst-launch-1.0 -e v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=15/1' ! tee name=p ! queue min-threshold-buffers=2 ! rtspserver ! fakesink p. ! queue ! ducatijpegdecvpe ! 'video/x-raw, format=(string)NV12, width=(int)1824, height=(int)1824 ' ! tee name=t ! queue min-threshold-buffers=2 ! queue leaky=2 ! videocrop left = 1824 right=912 ! queue ! videoscale ! video/x-raw , format=NV12 , height=240 , width=320 ! eiovready ! fakesink t. ! queue ! videorate ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=1/1' ! multifilesink location=/dev/shm/snap/snap1.jpeg max-files=1

    Regards,
    Prerak
  • Hello,

    We are looking into this.

    BR
    Margarita
  • Hi Margarita,

    Any findings on the issue?

    Regards,

    Prerak

  • Hello Prerak,

    The error that you are observing comes from ducati plugin.
    Refer gstducatividdec.c file. You could try to make changes in ducati where dce_buf_lock happens upfront and it is not called dynamically.

    BR
    Margarita
  • Hi,

    I have done some changes in gstducatividdec.c as below.

    static gboolean
    gst_ducati_viddec_parse_caps (GstDucatiVidDec * self, GstStructure * s)
    {
    const GValue *codec_data;
    gint w, h;

    if (gst_structure_get_int (s, "width", &self->input_width) &&
    gst_structure_get_int (s, "height", &self->input_height)) {

    // h = ALIGN2 (self->input_height, 4); /* round up to MB */
    // w = ALIGN2 (self->input_width, 4); /* round up to MB */

    /*==================================*/
    h = 1824; /* round up to MB */
    w = 1824; /* round up to MB */
    /*===================================*/
    /* if we've already created codec, but the resolution has changed, we
    * need to re-create the codec:
    */

    Regards,
    Prerak
  • Hello Prerak,

    I would recommend you to check my previous post.
    I just saw that you are using psdk 3.0 in previous thread. Please move to the latest PSDK version. One more note please try only the "decoding" branch without tee element etc, so you observe the issue. Do not forget to add vpe after decoder.

    BR
    Margarita
  • Hi,

    As per your suggestion, we are preparing our application package for latest SDK.
    I will put it on testing and share results with you.
    I have also put only decoding part(without tee element) for testing but still getting the same error.
    Below is the pipeline for your reference.

    gst-launch-1.0 -e v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=15/1' ! ducatijpegdecvpe ! 'video/x-raw, format=(string)NV12, width=(int)1824, height=(int)1824' ! queue leaky=2 ! videocrop left = 912 right=0 top=912 bottom=0 ! queue ! videoscale ! video/x-raw , format=NV12 , height=240 , width=320 ! eiovready ! fakesink

    Regards,
    Prerak
  • Hello,

    I see in the pipeline there is a custom plugin. Could you let me know for the pipeline that reproduce the issue without the custom plugins?

    BR
    Margarita
  • Hi,

    I need to check that also.

    I will put below pipeline for testing.

    gst-launch-1.0 -e v4l2src device=/dev/video1 ! 'video/x-raw, format=(string)YUY2, width=(int)640, height=(int)720, framerate=15/1' ! ducatijpegdecvpe ! 'video/x-raw, format=(string)NV12, width=(int)1824, height=(int)1824' ! queue leaky=2 ! videocrop left = 912 right=0 top=912 bottom=0 ! queue ! videoscale ! video/x-raw , format=NV12 , height=240 , width=320 ! fakesink

    Let me know if you require changes in that.

    Regards,
    Prerak
  • Hello,

    Seems fine. Could you add only queue element before the ducati decoder.
    Per my understanding your video source provides jpeg unfortunately I do not have such video source on my side.
    Please could you try to add jpegparse element before the decode to check is it will work(probably not).


    BR
    Margarita

  • Hi,

    I have added queue element befor decoder. Jpegparse is not working with this pipeline.

    Regards,
    Prerak
  • Hello,

    Regarding jpegparse was expected.
    Please let me know the result.

    BR
    Margarita
  • Hello,

    I have put one board for testing with the latest filesystem.

    I will share results after the weekend.

    Regards,

    Prerak

  • Hi Margarita,

    Its 2 days and 9 hours, Application is working without any error.

    I want to test it for a few more days, as an error comes randomly.

    For your note, we are running board on GBPS link, and we are getting the link up/down message log continuously.

    Regards,

    Prerak

  • Hello,

    Prerak Patel said:

    Its 2 days and 9 hours, Application is working without any error.

    I want to test it for a few more days, as an error comes randomly.

    Okay. I will close the thread temporally. Post a reply below when you are done.

    Prerak Patel said:
    For your note, we are running board on GBPS link, and we are getting the link up/down message log continuously.

    Regarding the network error you could open a new topic.

    BR
    Margarita

  • Part Number: AM5726

    Tool/software: Linux

    Hi,

    I am getting same error even after moving to new filesystem(processor sdk 4.3.0.5).

    Error comes randomly, some time after 2 hours and some time after 20 days.

    Regards,

    Prerak

  • Any updates on this ?

    Thanks,
    Prerak
  • Hello,

    Prerak Patel said:
    I am getting same error even after moving to new filesystem(processor sdk 4.3.0.5).

    The latest PSDK is 5.0.

    You have tested this without your custom plugins and vpe was included right?

    BR
    Margarita

  • One more note in PSDK the gstreamer version is 1.12. In previous release is 1.8.
    You could try 1.12.
    Please refer this answer also:
    e2e.ti.com/.../2618323
    This is something that you could try on your side.
    In additional, you could try to analyze the logs and check which buffers is not able to lock.

    Hope this helps.

    BR
    Margarita
  • Yes, I have tested this without  custom plugins and vpe was included.

    Regards,

    Prerak