Nvargus-daemon fails when using multiple sensors on Jetson Nano

As also described in the topic OpenCV ops blocking for multi-camera capture with Gstreamer - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums. I am having trouble when trying to use multiple IMX219 sensors in my Jetson Nano.

I am using the suggested pipeline to test both sensors:

$ gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=120/1' ! nvvidconv flip-method=2 ! video/x-raw, width=1280, height=720, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! fpsdisplaysink text-overlay=0 video-sink=fakesink nvarguscamerasrc sensor-id=1 ! 'video/x-raw(memory:NVMM), width=1280, height=720, format=NV12, framerate=120/1' ! nvvidconv flip-method=2 ! video/x-raw, width=1280, height=720, format=BGRx ! videoconvert ! video/x-raw, format=BGR ! fpsdisplaysink text-overlay=0 video-sink=fakesink

However it only runs fine for a couple of seconds before one of the sensors stop working:


/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1738, dropped: 0, current: 98,54, average: 101,17
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1789, dropped: 0, current: 101,26, average: 101,34
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1788, dropped: 0, current: 99,08, average: 101,11
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1838, dropped: 0, current: 96,47, average: 101,20
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1839, dropped: 0, current: 100,17, average: 101,09
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1889, dropped: 0, current: 101,55, average: 101,21
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1889, dropped: 0, current: 97,47, average: 100,99
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1948, dropped: 0, current: 117,94, average: 101,43
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 2010, dropped: 0, current: 123,88, average: 102,00
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 2069, dropped: 0, current: 116,42, average: 102,36
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 2126, dropped: 0, current: 112,76, average: 102,61
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 2180, dropped: 0, current: 105,97, average: 102,69
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 2238, dropped: 0, current: 114,31, average: 102,97

And in the logs I can see many errors. The daemon never recovers and fills the system with logs:

2021-03-26T09:47:01.416248-03:00 art-jetson nvargus-daemon[5245]: SCF: Error InvalidState: Session has suffered a critical failure (in src/api/Session.cpp, function capture(), line 667)
2021-03-26T09:47:01.416284-03:00 art-jetson nvargus-daemon[5245]: (Argus) Error InvalidState:  (propagating from src/api/ScfCaptureThread.cpp, function run(), line 109)
2021-03-26T09:47:01.416319-03:00 art-jetson nvargus-daemon[5245]: SCF: Error InvalidState: Session has suffered a critical failure (in src/api/Session.cpp, function capture(), line 667)
2021-03-26T09:47:01.416355-03:00 art-jetson nvargus-daemon[5245]: (Argus) Error InvalidState:  (propagating from src/api/ScfCaptureThread.cpp, function run(), line 109)
2021-03-26T09:47:01.416389-03:00 art-jetson nvargus-daemon[5245]: SCF: Error InvalidState: Session has suffered a critical failure (in src/api/Session.cpp, function capture(), line 667)

I tried running the same pipeline with 1920x1080@60fps and it also hang after a few seconds, then I tried with 1280x720@60fps, which ran for about 2 hours before hanging.

I am running # R32 (release), REVISION: 4.4, GCID: 23942405, BOARD: t210ref, EABI: aarch64, DATE: Fri Oct 16 19:44:43 UTC 2020

