Nvv4l2decoder fails with "linux-vdso.so.1: No such file"

Hardware: Jetson Nano B02
DeepStream version: 5.0 DP

Hi, I am trying to decode an http mjpeg stream and send it to DeepStream inference etc. plugins. In the beginning of the pipeline I have:

souphttpsrc location=http://... is_live=True !  nvv4l2decoder mjpeg=1 ! nvstreammux ! ...

and the pipeline continues with the usual nvinfer etc plugins (this part of the pipeline is already tested with different types of source).

This pipeline crashes with the following error:

Opening in BLOCKING MODE 
0:00:00.186809693 13375     0x2bab2690 WARN                    v4l2 gstv4l2object.c:4410:gst_v4l2_object_probe_caps:<jpeg-decoder:src> Failed to probe pixel aspect ratio with VIDIOC_CROPCAP: Unknown error -1
0:00:00.186888809 13375     0x2bab2690 WARN                    v4l2 gstv4l2object.c:2372:gst_v4l2_object_add_interlace_mode:0x2baad870 Failed to determine interlace mode
** (python3:13375): CRITICAL **: 17:18:44.160: gst_context_get_egl_display: assertion 'strcmp (gst_context_get_context_type (context), GST_EGL_DISPLAY_CONTEXT_TYPE) == 0' failed
** (python3:13375): CRITICAL **: 17:18:44.166: gst_context_get_egl_display: assertion 'strcmp (gst_context_get_context_type (context), GST_EGL_DISPLAY_CONTEXT_TYPE) == 0' failed

Using winsys: x11 

Using winsys: x11 
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_nvdcf.so
gstnvtracker: Optional NvMOT_RemoveStreams not implemented
gstnvtracker: Batch processing is ON
0:00:00.910201327 13375     0x2af30a80 WARN            videodecoder gstvideodecoder.c:2443:gst_video_decoder_chain:<jpeg-decoder> Received buffer without a new-segment. Assuming timestamps start from 0.
Signal received: 4, errno: 1
################################################################################
Resolved stacktrace:
################################################################################
0x0000007f7a913c78: ?? ??:0
0x00000000000a4424: s_print_stack_trace at module.c:455
addr2line: 'linux-vdso.so.1': No such file
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f863e56c0]
0x0000000000022804: gst_plugin_nvvideo4linux2_get_desc at ??:?
0x000000000003d774: gst_video_overlay_set_property at ??:?
################################################################################
Raw stacktrace:
################################################################################
/home/pa/.local/lib/python3.6/site-packages/_awscrt.cpython-36m-aarch64-linux-gnu.so(aws_backtrace_print+0x54) [0x7f7a913c78]
/home/pa/.local/lib/python3.6/site-packages/_awscrt.cpython-36m-aarch64-linux-gnu.so(+0xa4424) [0x7f7a8bc424]
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f863e56c0]
/usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvvideo4linux2.so(+0x22804) [0x7f77157804]
/usr/lib/aarch64-linux-gnu/libgstvideo-1.0.so.0(+0x3d774) [0x7f7f011774]
Signal received: 0, errno: 0
################################################################################
Resolved stacktrace:
################################################################################
0x0000007f7a913c78: ?? ??:0
0x00000000000a4424: s_print_stack_trace at module.c:455
addr2line: 'linux-vdso.so.1': No such file
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f863e56c0]
0x000000000024802c: NvMOT_ProcessPast at ??:?
################################################################################
Raw stacktrace:
################################################################################
/home/pa/.local/lib/python3.6/site-packages/_awscrt.cpython-36m-aarch64-linux-gnu.so(aws_backtrace_print+0x54) [0x7f7a913c78]
/home/pa/.local/lib/python3.6/site-packages/_awscrt.cpython-36m-aarch64-linux-gnu.so(+0xa4424) [0x7f7a8bc424]
linux-vdso.so.1(__kernel_rt_sigreturn+0) [0x7f863e56c0]
/opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_nvdcf.so(+0x24802c) [0x7f2ea9b02c]
################################################################################
Resolved stacktrace:
################################################################################

Could you assist me setting up an htpp mjpeg source for DeepStream?

nvv4l2decoder needs proper parser to provide correct data to it. Since the pipeline is for a stream, can you try “multipartdemux” before nvv4l2decoder?
https://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good/html/gst-plugins-good-plugins-multipartdemux.html

Thank you for the suggestion. I indeed inserted a multipartdemux plugin in the pipeline where you suggested, but this time I receive a different error message from nvv4l2decoder saying “Failed to allocate required memory. Buffer pool activation failed.” The error message is sent on the pipeline bus.

An excerpt of my (python) logs, sorry for some custom logging but I think it should be quite straightforward to read it:

INFO:__main__.Pipeline:Creating soup-http-source (type: souphttpsrc)
INFO:__main__.Pipeline:Creating multipartdemux (type: multipartdemux)
INFO:__main__.Pipeline:Creating nvv4l2decoder (type: nvv4l2decoder)
INFO:__main__.Pipeline:Linking soup-http-source -> multipartdemux

... (the http source connects to the mjpeg server and fetches the first image)

INFO:__main__.Pipeline:multipartdemux:src_0 was added with caps: image/jpeg
INFO:__main__.Pipeline:Linking multipartdemux:src_0 -> nvv4l2decoder:sink
INFO:__main__.Pipeline:Exposing nvv4l2decoder:src as ghost pad on source-bin
NvMMLiteOpen : Block : BlockType = 277 
NVMEDIA: Reading vendor.tegra.display-size : status: 6 
NvMMLiteBlockCreate : Block : BlockType = 277 
nvbufsurface: Invalid buffer size=0
nvbufsurface: Error in allocating buffer
ERROR:__main__.Pipeline:Error from pipeline bus: gst-resource-error-quark: Failed to allocate required memory. (13): /dvs/git/dirty/git-master_linux/3rdparty/gst/gst-v4l2/gst-v4l2/gstv4l2videodec.c(1558): gst_v4l2_video_dec_handle_frame (): /GstPipeline:pa_pipeline/GstBin:source-bin/nvv4l2decoder:jpeg-decoder:
Buffer pool activation failed

For your convenience I also attached the segment of the pipeline as drawn by debug_bin_to_dot_file:

@janos.tolgyesi Can you read the page I sent carefully? There details of using multipartdemux correctly has been all in GStreamer documents. The element’s pad is special.

Hello @Fiona.Chen, I am afraid I do not understand what do you refer to. The page has quite limited information except that this plugin has a sometimes source pad that I naturally link to from the pad-added callback of multipartdemux. In fact the plugins link correctly, the problem is that the nvv4l2decoder sends me a memory allocation error as soon as the first buffer is sent on the pipeline. Did I miss some other important info in the multipartdemux page?

Note also that this pipeline functions correctly with my mjpeg server:

gst-launch-1.0 souphttpsrc location="http://192.168.8.103:8080/?action=stream" is_live=true ! nvjpegdec ! nvegltransform ! nveglglessink sync=0

@janos.tolgyesi
nvv4l2decoder support multiple caps in sink pad, so the caps should be specified to help the negotiation. nvjpegdec only support one caps type. You can use “gst-inspect-1.0” to check the capabilities for pads.

Thank you for your answer. I would like to underline that all plugins in my pipeline are linked correctly, particularly the multipartdemux and nvv4l2decoder with image/jpeg caps correctly selected. Please refer also to the pipeline diagram above. So as far as I understood there aren’t any problem with the caps negotiation. A memory allocation error is raised on the bus of the pipeline in the “playing” state. Thank you.