Hi all,
We are facing a very strange issue, what Im cannot really figure out, so this is the time ask for the wisdom of the collective mind :D !
We have are using two camera inputs on our Jetson Nanos adding some overlay on the screen and sending it through UDP to the consumers. Example pipeline for the first instance:
gst-launch-1.0 -e\
nvarguscamerasrc sensor-id="0" sensor-mode=0 gainrange="1 16" ispdigitalgainrange="1 1" name="camera_pipeline_overrides_0"\
! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1"\
! nvvidconv ! nvivafilter cuda-process=true customer-lib-name="libdcd_overlay_1080p.so" ! 'video/x-raw(memory:NVMM), format=(string)NV12'\
! nvvidconv ! nvv4l2vp8enc bitrate="8000000" control-rate=1 ! rtpvp8pay mtu=1400\
! udpsink auto-multicast=true clients="127.0.0.1:56000,127.0.0.1:56001"
If I start this pipeline in terminal I can stop and restart it for the end of the time without any issues (for stopping I simply hit CTRL-C).
But we wrote a simple service around it:
dcd_camerasource.service (441 Bytes)
Which starts shell script, what would fill out the params for the pipeline and start it:
dcd_camerasource (1.8 KB)
And when we restart the service we see these errors in the nvargus-daemon log:
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: === gst-launch-1.0[6785]: Connection closed (7F77AB11D0)=== gst-launch-1.0[6785]: WARNING: CameraProvider was not destroyed before client connection terminated.=== gst-launch-1.0[6785]: The client may have abnormally terminated. Destroying CameraProvider...=== gst-launch-1.0[6785]: CameraProvider destroyed (0x7f70b5c4c0)=== gst-launch-1.0[6785]: WARNING: Cleaning up 1 outstanding requests...=== gst-launch-1.0[6785]: WARNING: Cleaning up 1 outstanding streams...SCF: Error InvalidState: 5 buffers still pending during EGLStreamProducer destruction (propagating from src/services/gl/EGLStreamProducer.cpp, function freeBuffers(), line 306)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error InvalidState: (propagating from src/services/gl/EGLStreamProducer.cpp, function ~EGLStreamProducer(), line 50)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: === gst-launch-1.0[6785]: WARNING: Cleaning up 1 outstanding stream settings...=== gst-launch-1.0[6785]: WARNING: Cleaning up 1 outstanding sessions...(NvCameraUtils) Error InvalidState: Mutex not initialized (/dvs/git/dirty/git-master_linux/camera/core_scf/src/services/gl/EGLStreamProducer.cpp:498) (in Mutex.cpp, function lock(), line 79)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error BadParameter: Buffer is not pending (in src/services/gl/EGLStreamProducer.cpp, function presentBufferInternal(), line 502)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: (NvCameraUtils) Error InvalidState: Mutex has not been initialized (in Mutex.cpp, function unlock(), line 88)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error BadParameter: (propagating from src/services/gl/EGLStreamProducer.cpp, function presentBuffer(), line 487)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error BadParameter: (propagating from src/components/CaptureContainerImpl.cpp, function returnBuffer(), line 447)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error BadParameter: (propagating from src/components/stages/BufferReturnStage.h, function doExecute(), line 43)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: SCF: Error BadParameter: Sending critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 990)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: (NvCameraUtils) Error InvalidState: Mutex not initialized (/dvs/git/dirty/git-master_linux/camera/core_scf/src/services/gl/EGLStreamProducer.cpp:498) (in Mutex.cpp, function lock(), line 79)
Jan 28 16:07:30 dcd-398f9dee nvargus-daemon[4998]: (NvCameraUtils) Error InvalidState: Mutex has not been initialized (in Mutex.cpp, function unlock(), line 88)
And this will end up in a nvargus-daemon restart. I will attach a the whole log:
nvargus-daemon.log (10.4 KB)
If in the meantime the service gets restarted the we some more error in the nvargu-daemon log:
Jan 28 16:12:59 dcd-398f9dee nvargus-daemon[28296]: SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 478)
Jan 28 16:12:59 dcd-398f9dee nvargus-daemon[28296]: SCF: Error Timeout: (propagating from src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 519)
Jan 28 16:12:59 dcd-398f9dee nvargus-daemon[28296]: SCF: Error Timeout: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
Jan 28 16:12:59 dcd-398f9dee nvargus-daemon[28296]: SCF: Error Timeout: Worker thread IspHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/NvIspHw.cpp, function waitIspStatsFinished(), line 561)
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: Error: waitCsiFrameStart timeout guid 1
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: ************VI/CSI Debug Registers**********
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CFG_INTERRUPT_MASK_0 = 0x00000000
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CFG_INTERRUPT_STATUS_0 = 0x00000000
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CSI_0_ERROR_STATUS_0 = 0x00000001
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CSI_0_ERROR_INT_MASK_0 = 0x0000001f
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CSI_1_ERROR_STATUS_0 = 0x00000000
Jan 28 16:13:00 dcd-398f9dee nvargus-daemon[28296]: VI_CSI_1_ERROR_INT_MASK_0 = 0x00000000
whole log:
nvargus-daemon_with_crash.log (3.9 KB)
And in the kernel log:
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690604] fence timeout on [ffffffc08b1016c0] after 1500ms
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690613] name=[nvhost_sync:21], current value=24 waiting value=25
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690618] fence timeout on [ffffffc08b101780] after 1500ms
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690619] ---- mlocks ----
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690624] name=[nvhost_sync:22], current value=23206 waiting value=23207
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690628] ---- mlocks ----
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690628]
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690630] ---- syncpts ----
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690638]
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690640] ---- syncpts ----
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690641] id 7 (54340000.vic_0) min 680631 max 680631 refs 1 (previous client : )
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690644] id 8 (gm20b_507) min 300 max 300 refs 1 (previous client : )
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690648] id 9 (gm20b_506) min 18 max 18 refs 1 (previous client : )
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690653] id 11 (gm20b_505) min 34 max 34 refs 1 (previous client : gm20b_505)
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690657] id 12 (gm20b_495) min 48508 max 48508 refs 1 (previous client : gm20b_489)
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690660] id 13 (gm20b_504) min 45536 max 45536 refs 1 (previous client : gm20b_488)
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690664] id 14 (gm20b_479) min 10 max 10 refs 1 (previous client : gm20b_487)
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690668] id 15 (gm20b_502) min 10 max 10 refs 1 (previous client : gm20b_482)
Jan 28 16:12:59 dcd-398f9dee kernel: [ 884.690672] id 16 (gm20b_501) min 30 max 30 refs 1 (previous client : gm20b_480)
full log:
kern.log (10.0 KB)
and the Nano get rebooted.
But I guess this crash is just the result of the issue that the GStreamer pipeline is not stopped and cleaned up poprely.
Do you have any idea what am I doing wrong here? How could I stop the pipeline properly?
Thanks in advance!
Bests,
Peter