Deepstream application fails after runnig rtsp for a while

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) Nvidia Orin Nano
• DeepStream Version 6.3
• JetPack Version (valid for Jetson only) 5.1.2
• TensorRT Version
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( questions, new requirements, bugs)

I am running a deepstream application with RTSP and it run for about 20 second then it crashes with this error:

(Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
(Argus) Error FileOperationFailed: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 277)
(Argus) Error FileOperationFailed: Receive worker failure, notifying 1 waiting threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 350)
(Argus) Error InvalidState: Argus client is exiting with 1 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)
(Argus) Error FileOperationFailed: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 379)
(Argus) Error FileOperationFailed: Client thread received an error from socket (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 145)
(Argus) Error FileOperationFailed:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
ERROR from src_elem: DISCONNECTED
Debug info: Argus Error Status
CONSUMER: ERROR OCCURRED
Quitting
nvstreammux: Successfully handled EOS for source_id=0
[NvMultiObjectTracker] De-initialized
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState: Receive thread is not running cannot send. (in src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 96)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
./run.sh: line 13:    19 Segmentation fault      (core dumped) ./deepstream-app -c config/deepstream_app_source1_detection_models.txt

These are the config files:

deepstream_app_source1_detection_models.txt (5.5 KB)

config_infer_primary_detectnet_v2_b.txt (2.3 KB)

i am receiving this error sometimes restating my docker:

ERROR from src_elem: TIMEOUT
Debug info: Argus Error Status
CONSUMER: ERROR OCCURRED
Quitting
nvstreammux: Successfully handled EOS for source_id=0
[NvMultiObjectTracker] De-initialized
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
GST_ARGUS: Cleaning up
App run failed
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error InvalidState: Argus client is exiting with 2 outstanding client threads (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 366)

If you are using rtsp source, the source type is incorrectly configured in your config file. You need to set that to 4.

#Type - 1=CameraV4L2 2=URI 3=MultiURI
type=4

the source is coming from a CSI camera which is type 5, the output is going to be with rtsp.

Just from your config file, you’re not enabling any sink. Could you try to use the fakesink first to narrow down the problem?

[sink0]
enable=1
#Type - 1=FakeSink
type=1
sync=1
source-id=0
gpu-id=0
nvbuf-memory-type=0

I use sink2 with type=4 for RTSP, I just switch between enabling and disabling it to see if the CPU usage is affecting it to get crashed or not. but for both cases, It crashes but it just happens earlier when RTSP is enabled.
Also, I don’t have display,so I don’t think fakesink would be practical for me.

Hi,
Please try the command to ensure the camera source is stable:

$ gst-launch-1.0 nvarguscamerasrc ! fakesink

It executed for about 2 minutes and gave me the time out error:

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 4032 x 3040 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 22.250000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 59.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: ERROR OCCURRED
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: TIMEOUT
Additional debug info:
Argus Error Status
Execution ended after 0:01:58.401544698
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
Freeing pipeline ...

Hi,
It looks to have some issue in the camera source. Please check the tips for debugging:

Jetson/l4t/Camera BringUp - eLinux.org

Or may contact vendor of the camera to get support.

Thank you, I am using Nvidia Orin Nano, for which I don’t see any debugging tips, does this apply for that too?
Also, FYI, I am using Arducam IMX477 camera.

Hi,
You can enable debug prints in nvargus-daemon and check what error is hit when the issue happens.