Quick update, I’ve put a new SD card with JetPack release 4.5.1 and now I get some different errors:

Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: === NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== gst-launch-1.0[9779]: Connection established (7F852B21D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
Mar 29 15:40:38 art-desktop kernel: [ 3050.376682] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x10
Mar 29 15:40:38 art-desktop kernel: [ 3050.383370] regmap_util_write_table_8:regmap_util_write_table:-121
Mar 29 15:40:38 art-desktop kernel: [ 3050.389397] imx219 8-0010: Error writing mode
Mar 29 15:40:38 art-desktop kernel: [ 3050.393788] vi 54080000.vi: calibration failed with -121 error
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: ---- imager: No override file found. ----
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: LSC: LSC surface is not based on full res!
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: ---- imager: No override file found. ----
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: LSC: LSC surface is not based on full res!
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: === gst-launch-1.0[9779]: CameraProvider initialized (0x7f80b72060)LSC: LSC surface is not based on full res!
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 29 15:40:38 art-desktop nvargus-daemon[8202]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 29 15:40:39 art-desktop nvargus-daemon[8202]: LSC: LSC surface is not based on full res!
Mar 29 15:40:39 art-desktop nvargus-daemon[8202]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 29 15:40:43 art-desktop nvargus-daemon[8202]: message repeated 3 times: [ NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0]
Mar 29 15:40:44 art-desktop nvargus-daemon[8202]: SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 478)
Mar 29 15:40:44 art-desktop nvargus-daemon[8202]: SCF: Error Timeout:  (propagating from src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 524)
Mar 29 15:40:44 art-desktop nvargus-daemon[8202]: SCF: Error Timeout:  (propagating from src/common/Utils.cpp, function workerThread(), line 116)
Mar 29 15:40:44 art-desktop nvargus-daemon[8202]: SCF: Error Timeout: Worker thread IspHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716226] fence timeout on [ffffffc0d0a8f600] after 1500ms
Mar 29 15:40:44 art-desktop kernel: [ 3056.716229] fence timeout on [ffffffc02022d0c0] after 1500ms
Mar 29 15:40:44 art-desktop kernel: [ 3056.716234] name=[nvhost_sync:41], current value=703 waiting value=704
Mar 29 15:40:44 art-desktop kernel: [ 3056.716236] name=[nvhost_sync:21], current value=703 waiting value=704
Mar 29 15:40:44 art-desktop kernel: [ 3056.716240] ---- mlocks ----
Mar 29 15:40:44 art-desktop kernel: [ 3056.716241] ---- mlocks ----
Mar 29 15:40:44 art-desktop kernel: [ 3056.716250]
Mar 29 15:40:44 art-desktop kernel: [ 3056.716250]
Mar 29 15:40:44 art-desktop kernel: [ 3056.716252] ---- syncpts ----
Mar 29 15:40:44 art-desktop kernel: [ 3056.716253] ---- syncpts ----
Mar 29 15:40:44 art-desktop kernel: [ 3056.716259] id 1 (disp0_a) min 3644 max 3644 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716262] id 2 (disp0_b) min 4 max 4 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716266] id 3 (disp0_c) min 4 max 4 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716272] id 8 (gm20b_507) min 578 max 578 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716276] id 9 (gm20b_506) min 22 max 22 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716281] id 11 (gm20b_505) min 884 max 884 refs 1 (previous client : gm20b_505)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716285] id 12 (gm20b_504) min 6 max 6 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716288] id 13 (gm20b_503) min 113786 max 113786 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716292] id 14 (gm20b_502) min 70 max 70 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716295] id 15 (gm20b_501) min 31108 max 31108 refs 1 (previous client : gm20b_501)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716299] id 16 (gm20b_500) min 6 max 6 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716303] id 17 (gm20b_499) min 2404 max 2404 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716306] id 18 (54340000.vic_0) min 4419 max 4419 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716310] id 19 (54340000.vic_0) min 2118 max 2118 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716314] id 20 (54340000.vic_0) min 2277 max 2277 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716318] id 21 (54600000.isp_0) min 703 max 706 refs 4 (previous client : 54600000.isp_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716322] id 22 (54600000.isp_1) min 703 max 706 refs 4 (previous client : 54600000.isp_1)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716325] id 23 (54600000.isp_2) min 2409 max 2417 refs 10 (previous client : 54600000.isp_2)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716329] id 24 (54600000.isp_3) min 703 max 706 refs 4 (previous client : 54600000.isp_3)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716333] id 25 (54680000.isp_0) min 883 max 885 refs 3 (previous client : 54680000.isp_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716337] id 26 (vblank0) min -6 max -6 refs 1 (previous client : )
Mar 29 15:40:44 art-desktop kernel: [ 3056.716341] id 28 (54680000.isp_1) min 883 max 885 refs 3 (previous client : 54680000.isp_1)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716345] id 29 (54680000.isp_2) min 3325 max 3330 refs 7 (previous client : 54680000.isp_2)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716348] id 30 (54680000.isp_3) min 883 max 885 refs 3 (previous client : 54680000.isp_3)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716352] id 31 (gm20b_498) min 1408 max 1408 refs 1 (previous client : gm20b_498)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716357] id 32 (gm20b_497) min 28 max 28 refs 1 (previous client : gm20b_497)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716360] id 33 (gm20b_496) min 4 max 4 refs 1 (previous client : gm20b_496)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716364] id 34 (gm20b_495) min 4 max 4 refs 1 (previous client : gm20b_495)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716368] id 35 (gm20b_494) min 12 max 12 refs 1 (previous client : gm20b_494)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716371] id 36 (54080000.vi_0) min 703 max 706 refs 4 (previous client : 54080000.vi_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716376] id 38 (54080000.vi_2) min 1409 max 1414 refs 7 (previous client : 54080000.vi_2)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716381] id 41 (54080000.vi_4) min 703 max 706 refs 4 (previous client : 54080000.vi_4)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716385] id 42 (54340000.vic_0) min 2098 max 2098 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716389] id 43 (gm20b_493) min 6 max 6 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716393] id 45 (gm20b_492) min 804 max 804 refs 1 (previous client : 54080000.vi_1)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716396] id 46 (54080000.vi_0) min 1593 max 1593 refs 1 (previous client : 54080000.vi_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716400] id 47 (54080000.vi_1) min 87 max 89 refs 3 (previous client : 54080000.vi_1)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716404] id 48 (54080000.vi_2) min 176 max 179 refs 5 (previous client : 54080000.vi_2)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716407] id 49 (54080000.vi_5) min 796 max 796 refs 1 (previous client : 54080000.vi_5)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716411] id 50 (54080000.vi_3) min 2371 max 2371 refs 1 (previous client : 54080000.vi_3)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716415] id 51 (54080000.vi_4) min 93 max 95 refs 3 (previous client : 54080000.vi_4)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716418] id 52 (54340000.vic_0) min 258 max 261 refs 2 (previous client : gm20b_492)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716422] id 53 (54340000.vic_0) min 8 max 8 refs 1 (previous client : gm20b_491)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716425] id 54 (gm20b_491) min 6 max 6 refs 1 (previous client : 54340000.vic_0)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716429] id 55 (gm20b_490) min 12 max 12 refs 1 (previous client : gm20b_490)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716433] id 56 (gm20b_489) min 12 max 12 refs 1 (previous client : gm20b_489)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716436] id 57 (gm20b_488) min 12 max 12 refs 1 (previous client : gm20b_488)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716440] id 58 (gm20b_487) min 12 max 12 refs 1 (previous client : gm20b_487)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716443] id 59 (gm20b_486) min 12 max 12 refs 1 (previous client : gm20b_486)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716447] id 60 (gm20b_485) min 12 max 12 refs 1 (previous client : gm20b_485)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716450] id 61 (gm20b_484) min 12 max 12 refs 1 (previous client : gm20b_484)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716454] id 62 (gm20b_483) min 12 max 12 refs 1 (previous client : gm20b_483)
Mar 29 15:40:44 art-desktop kernel: [ 3056.716457] id 63 (gm20b_482) min 12 max 12 refs 1 (previous client : gm20b_482)

