I concur with Terry. I have seen the same issues with Gstreamer and nvargus-daemon not restarting properly. I have seen the problem on R32.4.3 and on the latest R32.5.0. So it is not isolated to older versions of L4T nvargus-daemon.
Here is what I have logged/captured on L4T R32.5.0 (JP 4.5)…
With only a single camera streaming, nvargus-daemon will either recover by cleaning up the connection when the stream is interrupted (i.e., CSI error), or it will Segmentation fault with a core dump and
systemd will automatically restart it. Usually, when nvargus-daemon cleans up the connection with a single camera streaming, Gstreamer will also properly shutdown automatically and can be restarted. When nvargus-daemon Segmentation faults GStreamer usually requires CTRL-C to kill it manually.
However, with multiple cameras streaming (i.e., >1), nvargus-daemon will lock-up and not cleanup properly. It won’t Segmentation fault either, so not even
systemd will restart it.
Here is the simple Gstreamer command with one camera that nvargus-daemon will recover properly with when a streaming error occurs:
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080,format=NV12' ! fakesink
Two example logs from nvargus-daemon where things recover properly:
Connection cleanup (internal restart): nvargus-daemon-connection-cleanup-1-camera.txt (9.1 KB)
Segmentation fault (systemd restart): nvargus-daemon-segmentation-fault-1-camera.txt (6.2 KB)
Note: the segmentation fault is by far the most common case and should be looked into, too.
Here is the simple Gstreamer command with two cameras streaming that nvargus-daemon will never recover properly with when a streaming error occurs:
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080,format=NV12' ! fakesink nvarguscamerasrc sensor-id=1 sensor-mode=0 ! 'video/x-raw(memory:NVMM),width=1920,height=1080,format=NV12' ! fakesink
Example logs from nvargus-daemon where things fail to recover properly:
nvargus-daemon-deadlock-example-1.txt (9.5 KB)
nvargus-daemon-deadlock-example-2.txt (8.9 KB)
Note this deadlock of nvargus-daemon is easy to reproduce with any type of CSI or stream error, while using 2-6 cameras simultaneously from Gstreamer.