Issues occur when using metamux and nvstreamdemux simultaneously - Follow up

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Jetson Orin AGX
• DeepStream Version 7.0
• JetPack Version (valid for Jetson only) 6.0

Hello,

I am reopening this issue Issues occur when using metamux and nvstreamdemux simultaneously while trying to validate the proposed nvstreamdemux workaround with deepstream_parallel_inference_app.

Can NVIDIA confirm whether the proposed workaround using deepstream_parallel_inference_app_demux has been tested on DeepStream 7.0, or if it only applies to DeepStream 7.1+?

Build issue in the workaround code

I used your workaround in the code of deepstream_reference_apps/deepstream_parallel_inference_app/tritonclient/sample/apps/deepstream-parallel-infer at master · NVIDIA-AI-IOT/deepstream_reference_apps · GitHub

When compiling, I hit the following error:

deepstream_parallel_infer_app.cpp:1310:55: error:
‘struct NvDsInstanceBin’ has no member named ‘sink_tee’

However, in all other parts of the code, the correct member used is:

instance_bin->tee

I fixed it by replacing instance_bin->sink_tee with instance_bin->tee. It allows the application to compile successfully.

Can you confirm whether this is a known typo in the workaround code?

Runtime crash (segmentation fault)

After fixing the build issue, the application starts correctly but crashes at runtime with a segmentation fault.

I used a simple config with two models and two sources.

Configs

sources.txt (320 Bytes) (csv but only txt files can be uploaded)

deepstream_config.txt (1.9 KB) (yml but only txt files can be uploaded)

yolo_coco_config_infer.txt (955 Bytes)

config_metamux.txt (282 Bytes)

Logs

---------------Logger initialized---------------------
src_ids:0;1
src_ids:0;1
i:0, src_id_num:2
link_streamdemux_to_streammux, srid:0, mux:0
link_streamdemux_to_streammux, srid:1, mux:0
i:1, src_id_num:2
link_streamdemux_to_streammux, srid:0, mux:1
link_streamdemux_to_streammux, srid:1, mux:1

Good linking between sources and branches.

Setting min object dimensions as 16x16 instead of 1x1 to support VIC compute mode.

0:00:04.560427776 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 1]: deserialized trt engine from :/phoenix/models/yolo_coco_1/model_b2_gpu0_fp16.engine
INFO: [FullDims Engine Info]: layers num: 2
0 INPUT kFLOAT input 3x640x640 min: 1x3x640x640 opt: 2x3x640x640 Max: 2x3x640x640
1 OUTPUT kFLOAT output 8400x6 min: 0 opt: 0 Max: 0

0:00:04.826059916 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 1]: Use deserialized engine model: /phoenix/models/yolo_coco_1/model_b2_gpu0_fp16.engine
0:00:04.837476498 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/phoenix/models/yolo_coco_1/config_infer.txt sucessfully
Setting min object dimensions as 16x16 instead of 1x1 to support VIC compute mode.
0:00:08.720722730 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2095> [UID = 2]: deserialized trt engine from :/phoenix/models/yolo_coco_2/model_b2_gpu0_fp16.engine
INFO: [FullDims Engine Info]: layers num: 2
0 INPUT kFLOAT input 3x640x640 min: 1x3x640x640 opt: 2x3x640x640 Max: 2x3x640x640
1 OUTPUT kFLOAT output 8400x6 min: 0 opt: 0 Max: 0

0:00:09.004479150 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer.cpp:682:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 2]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2198> [UID = 2]: Use deserialized engine model: /phoenix/models/yolo_coco_2/model_b2_gpu0_fp16.engine
0:00:09.010500868 3124 0xaaab36fb3ce0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary_gie> [UID 2]: Load new model:/phoenix/models/yolo_coco_2/config_infer.txt sucessfully

Good init of the models

Running…
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NvMMLiteBlockCreate : Block : BlockType = 261
Opening in BLOCKING MODE
NvMMLiteOpen : Block : BlockType = 261
NvMMLiteBlockCreate : Block : BlockType = 261

(deepstream-parallel-infer:3124): GStreamer-WARNING **: 09:20:00.323: ../gst/gstpad.c:5337:store_sticky_event:<nvstreamdemux_last:src_1> Sticky event misordering, got ‘segment’ before ‘stream-start’

(deepstream-parallel-infer:3124): GStreamer-WARNING **: 09:20:00.324: ../gst/gstpad.c:5337:store_sticky_event:<fakesink_1:sink> Sticky event misordering, got ‘segment’ before ‘stream-start’

(deepstream-parallel-infer:3124): GStreamer-WARNING **: 09:20:00.324: ../gst/gstpad.c:5337:store_sticky_event:<nvstreamdemux_last:src_1> Sticky event misordering, got ‘segment’ before ‘caps’

(deepstream-parallel-infer:3124): GStreamer-WARNING **: 09:20:00.324: ../gst/gstpad.c:5337:store_sticky_event:<fakesink_1:sink> Sticky event misordering, got ‘segment’ before ‘caps’
Segmentation fault (core dumped)

I am checking.

Found the bug. Just a typo in the config file:

[property]
enable=1
active-pad=sink_0
pts-tolerance=60000

# [group-0]
src-ids-model-1=0;1
src-ids-model-2=0;1

The groupe-0 section was commented.