Could you try the lib from below link.

I’ve copied the file to /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstnvarguscamerasrc.so, but I still have the same problem.


/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1328, dropped: 0, current: 60,39, average: 60,05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1327, dropped: 0, current: 60,08, average: 60,15
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1359, dropped: 0, current: 60,12, average: 60,05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1358, dropped: 0, current: 60,04, average: 60,15
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink1: last-message = rendered: 1390, dropped: 0, current: 59,99, average: 60,05
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1389, dropped: 0, current: 60,08, average: 60,14
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1420, dropped: 0, current: 60,17, average: 60,14
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1451, dropped: 0, current: 60,05, average: 60,14
/GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0: last-message = rendered: 1482, dropped: 0, current: 60,10, average: 60,14
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: DISCONNECTED
Additional debug info:
Argus Error Status
Execution ended after 0:00:30.810950578
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
(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)
(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 87)
(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 87)
Caught SIGSEGV
#0  0x0000007f77deed5c in __waitpid (pid=<optimized out>, stat_loc=0x7fc0ce4904, options=<optimized out>) at ../sysdeps/unix/sysv/linux/waitpid.c:30
#1  0x0000007f77e2a2a0 in g_on_error_stack_trace ()
#2  0x0000005591580c3c in  ()
#3  0x0000007fc0ce5cc8 in  ()

I’ve also noticed that despite using a pipeline for 120 fps, but it is actually working at 60fps, but that might be a performance limitation.

GST_ARGUS: Running with following settings:
   Camera index = 1
   Camera mode  = 5
   Output Stream W = 1280 H = 720
   seconds to Run    = 0
   Frame Rate = 120,000005
GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 5
   Output Stream W = 1280 H = 720
   seconds to Run    = 0
   Frame Rate = 120,000005

Another update, I tried to remove the usage of the nvargus-daemon to use only v4l2 to capture raw data, and it still hangs for one of the cameras. I am running:

v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=720,pixelformat=BG10 -csensor_mode=4 --stream-mmap --stream-skip=0

