Crashes when using gstreamer and camera

I’m using latest jetpack 4.5.1 on Nano A02

once launching gstreamer with camera, it crashes and reboot. camera is IMX219 leopard logs

oracle@oracle-desktop:~$ gst-launch-1.0 -e nvarguscamerasrc ! ‘video/x-raw(memory:NVMM), width=(int)1280, height=(int)720, format=(string)NV12, framerate=(fraction)30/1’ ! nvv4l2h264enc bitrate=5000000 iframeinterval=40 preset-level=1 control-rate=1 ! h264parse ! rtph264pay config-interval=1 ! udpsink host=192.168.1.28 port=5602 sync=false async=false
Setting pipeline to PAUSED …
Opening in BLOCKING MODE
Opening in BLOCKING MODE
Pipeline is live and does not need PREROLL …
Setting pipeline to PLAYING …
New clock: GstSystemClock
Redistribute latency…
NvMMLiteOpen : Block : BlockType = 4
===== NVMEDIA: NVENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected…
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;
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
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
nvbuf_utils: Can not get HW buffer from FD… Exiting…
ERROR: from element /GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0: CANCELLED
Additional debug info:
Argus Error Status
EOS on shutdown enabled – waiting for EOS after Error
Waiting for EOS…

journalctl -f capture

Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: === NVIDIA Libargus Camera Service (0.97.3)=== Listening for connections…=== gst-launch-1.0[6064]: Connection established (7F9BC361D0)OFParserListModules: module list: /proc/device-tree/tegra-camera-platform/modules/module0
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: OFParserGetVirtualDevice: NVIDIA Camera virtual enumerator not found in proc device-tree
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: ---- imager: No override file found. ----
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: LSC: LSC surface is not based on full res!
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: === gst-launch-1.0[6064]: CameraProvider initialized (0x7f94b8b3c0)LSC: LSC surface is not based on full res!
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 15 18:07:59 oracle-desktop nvargus-daemon[5122]: NvIspAfConfigParamsSanityCheck: Error: positionWorkingHigh is not larger than positionWorkingLow positionWorkingHigh = 0, positionWorkingLow = 0
Mar 15 18:08:01 oracle-desktop nvargus-daemon[5122]: SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/NvIspHw.cpp, function waitIspStatsFinished(), line 566)
Mar 15 18:08:01 oracle-desktop nvargus-daemon[5122]: SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 478)
Mar 15 18:08:01 oracle-desktop nvargus-daemon[5122]: SCF: Error Timeout: (propagating from src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(), line 524)
Mar 15 18:08:01 oracle-desktop nvargus-daemon[5122]: SCF: Error Timeout: (propagating from src/common/Utils.cpp, function workerThread(), line 116)
Mar 15 18:08:01 oracle-desktop nvargus-daemon[5122]: SCF: Error Timeout: Worker thread IspHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 133)
Mar 15 18:08:01 oracle-desktop kernel: fence timeout on [ffffffc0d12ec840] after 1500ms
Mar 15 18:08:01 oracle-desktop kernel: name=[nvhost_sync:14], current value=0 waiting value=1
Mar 15 18:08:01 oracle-desktop kernel: fence timeout on [ffffffc0d12ec6c0] after 1500ms
Mar 15 18:08:01 oracle-desktop kernel: name=[nvhost_sync:15], current value=0 waiting value=1
Mar 15 18:08:01 oracle-desktop kernel: ---- mlocks ----

Hi,
Is your camera Raspberry camera v2?

I’m also having this issue with both the built-in camera driver + dtb, and custom camera drivers.

R32 JP4.4 Nano B01
I’ve had instabilities for the past week or two, but today it completely stopped working.
Running gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink with an IMX219 camera freezes the OS and causes a reboot.

Mar 16 16:06:04 jetson nvargus-daemon[5277]: SCF: Error Timeout: ISP Sta                   ts timed out! (in src/services/capture/NvIspHw.cpp, function waitIspStatsFinishe                   d(), line 561)
Mar 16 16:06:04 jetson nvargus-daemon[5277]: SCF: Error Timeout: Sending                    critical error event (in src/api/Session.cpp, function sendErrorEvent(), line 9                   90)
Mar 16 16:06:04 jetson nvargus-daemon[5277]: SCF: Error Timeout: ISP por                   t 0 timed out! (in src/services/capture/NvIspHw.cpp, function waitIspFrameEnd(),                    line 478)

Here’s some slightly different logs. The camera ran for a few seconds, then crashed.
Mar 16 16:35:19 jetson bamfdaemon[6751]: bamf_matcher_set_starting_desktop_file: assertion ‘desktop_file != NULL’ failed
Mar 16 16:35:19 jetson bamfdaemon[6751]: bamf_matcher_set_starting_desktop_file: assertion ‘desktop_file != NULL’ failed
Mar 16 16:35:42 jetson sshd[8116]: Accepted password for [user] from [ip] port [port] ssh2
Mar 16 16:35:42 jetson sshd[8116]: pam_unix(sshd:session): session opened for user [user] by (uid=0)
Mar 16 16:35:42 jetson systemd-logind[3977]: New session 4 of user [user].
Mar 16 16:35:42 jetson systemd[1]: Started Session 4 of user [user].
Mar 16 16:36:06 jetson rtkit-daemon[5919]: The canary thread is apparently starving. Taking action.
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Demoting known real-time threads.
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Successfully demoted thread 7009 of process 6806 (n/a).
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Successfully demoted thread 7003 of process 6806 (n/a).
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Successfully demoted thread 6854 of process 6806 (n/a).
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Successfully demoted thread 6806 of process 6806 (n/a).
Mar 16 16:36:06 jetson rtkit-daemon[5919]: Demoted 4 threads.
Mar 16 16:36:13 jetson nvargus-daemon[5265]: SCF: Error Timeout: (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Mar 16 16:36:13 jetson nvargus-daemon[5265]: Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc

Leopard LI-IMX219-MIPI-FF-NANO

Hi EbrahimAli,
Could you try below command to see if it works?

gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! ‘video/x-raw(memory:NVMM), width=(int)3264, height=(int)2464, framerate=21/1’ ! nvvidconv flip-method=0 ! ‘video/x-raw, format=(string)I420’ ! xvimagesink -e

If it still doesn’t work, please take a picture about the whole camera kit. We would like to check how the camera is connected.

Not sure what happens but it starts working now, even for the first pipeline. it is not happening everytime

Hi EbrahimAli,
Please re-connect the camera module to see if it can fix the stability issue.