NvDeepSort segmentation fault in python pipeline on L4 system

Please provide complete information as applicable to your setup.

AMD64 with Nvidia L4 gpu
7.0
• JetPack Version (valid for Jetson only)
TensorRT v8601

driver version 535.183.06
• Issue Type( questions, new requirements, bugs)

NvDeepSort causes segmentation fault on loading the the engine file.

the engine is built at first runtime from the tao model file provided by Nvidia, i.e.

resnet50_market1501.etlt

this results in an engine file:

resnet50_market1501.etlt_b100_gpu0_int8.engine

which I can load with trxtexec just fine.

/usr/src/tensorrt/bin/trtexec --loadEngine=models/NvDeepsort/resnet50_market1501.etlt_b100_gpu0_int8.engine

executes without errors, and runs & benchmarks the REID model.

When I run my pipeline for the first time, without the engine file, it is built at runtime and the pipeline subseuqently executes without errors.

With the engine file already generated, when I run the pipeline , it just aborts after loading:

gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Loading TRT Engine for tracker ReID...
[NvMultiObjectTracker] Loading Complete!
Aborted (core dumped)

• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

I believe this error is coming from the nvtracker module, configured to run NvDeepSort

Tracker highlevel config:

[tracker]
tracker-width=640
tracker-height=384
gpu-id=0
ll-lib-file=/opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
ll-config-file=/opt/deepstream-pose-estimation/config/config_tracker_NvDeepSORT.yml
compute-hw=1

the yml config:

BaseConfig:
minDetectorConfidence: 0.0762 # If the confidence of a detector bbox is lower than this, then it won’t be considered for tracking

TargetManagement:
preserveStreamUpdateOrder: 0 # When assigning new target ids, preserve input streams’ order to keep target ids in a deterministic order over multuple runs
maxTargetsPerStream: 150 # Max number of targets to track per stream. Recommended to set >10. Note: this value should account for the targets being tracked in shadow mode as well. M
ax value depends on the GPU memory capacity

[Creation & Termination Policy]

minIouDiff4NewTarget: 0.85 #0.9847 # If the IOU between the newly detected object and any of the existing targets is higher than this threshold, this newly detected object will be d
iscarded.
minTrackerConfidence: 0.3 #0.4314 # If the confidence of an object tracker is lower than this on the fly, then it will be tracked in shadow mode. Valid Range: [0.0, 1.0]
probationAge: 2 # If the target’s age exceeds this, the target will be considered to be valid.
maxShadowTrackingAge: 300 #68 # Max length of shadow tracking. If the shadowTrackingAge exceeds this limit, the tracker will be terminated.
earlyTerminationAge: 3 #1 # If the shadowTrackingAge reaches this threshold while in TENTATIVE period, the the target will be terminated prematurely.

TrajectoryManagement:
useUniqueID: 0 # Use 64-bit long Unique ID when assignining tracker ID.

DataAssociator:
dataAssociatorType: 0 # the type of data associator among { DEFAULT= 0 }
associationMatcherType: 1 # the type of matching algorithm among { GREEDY=0, CASCADED=1 }
checkClassMatch: 1 # If checked, only the same-class objects are associated with each other. Default: true

[Association Metric: Mahalanobis distance threshold (refer to DeepSORT paper) ]

thresholdMahalanobis: 1500 #12.1875 # Threshold of Mahalanobis distance. A detection and a target are not matched if their distance is larger than the threshold.

[Association Metric: Thresholds for valid candidates]

minMatchingScore4Overall: 0.1794 # Min total score
minMatchingScore4SizeSimilarity: 0.3291 # Min bbox size similarity score
minMatchingScore4Iou: 0.2364 # Min IOU score
minMatchingScore4ReidSimilarity: 0.5 #0.7505 # Min reid similarity score

[Association Metric: Weights for valid candidates]

matchingScoreWeight4SizeSimilarity: 0.2 #0.7178 # Weight for the Size-similarity score
matchingScoreWeight4Iou: 0.5 #0.4551 # Weight for the IOU score
matchingScoreWeight4ReidSimilarity: 0.6 #0.3197 # Weight for the reid similarity

[Association Metric: Tentative detections] only uses iou similarity for tentative detections

tentativeDetectorConfidence: 0.2479 # If a detection’s confidence is lower than this but higher than minDetectorConfidence, then it’s considered as a tentative detection
minMatchingScore4TentativeIou: 0.2376 # Min iou threshold to match targets and tentative detection