and

v4l2-ctl -d /dev/video1 --set-fmt-video=width=1280,height=720,pixelformat=BG10 -csensor_mode=4 --stream-mmap --stream-skip=0

And I get those errors on dmesg

[23376.982351] tegra-vii2c 546c0000.i2c: no acknowledge from address 0x10
[23376.990431] regmap_util_write_table_8:regmap_util_write_table:-121
[23377.047719] imx219 8-0010: Error turning off streaming
[23377.054248] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 18446744073709195366 has been capped to VI's max BW 1500000
[23378.527932] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 18446744073708839116 has been capped to VI's max BW 1500000
[23486.971317] misc tegra_camera_ctrl: tegra_camera_update_isobw: Warning, Requested ISO BW 18446744073709195366 has been capped to VI's max BW 1500000

So my guess is that maybe this is a CSI interface limitation, is there any additional debug traces that I could enable for the tegra drivers?

From the log looks like it could be the sensor board HW or cable problem due to there have i2c no ack message.

Hmmm, interesting, I tried testing one of the cameras and noticed that it would hang even when only one was connected. I swapped it for another with the same sensor.

Now it works, but when I try to use both in a python application, such as

from threading import Thread
import time
import logging
import cv2

logger = logging.getLogger()
logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter('%(asctime)s - %(levelname)s - %(message)s')
ch.setFormatter(formatter)
logger.addHandler(ch)

class VidCam:

    def __init__(self):
        self.caps = []
        self.running = True
        self.cap_thread = None

    def gstreamer_pipeline(self, _id):
        return (
            "nvarguscamerasrc sensor-id=%d ! "
            "video/x-raw(memory:NVMM), "
            "width=(int)%d, height=(int)%d, "
            "format=(string)NV12, framerate=(fraction)%d/1 ! "
            "nvvidconv flip-method=%d ! "
            "video/x-raw, width=(int)%d, height=(int)%d, format=(string)BGRx ! "
            "videoconvert ! "
            "video/x-raw, format=(string)BGR ! appsink" #drop=True max-buffers=5
            % (
                _id,
                1280,
                720,
                120,
                2,
                1280,
                720,
            )
        )

    def cap_frame(self):
        self.running = True
        start_time = time.time()
        count = 0
        for cam_idx in range(2):
            self.caps.append(cv2.VideoCapture(self.gstreamer_pipeline(cam_idx),
                    cv2.CAP_GSTREAMER))
        while self.running:
            for cam_idx in range(2):
                if self.caps[cam_idx].isOpened():
                    ret,img = self.caps[cam_idx].read()
                    if not ret:
                        print("No return for camera %d" % (cam_idx))
                        self.running = False
                        break
                else:
                    print("Camera %d not opened" % (cam_idx))
            count += 1
            if (count % 1000) == 0:
                logger.debug("Pitstop")
            if time.time()-start_time > 600.0:
                logger.info("10 min mark, 1 min break")
                for cam_idx in range(2):
                    self.caps[cam_idx].release()
                time.sleep(60)
                for cam_idx in range(2):
                    self.caps[cam_idx].open(self.gstreamer_pipeline(cam_idx),
                    cv2.CAP_GSTREAMER)
                start_time = time.time()
        end_time = time.time()
        print("Captured %d frames in %.2f secs --> %.2f fps" % (count,
            end_time-start_time,count/(end_time-start_time)))


    def begin_capture(self):
        self.cap_thread = Thread(target=self.cap_frame,args=())
        self.cap_thread.start()

    def halt(self):
        self.running = False
        self.cap_thread.join()
        for cam_idx in range(2):
        	self.caps[cam_idx].release()

if __name__ == '__main__':
    cam = VidCam()
    print("Beginning capture...")
    cam.begin_capture()
    time.sleep(3600)
    print("Stopping capture")
    cam.halt()

It crashes when calling cap.release(), in a way that I need to restart the nvargus-daemon to be able to use the camera again. I does not report anything on dmesg, just crashes with

GST_ARGUS: Cleaning up
Segmentation fault (core dumped)

It does not crash every time, but crashes often.

I am using the .so provided in Errors starting 6 nvarguscamerasrc pipelines in R32.5.0 - #6 by cliff.hofman

On the syslog I got

