• Hardware Platform (Jetson / GPU) : Jetson orin nano
• DeepStream Version : 7.1
• JetPack Version (valid for Jetson only) : 6.1
• TensorRT Version : 10.7
• NVIDIA GPU Driver Version (valid for GPU only) : 540.4.0
• Issue Type : question, deep stream app raise “Segmentation fault“ after run the app for 20 min
Hi, I am building a DeepStream application on a Jetson orin nano where I need OSD overlays (bounding boxes) to appear on both the live display and the saved JPEG snapshots. the pipeline work perfectly, but after run save_sink_pad_buffer_probe to save jpg images (please check cpp_code.txt), the app raise “Segmentation fault“ after 10 ~ 20 minutes. Please give me some advice to solve this issue, thanks.
• Pipeline flow:
• Error msg:
0:02:20.313487065 285420 0xaaaaceb08d80 ERROR nvinfer gstnvinfer.cpp:1267:get_converted_buffer: cudaMemset2DAsync failed with error cudaErrorIllegalAddress while converting buffer
0:02:20.313534266 285420 0xaaaaceb08d80 WARN nvinfer gstnvinfer.cpp:1576:gst_nvinfer_process_full_frame: error: Buffer conversion failed
ERROR from element primary-nvinference-engine: Buffer conversion failed
Error details: /dvs/git/dirty/git-master_linux/deepstream/sdk/src/gst-plugins/gst-nvinfer/gstnvinfer.cpp(1576): gst_nvinfer_process_full_frame (): /GstPipeline:packaging-pipeline/GstNvInfer:primary-nvinference-engine
Stopping…
Segmentation fault (core dumped)
• Source code
cpp_code.txt (27.6 KB)
dsmeta_pgie_config.txt (1.5 KB)
I just go through your pipeline quickly, there are some suggestions for your pipeline according to the DeepStream usage.
- Please set “nvvideoconvert” property as Troubleshooting — DeepStream documentation
- The JPEG encoding can be done by hardware. Please refer to /opt/nvidia/deepstream/deepstream/sources/apps/sample_apps/deepstream-image-meta-test
- There is no nvmultistreamtiler or nvstreamdemux in your pipeline. For single input stream source, it is OK. For multiple stream case, you must use nvmultistreamtiler or nvstreamdemux in your pipeline.
For the issue you reported. Since we don’t have your model and sources, we can’t reproduce the issue in our side. You need either provide the methods to reproduce the same issue in our side or do more debugging to identify the root cause.
Hi Fiona, thanks for your reply and guidance.
Based on your suggestions, I have modified the code and successfully resolved the stability issues. I ran the DeepStream app continuously for 3 hours without any crashes.
Here is a summary of the specific changes I implemented:
-
Resolved nvvideoconvert negotiation errors: I added g_object_set(..., "copy-hw", 2, NULL); to force the use of the VIC engine on all video converter elements. I also ensured they utilize nvbuf-memory-type 0 (Surface Array) where applicable.
-
Implemented Hardware JPEG Encoding: I removed the OpenCV dependencies (cv::Mat, cv::imwrite) and replaced them with the NVIDIA hardware encoding API (nvds_obj_enc_create_context and nvds_obj_enc_process) inside the probe.
-
Added Tiler: I inserted nvmultistreamtiler into the pipeline between the PGIE and the downstream converters. This ensures stability for current single-stream handling and prepares the architecture for potential multi-stream usage.
I have attached the updated pipeline diagram below for your reference:
The modified source code is attached. If you have a moment, I would appreciate any further suggestions on how to improve or optimize the current pipeline.
cpp_code.txt (28.2 KB)