StateEstimator:
stateEstimatorType: 2 # the type of state estimator among { DUMMY=0, SIMPLE=1, REGULAR=2 }

[Dynamics Modeling]

noiseWeightVar4Loc: 0.0503 # weight of process and measurement noise for bbox center; if set, location noise will be proportional to box height
noiseWeightVar4Vel: 0.0037 # weight of process and measurement noise for velocity; if set, velocity noise will be proportional to box height
useAspectRatio: 1 # use aspect ratio in Kalman filter’s observation

ReID:
reidType: 1 # The type of reid among { DUMMY=0, DEEP=1 }

[Reid Network Info]

batchSize: 100 # Batch size of reid network
workspaceSize: 1000 # Workspace size to be used by reid engine, in MB
reidFeatureSize: 256 # Size of reid feature
reidHistorySize: 200 #100 # Max number of reid features kept for one object
inferDims: [3, 256, 128] # Reid network input dimension CHW or HWC based on inputOrder
networkMode: 2 # Reid network inference precision mode among {fp32=0, fp16=1, int8=2 }

[Input Preprocessing]

inputOrder: 0 # Reid network input order among { NCHW=0, NHWC=1 }. Batch will be converted to the specified order before reid input.
colorFormat: 0 # Reid network input color format among {RGB=0, BGR=1 }. Batch will be converted to the specified color before reid input.
offsets: [123.6750, 116.2800, 103.5300] # Array of values to be subtracted from each input channel, with length equal to number of channels
netScaleFactor: 0.01735207 # Scaling factor for reid network input after substracting offsets
keepAspc: 1 # Whether to keep aspc ratio when resizing input objects for reid

[Output Postprocessing]

addFeatureNormalization: 1 # If reid feature is not normalized in network, adding normalization on output so each reid feature has l2 norm equal to 1

[Paths and Names]

tltEncodedModel: “/opt/deepstream-pose-estimation/models/NvDeepsort/resnet50_market1501.etlt” # NVIDIA TAO model path
tltModelKey: “nvidia_tao” # NVIDIA TAO model key
modelEngineFile: “/opt/deepstream-pose-estimation/models/NvDeepsort/resnet50_market1501.etlt_b100_gpu0_int8.engine”

Engine file path

#enable-dla: 1
#use-dla-core: 0

Seems you are using the official ReID modle from here: Gst-nvtracker — DeepStream documentation 6.4 documentation
Can you run your application with gdb to have a check the crash?

[New Thread 0x7fff8175d640 (LWP 44423)]
[New Thread 0x7fff80f5c640 (LWP 44424)]
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Loading TRT Engine for tracker ReID…
[NvMultiObjectTracker] Loading Complete!

Thread 1 “python3” received signal SIGSEGV, Segmentation fault.
0x00007ffff44ad550 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

output from gdb ^^

Can you share more backtrace of gdb? I can’t understand the issue with one line backtrace.

gdb -ex r --args python3 src/deepstream-pose-estimation/main.py
GNU gdb (Ubuntu 12.1-0ubuntu1~22.04.2) 12.1
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type “show copying” and “show warranty” for details.
This GDB was configured as “x86_64-linux-gnu”.
Type “show configuration” for configuration details.
For bug reporting instructions, please see:
https://www.gnu.org/software/gdb/bugs/.
Find the GDB manual and other documentation resources online at:
http://www.gnu.org/software/gdb/documentation/.

For help, type “help”.
Type “apropos word” to search for commands related to “word”…
Reading symbols from python3…
Reading symbols from /usr/lib/debug/.build-id/23/fb443eb653a121dc4eb1d0033a972276ab9180.debug…
Starting program: /usr/bin/python3 src/deepstream-pose-estimation/main.py
[Thread debugging using libthread_db enabled]
Using host libthread_db library “/lib/x86_64-linux-gnu/libthread_db.so.1”.
[New Thread 0x7fffdc3ff640 (LWP 50429)]
[New Thread 0x7fffd9bfe640 (LWP 50430)]
[New Thread 0x7fffd93fd640 (LWP 50431)]
[2024-08-09 18:57:19,959] [deepstream-pose-estimation] [INFO] TΞꓘN01R
[2024-08-09 18:57:19,959] [deepstream-pose-estimation] [INFO] TΞꓘN01R
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] TΞꓘN01R
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] starting pipeline
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] input/output streams:
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/1 → stream1
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/2 → stream2
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/3 → stream3
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/4 → stream4
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/5 → stream5
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/6 → stream6
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/7 → stream7
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/8 → stream8
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/9 → stream9
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/10 → stream10
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/11 → stream11
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/12 → stream12
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/13 → stream13
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/14 → stream14
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/15 → stream15
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/16 → stream16
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/17 → stream17
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/18 → stream18
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/19 → stream19
[2024-08-09 18:57:19,960] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/20 → stream20
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/21 → stream21
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/22 → stream22
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/23 → stream23
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] rtsp://10.128.0.41:8554/24 → stream24
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] adding annotations to output streams
[2024-08-09 18:57:19,961] [deepstream-pose-estimation] [INFO] Creating paho mqtt client
[2024-08-09 18:57:19,986] [deepstream-pose-estimation] [INFO] Creating Pipeline for 24 streams

