Failure to use gst-launch-1.0 nvarguscamerasrc to capture image

My app is running in the docker container on the jetson AGX,

after removing and recreating the app docker container over 1000 times. I couldn’t start my app docker container again, the error logs show “create the captureSession failed”, even if I run the multimedia media of 10_camera_recording on the host(not in the docker container), it also shows “create the captureSession failed”.

Then I tried the command below, but it also did not work.
desktop:~$ gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=1 ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)3840, height=(int)2160" ! nvvidconv ! pngenc ! filesink location=~/cv_cam_0.png

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
(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)
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, execute:751 Failed to create CaptureSession
Got EOS from element "pipeline0".
Execution ended after 0:01:00.020096449
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
(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 357)

but the V4l2 can work as expected

desktop:~$ v4l2-ctl -V --set-ctrl bypass_mode=0 --stream-mmap --stream-count=10000000 -d /dev/video0
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

One thing more:
I monitored argus_socket when the camera worked fine by:nc -l argus_socket

desktop:/tmp$ nc -l argus_socket
nc: getaddrinfo: Servname not supported for ai_socktype

but after removing and recreating the app docker container over 1000 times;

desktop:/tmp$ nc -l argus_socket
argus_socket: forward host lookup failed: Unknown host

The other interesting thing ,
when the camera worked fine, I ran sudo lsof | grep argus_socket.
here only show two /tmp/argus_socket type=STREAM
image

but after removing and recreating the app docker container over 1000 times;
here show a lots of /tmp/argus_socket type=STREAM


I tried to kill the process, but I could not kill the process.

Hi,
At the condition, please try to restart nvargus-daemon and see if it works:

$ sudo service nvargus-daemon restart

And do you use latest Jetpack 5.1.4?

I tried restart argus-daemon several times,but it didn’t work. Jetpack 4.6

I tried restart argus-daemon several times, but it didn’t work. Jetpack 4.6

hi,thanks for the reply, Is there any update or comments about this issue?

Hi,
Please remove the libs and see if it helps:

/usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so

If it does not help, would suggest upgrade to later release such as Jetpack 4.6.5 or 5.1.4. If you are not able to upgrade, may need to reboot the system while hitting the condition.

thanks for the reply, I will try it as per your suggestion.
could you tell me why we need to remove /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so?

I think it is more likely that the resources related to argus-socket have not been released. In addition, I know that reboot can solve this problem, but it is unacceptable to reboot every time this problem occurs in the product.

Hi,
It doesn’t impact using nvarguscamerasrc plugin, so you may remove it for a try.

Certain issues are fixed in later release, so we would suggest consider to upgrade to later version.


It doesn’t work( remove /usr/lib/aarch64-linux-gnu/tegra/libv4l2_nvargus.so)

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