Apr  6 17:31:33 art-jetson systemd[1]: Started Argus daemon.
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: === NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections...=== python3[19800]: Connection established (7FAF9761D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module1
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: ---- imager: No override file found. ----
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: LSC: LSC surface is not based on full res!
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: ---- imager: No override file found. ----
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: LSC: LSC surface is not based on full res!
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: === python3[19800]: CameraProvider initialized (0x7fa8b721c0)LSC: LSC surface is not based on full res!
Apr  6 17:31:55 art-jetson nvargus-daemon[19763]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Apr  6 17:31:58 art-jetson nvargus-daemon[19763]: message repeated 2 times: [ NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0]
Apr  6 17:31:58 art-jetson nvargus-daemon[19763]: LSC: LSC surface is not based on full res!
Apr  6 17:31:58 art-jetson nvargus-daemon[19763]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Apr  6 17:31:58 art-jetson nvargus-daemon[19763]: message repeated 2 times: [ NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0]
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: (Argus) Error FileOperationFailed: Failed socket read: Connection reset by peer (in src/rpc/socket/common/SocketUtils.cpp, function readSocket(), line 79)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: (Argus) Error FileOperationFailed:  (propagating from libs/rpc_socket_server/ServerSocketManager.cpp, function recvThreadCore(), line 185)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: (Argus) Error FileOperationFailed:  (propagating from libs/rpc_socket_server/ServerSocketManager.cpp, function run(), line 58)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: === python3[19800]: Connection closed (7FAF9761D0)=== python3[19800]: WARNING: CameraProvider was not destroyed before client connection terminated.=== python3[19800]:          The client may have abnormally terminated. Destroying CameraProvider...=== python3[19800]: CameraProvider destroyed (0x7fa8b721c0)=== python3[19800]: WARNING: Cleaning up 2 outstanding requests...=== python3[19800]: WARNING: Cleaning up 2 outstanding stream settings...SCF: Error InvalidState:  (propagating from src/services/gl/EGLStreamProducer.cpp, function returnFrame(), line 372)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: === python3[19800]: WARNING: Cleaning up 1 outstanding queues...SCF: Error InvalidState:  (propagating from src/services/gl/EGLStreamProducer.cpp, function getBuffer(), line 434)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: SCF: Error InvalidState:  (propagating from src/components/CaptureContainerImpl.cpp, function assignAllBuffersFromStream(), line 230)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: SCF: Error InvalidState:  (propagating from src/components/stages/CCDataSetupStage.cpp, function doHandleRequest(), line 68)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: SCF: Error InvalidState:  (propagating from src/components/stages/OrderedStage.cpp, function doExecute(), line 158)
Apr  6 17:32:01 art-jetson nvargus-daemon[19763]: SCF: Error InvalidState: Sending critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 992)


Apr  6 17:32:06 art-jetson nvargus-daemon[19763]: === python3[19800]: WARNING: Cleaning up 2 outstanding sessions...waitForIdleLocked remaining request 284
Apr  6 17:32:06 art-jetson nvargus-daemon[19763]: waitForIdleLocked remaining request 283
Apr  6 17:32:06 art-jetson nvargus-daemon[19763]: waitForIdleLocked remaining request 282
Apr  6 17:32:06 art-jetson nvargus-daemon[19763]: SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 922)
Apr  6 17:32:06 art-jetson nvargus-daemon[19763]: (Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 166)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: waitForIdleLocked remaining request 284
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: waitForIdleLocked remaining request 283
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: waitForIdleLocked remaining request 282
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: SCF: Error Timeout: waitForIdle() timed out (in src/api/Session.cpp, function waitForIdleLocked(), line 922)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: SCF: Error Timeout:  (propagating from src/api/Session.cpp, function abortCaptures(), line 888)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: SCF: Error Timeout:  (propagating from src/api/Session.cpp, function shutdown(), line 401)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: PowerServiceCore:handleRequests: timePassed = 5021
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: SCF: Error Timeout:  (propagating from src/api/Session.cpp, function shutdown(), line 501)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: SCF: Error Timeout:  (propagating from src/api/CameraDriver.cpp, function deleteSession(), line 627)
Apr  6 17:32:12 art-jetson nvargus-daemon[19763]: (Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function destroy(), line 191)

Could you check with v4l2-ctl command to confirm the sensor can capture continuously.

Yes, I did not have any issues with v4l2-ctl.

I ended up going back to version 4.4.1, in which both cameras worked, although I was not able to use the 120 fps mode, only at 60fps, as I am discussing on 120 fps mode support removed for imx219 sensor - Jetson & Embedded Systems / Jetson Nano - NVIDIA Developer Forums