[New Thread 0x7fffcb9ff640 (LWP 50432)]
[Detaching after vfork from child process 50433]
[2024-08-09 18:57:20,034] [deepstream-pose-estimation] [INFO] using file /data/vids/chute01/cam1.avi as source
[2024-08-09 18:57:20,034] [deepstream-pose-estimation] [INFO] streaming from file:///data/vids/chute01/cam1.avi
[2024-08-09 18:57:20,034] [deepstream-pose-estimation] [INFO] Creating source_bin 0 for stream file:///data/vids/chute01/cam1.avi

creating bin
bin source-bin-00 at uri file:///data/vids/chute01/cam1.avi
looping set for file source
[2024-08-09 18:57:20,308] [deepstream-pose-estimation] [INFO] Creating nvstreamdemux

[New Thread 0x7fff8435e640 (LWP 50434)]
[2024-08-09 18:57:20,345] [deepstream-pose-estimation] [INFO] Setting batchsize to fixed value of 8
[2024-08-09 18:57:20,353] [deepstream-pose-estimation] [INFO] Creating post_track_converter
[2024-08-09 18:57:20,360] [deepstream-pose-estimation] [INFO] Creating filter1
[2024-08-09 18:57:20,376] [deepstream-pose-estimation] [INFO] Adding elements to Pipeline

[New Thread 0x7fff83b5d640 (LWP 50435)]
[2024-08-09 18:57:20,429] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,438] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,439] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,440] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,442] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,443] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,444] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,446] [deepstream-pose-estimation] [INFO] Creating nvosd

[2024-08-09 18:57:20,460] [deepstream-pose-estimation] [INFO] output to mqqt topic at : deepstream-pose-estimation_output
[2024-08-09 18:57:20,460] [deepstream-pose-estimation] [INFO] using connection string: 127.0.0.1;1883;test
[2024-08-09 18:57:20,468] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8854/stream1 ***

[2024-08-09 18:57:20,468] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8855/stream2 ***

[2024-08-09 18:57:20,468] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8856/stream3 ***

[2024-08-09 18:57:20,468] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8857/stream4 ***

[2024-08-09 18:57:20,469] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8858/stream5 ***

[2024-08-09 18:57:20,469] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8859/stream6 ***

[2024-08-09 18:57:20,469] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8860/stream7 ***

[2024-08-09 18:57:20,469] [deepstream-pose-estimation] [INFO] *** DeepStream: Launched RTSP Streaming at rtsp://10.128.0.63:8861/stream8 ***

[2024-08-09 18:57:20,469] [deepstream-pose-estimation] [INFO] loop start

[New Thread 0x7fff823ff640 (LWP 50436)]
Decodebin child added: nvurisrc_bin_src_elem

[New Thread 0x7fff8175d640 (LWP 50437)]
[New Thread 0x7fff80f5c640 (LWP 50438)]
[New Thread 0x7fff65fff640 (LWP 50439)]
[New Thread 0x7fff657fe640 (LWP 50440)]
[New Thread 0x7fff64ffd640 (LWP 50441)]
[New Thread 0x7fff3ffff640 (LWP 50442)]
[New Thread 0x7fff3f7fe640 (LWP 50443)]
[New Thread 0x7fff3effd640 (LWP 50444)]
[New Thread 0x7fff3e7fc640 (LWP 50445)]
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream/lib/libnvds_nvmultiobjecttracker.so
[NvMultiObjectTracker] Loading TRT Engine for tracker ReID…
[NvMultiObjectTracker] Loading Complete!

Thread 1 “python3” received signal SIGSEGV, Segmentation fault.
0x00007ffff44ad550 in ?? () from /lib/x86_64-linux-gnu/libstdc++.so.6

Can you reproduce the issue with Nvidia released C++ or Python samples? So I can reproduce and debug it in my side.

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.