I built a 24/7 face recognition program that runs on a jetson nano dev kit. Encountering an error related to reading gstream camera with opencv (stereo camera IMX219-83), when initially reading the camera, it runs normally after about 4-5 hours, then the camera automatically stops and gets an error like below:
(Argus) Error EndOfFile: Unexpected error in reading socket (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadCore(), line 266)
(Argus) Error EndOfFile: Receiving thread terminated with error (in src/rpc/socket/client/ClientSocketManager.cpp, function recvThreadWrapper(), line 368)
2024-03-20 19:00:02,704 - WARNING - [camera.py:82] - Failed to read frame from camera. Retrying…
CONSUMER: ERROR OCCURRED
[ WARN:0] global /opt/opencv/modules/videoio/src/cap_gstreamer.cpp (488) isPipelinePlaying OpenCV | GStreamer warning: unable to query pipeline state
(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)
Please help me solve this problem because it happened continuously (the way I fixed it was by running sudo systemctl restart nvargus-daemon).
jetson nano: Jetpack 4.6.1
klog.txt (102.3 KB)
I don’t think it’s because of opencv, but I’m starting to run this command from now on to test and give you feedback. You can take a look at the dmegs log and head -n 1 /etc/nv_tegra_release #R32 (release), REVISION: 7.1, GCID: 29818004, BOARD: t210ref, EABI: aarch64, DATE: Sat Feb 19 17:05:08 UTC 2022
i try cmd: “gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! “video/x-raw(memory:NVMM),width=1640,height=1232,format=NV12,framerate=15/1” ! nvvidconv flip-method=0 ! video/x-raw,format=BGRx ! videoconvert ! video/x-raw,format=BGR ! fpsdisplaysink text-overlay=0 video-sink=fakesink sync=0”
It’s running. I will give you feedback when it fails or there are strange phenomena
i found this article and it works on jetpack 5.1 don’t know if i can use it on jetpack 4.6. I see an error almost similar to mine, the camera runs for a while then it stops. I didn’t think it was a hardware error, so I researched and found the same error as mine
Hi,
The topic thread should be different from this one since the code base of Jetpack 4 and 5 is different. This one is more like the sensor is not stable and may halt in long run. Would still need to know the result of gst-launch-1.0 command for checking further.
I’m not sure, but I’ve run it with gstream and the situation is still fine and up to now I haven’t seen any stops. As I mentioned, my side builds the app 24/7 and closes docker, which means reading the camera with opencv Whether it has an impact or not is unclear?
klog_184_loi.txt (70.2 KB)
This is the logs file when the camera reader program fails " klog_184_loi.txt" klog_184_run.txt (74.7 KB)
This is the logs file after running “sudo systemctl restart nvargus-daemon” after that the camera reader app runs normally again “klog_184_run.txt”