Adding 4th Primary Nvinfer drops metadata from another Nvinfer

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) :- GPU
• DeepStream Version :- 8.0

Adding a 4th primary nvinfer silently stops the 1st nvinfer from producing detections (DS 8.0)

Setup

  • DeepStream 8.0.0, CUDA 12.8, dGPU RTX 4000 Ada (20 GB), driver 580.173.02, x86_64
  • 10 × RTSP 1080p live sources → nvstreammux (batch-size=10, width=1920 height=1080)
  • Four nvinfer elements, all process-mode=1 (primary), in this order on the batched stream,
    plus an NvDCF tracker, an nvof element, and a dsexample-derived plugin doing per-frame
    CPU (OpenCV) work. Metadata is serialized out of the process and consumed downstream via nvunixdfsrc and nvunixfdsink
gie-unique-id classes batch-size interval network-mode notes
A 4 10 0 2 (FP16) YOLO ONNX, custom bbox parser
B 1 1 0 2 pose model, different custom parser lib
C 9 10 0 2 YOLO ONNX, same parser lib as A
D 3 10 1 2 1280×1280 input, YOLO ONNX, same parser lib as A — newly added, last in the chain

All four use cluster-mode=2 and custom-lib-path bbox parsers. A, C and D share one parser
.so; B uses a different one.

Observation

With D enabled at interval: 1, element A produces zero detections on all 10 streams.

  • No nvinfer error or warning, no GStreamer error/warning, no bus message.
  • The pipeline stays in PLAYING and keeps running indefinitely.
  • B and C are unaffected.
  • Aggregate framerate through the pipeline drops ~25%.
  • A’s engine file, config file and label file are unchanged and bit-identical to the
    known-good state.

The failure is completely silent — from outside the pipeline it is indistinguishable from
“there was nothing in the scene to detect”.

How we measured it

1. Count objects per unique_component_id over a fixed 60 s window, from the serialized
metadata (any consumer works — the point is to bucket by source GIE rather than look at totals):

import json, collections
c = collections.Counter()
for line in open('metadata_capture.jsonl'):
    d = json.loads(line)
    for o in d.get('objects', []):
        c[o['source_gie']] += 1        # unique_component_id
print(dict(c))

If a GIE’s id is missing from that histogram, it inferred nothing — which is invisible in any
aggregate object count or FPS number.

2. GPU occupancy (sm is the column that mattered, not mem):

nvidia-smi dmon
nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total --format=csv

Isolation

One variable changed at a time, 60 s capture after each, everything else (tracker, nvof,
dsexample plugin, serializer) left running and verified still active:

D state A objects/60s C B aggregate msg/s GPU sm
D at interval: 1 0 1680 33 118 99%
D at interval: 9 273 1248 82 147 77–93%
D removed from models.pgies 342 909 31 150 —
baseline, D never added 511 1869 635 155 —

So:

  • Removing only D restores A completely.
  • Keeping D but reducing its inference duty cycle (interval: 1 → 9, i.e. every 10th frame
    instead of every 2nd) also restores A.
  • A dies at ~99% sm and is healthy at ~83% sm.

Ruled out by measurement

  • GPU memory — 4.9 GB of 20.5 GB used in the failing state.
  • Host CPU — load 2.6 on 16 cores, no cgroup CPU limit, the consuming process at 2.6%.
  • Disk — 750 GB free.
  • The shared custom bbox parser — source is fully stateless (no statics/globals, all
    inputs via arguments), and C shares the same .so and same parse-bbox-func-name while
    remaining healthy.
  • The dsexample-derived plugin and nvof — both still active and producing their
    per-frame metadata in the run where A recovered.
  • The metadata serializer — object schema verified identical (same key set, source_gie
    present on 100% of objects) in working and broken runs.
  • A’s own configuration — num-detected-classes, thresholds, interval=0,
    model-engine-file, labels.txt all byte-identical between working and broken runs.

Questions

  1. Is there a documented nvinfer behaviour where inference is skipped or dropped under GPU
    contention
    rather than queued? If so, where is it logged, and at what level? We could
    not find any log line reporting it.
  2. Is there a per-element queue depth / timeout in nvinfer that discards buffers instead of
    applying backpressure, and is it tunable?
  3. What is the recommended way to make this observable? Is there a GST_DEBUG category and
    level that reports skipped inferences or dropped batches per GIE, so this shows up as a log
    line rather than as an empty object list?
  4. Do multiple nvinfer instances share a CUDA stream by default, and is there guidance on
    stream priority / scheduling between several primary GIEs on one GPU? Is a 1280×1280 FP16
    batch-10 engine at interval: 1 alongside three other primary GIEs expected to be
    schedulable on this class of card, or is per-stream serialization the practical limit?
  5. Is the first GIE in the chain expected to be the one starved, or is the ordering incidental?
    In our case the newly added element is last and the starved one is first.

PS :- I need those nvinfers in primary mode

This table looks abnormal. If it represents different times from a live source, it’s meaningless. Only by looping through and analyzing a segment of the stream can a correct comparison be made.

For the same set of images, the number of detected objects should be roughly the same.

You stated above that the B/C model is unaffected, but this cannot be proven.

You should typically set the batch size to match the nvstreammux batch size; otherwise, nvinfer b might perform 10 inferences.

The answer to all three questions is no; nvinfer does not actively drop frames, and the observed empty object list should be checked first for inference interval, model output/threshold, and drop configuration of other pipeline components.

No. Multiple nvinfer instances do not share a CUDA stream by default. Each nvinfer instance creates and owns its own streams:

I built a similar pipeline like yours, with 10 simulated RTSPs, and adjusted the GPU load to near 100%, without encountering any problems.

nvinfer a --> nvinfer b --> nvinfer c --> nvinfer d --> nvtracker (nvdcf) --> nvdsexample --> nvunixfdsink

Please ensure that no exceptions occur when writing to metadata_capture.jsonl.

This is my demostrates.

multi-nvinfer.py (8.3 KB)