Gst-launch-1.0 capture image failed

# gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=1 ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)1728, height=(int)1728" ! nvvidconv ! jpegenc ! filesink location=test0.jpg^C
root@iking:/home/iking# gst-launch-1.0 nvarguscamerasrc sensor-id=1 num-buffers=4000 ! "video/x-raw(memory:NVMM), format=(string)NV12, width=(int)960, height=(int)960" ! nvvidconv ! jpegenc ! filesink location=test1.mp4
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 960 x 960 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 87.471001; Exposure Range min 16000, max 8333000;

GST_ARGUS: 800 x 800 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 87.471001; Exposure Range min 26000, max 33324000;

GST_ARGUS: 1728 x 1728 FR = 36.000000 fps Duration = 27777778 ; Analog Gain range min 1.000000, max 87.471001; Exposure Range min 26000, max 27779000;

GST_ARGUS: Running with following settings:
   Camera index = 1 
   Camera mode  = 0 
   Output Stream W = 960 H = 960 
   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
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:723 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:242 (propagating)
Got EOS from element "pipeline0".
Execution ended after 0:00:04.005884143

Sometimes this error occurs when obtaining images in gst-launch-1.0, especially after pressing Ctrl+C, and it is easy to reproduce when restarting again

Hi,
It looks like the camera is not stable and cannot generate frame data sometimes. You may enable the debug prints to get more information:

Jetson/l4t/Camera BringUp - eLinux.org

Ad the latest version is Jetpack 6.1. If you use previous version, please consider upgrade.

log
debug.txt (13.6 MB)

hello,

Now I am using the nvargus demo for testing and there is a problem with CSI1 not producing images. Can you help me analyze it。

JetPack 5.1.4

Linux 35.6.0

Linux Kernel 5.10

Ubuntu 20.04 root file system

相机型号:SC432AI

root@iking:/usr/src/jetson_multimedia_api/argus/build/samples/yuvJpeg# ./argus_yuvjpeg -d 1

Executing Argus Sample: argus_yuvjpeg

Argus Version: 0.99.3.3 (multi-process)

PRODUCER: Creating output stream

PRODUCER: Launching consumer thread

CONSUMER: Waiting until producer is connected…

before frame duration range: 33333334 - 83333336

after frame duration range: 11111111 - 11111111

PRODUCER: Starting repeat capture requests.

CONSUMER: Producer has connected; continuing.

nvargus_unnormal.log (39.6 MB)

extracted_proc.dts.txt (433.1 KB)

devices tree,
rbpcv3_sc432ai_a@36 and rbpcv3_sc432ai_b@36 all set:
lane_polarity = “6”;

Hi,
Looks like no error is shown in trace log. You may check if any error is reported in nvargus-daemon.

There must be something wrong at the bottom, right?

     kworker/7:2-133     [007] ....   357.153893: rtcpu_nvcsi_intr: tstamp:11699814385 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153893: rtcpu_nvcsi_intr: tstamp:11699815010 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153894: rtcpu_nvcsi_intr: tstamp:11699815010 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153894: rtcpu_nvcsi_intr: tstamp:11699815635 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699815635 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699816260 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699816260 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699816885 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699816885 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699817510 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153897: rtcpu_nvcsi_intr: tstamp:11699817510 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153897: rtcpu_nvcsi_intr: tstamp:11699818135 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000

n0.log (3.6 MB)
n1.log (59.3 KB)

There are two logs here, n0.log is the first run
./argus_yuvjpeg -d 1

n1.log is the second run ./argus_yuvjpeg -d 1

Hi,
It reports:

SCF: Error InvalidState: Timeout!! Skipping requests on sensor GUID 4, capture sequence ID = 281470681743360 draining session frameStart events 281470681743363
 (in src/services/capture/FusaCaptureViCsiHw.cpp, function waitCsiFrameStart(), line 531)

So the sensor does not generate correct frame data, triggering the error. Would suggest check the sensor driver. For further debugging please check developer guide:

Camera Software Development Solution — NVIDIA Jetson Linux Developer Guide 1 documentation

We looked at it from the oscilloscope and it seems that there is data on the CSI bus, but/ Argus_yuvjpeg-d 1 cannot be read. This tegra Driver and other tools are provided by Nvidia

The phenomenon is that the image obtained by CSI0 has red stripes. CSI1 cannot obtain images, Can you help confirm what’s wrong with the device tree or others!

rbpcv3_sc432ai_a@36 and rbpcv3_sc432ai_b@36 all set:
lane_polarity = “6”;

CSI0

CSI1 can not obtained image.

Hi,
It’s more like an issue that hardware signal is not stable. If device tree is wrong, it shall fail in each run.

As long as it doesn’t succeed, there won’t be any success in the future. If it’s unstable, there should still be a chance for success in the future.

[007] ....   357.153893: rtcpu_nvcsi_intr: tstamp:11699814385 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153893: rtcpu_nvcsi_intr: tstamp:11699815010 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153894: rtcpu_nvcsi_intr: tstamp:11699815010 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153894: rtcpu_nvcsi_intr: tstamp:11699815635 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699815635 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699816260 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153895: rtcpu_nvcsi_intr: tstamp:11699816260 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699816885 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699816885 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153896: rtcpu_nvcsi_intr: tstamp:11699817510 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000
     kworker/7:2-133     [007] ....   357.153897: rtcpu_nvcsi_intr: tstamp:11699817510 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:1 st:0 vc:0 status:0x00001000
     kworker/7:2-133     [007] ....   357.153897: rtcpu_nvcsi_intr: tstamp:11699818135 class:GLOBAL type:PHY_INTR0 phy:0 cil:1 st:0 vc:0 status:0x10000000

This seems to be an error caused by hardware. How can I clear this error and then restore it?

Hi,
Would suggest inspect the hardware signal and see if the signal quality is good and stable. Our CSI port is to receive signals from the camera source. From the log, it looks like the signal quality is not good occasionally.

It was normal for a period of time after the system started, but after this error occurred, it continued to be abnormal. I wonder if after clearing this error, it can still run normally