VI stops capturing on multistream configuration

Hi,

I am running 2 sensors over v4l2 pipe and have a problem with VI.

Commands used:

v4l2-ctl --set-fmt-video=width=3864,height=2180 --stream-mmap --stream-count=200 -d /dev/video0
v4l2-ctl --set-fmt-video=width=3864,height=2180 --stream-mmap --stream-count=200 -d /dev/video1

When the first pipe captures 200 frames it stops the stream. In the process, VI doesn’t capture frames from the second (still active) sensor which causes VI to go into the error recovery routine.

dmesg dump with additional info. number in squered brackets is chan->id.

[  707.113123] vi5_capture_dequeue ++ [0]
[  707.113513] vi5_capture_dequeue ++ [2]
[  707.129623] vi5_capture_dequeue ++ [0]
[  707.130036] vi5_capture_dequeue ++ [2]
[  707.146108] vi5_capture_dequeue ++ [0]
[  707.146484] vi5_capture_dequeue ++ [2]
[  707.162666] vi5_capture_dequeue ++ [0]
[  707.163032] vi5_capture_dequeue ++ [2]
[  707.179181] vi5_capture_dequeue ++ [0]
[  707.179353] vi5_channel_stop_streaming ++ [0]
[  707.179520] vi5_capture_dequeue ++ [2]
[  707.195850] imx334 30-001a: imx334_stop_streaming++
[  707.195929] vi5_capture_dequeue ++ [2]
[  707.212428] vi5_capture_dequeue ++ [2]
[  707.213397] imx334 30-001a: imx334_stop_streaming++
[  707.228022] vi5_power_off ++ [0]
[  707.228085] imx334 30-001a: imx334_power_off: power off
[  707.228575] imx334 30-001a: imx334_power_off: Skipping power-off, 1 sensors still active 
[  712.371402] tegra194-vi5 15c10000.vi: no reply from camera processor
[  712.371593] vi5_capture_dequeue ++ [2]
[  712.371601] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 5000 ms
[  712.371745] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[  712.371880] vi5_channel_error_recover ++ [2]
[  712.376932] vi5_channel_error_recover ++ [2]
[  712.376944] vi5_capture_dequeue ++ [2]
[  712.376949] vi5_channel_error_recover ++ [2]
[  712.376955] vi5_capture_dequeue ++ [2]
[  712.376961] vi5_channel_error_recover ++ [2]
[  712.376966] vi5_capture_dequeue ++ [2]
[  712.377084] tegra_channel_capture_setup ++ [2]
[  712.377325] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[  712.377539] vi5_capture_dequeue ++ [2]
[  712.410871] vi5_capture_dequeue ++ [2]
[  712.427428] vi5_capture_dequeue ++ [2]
[  712.443862] vi5_capture_dequeue ++ [2]
[  712.460391] vi5_capture_dequeue ++ [2]
[  712.476960] vi5_capture_dequeue ++ [2]
[  712.493411] vi5_capture_dequeue ++ [2]
[  712.509949] vi5_capture_dequeue ++ [2]
[  712.526455] vi5_capture_dequeue ++ [2]
[  712.542927] vi5_capture_dequeue ++ [2]

I’ve tried commenting stop stream register settings in the driver to be sure that stream continues for both sensors.

I’ve noticed when starting with sensor registered on vi chan 2, sometimes we didn’t get the error. Problems persist on several v4l2 app as well. Error didn’t occur with argus_camera app.

Also, the problem doesn’t occur on TX2.

Do you have experience with this problem? what could I do?

L4T: 32.2.1

hello d.kristofic,

confirmed we could reproduce the same failure on the reference platform.
we would check this internally, will update here after we have some conclusions,
thanks

hello d.kristofic,

could you please have a try to apply this kernel patch, devtalk1066392_Nov12_patch.tar.gz
it’ll correct the streaming sequence in the capture pipeline for the VI channel.

please based-on l4t-r32.2 to apply the patch, update the kernel image for verification,
thanks
devtalk1066392_Nov12_patch.tar.gz (1.78 KB)

I’ve applied the patch on both l4t-r32.2 and l4t-r32.2.1. It seems to be working.

Thank you for the patch and quick response.

hello d.kristofic,

FYI,
this kernel patch had already check-in to the l4t release code-line,
please expect next public release (i.e. l4t-r32.3) will include this fix.
thanks

@JerryChang Does this patch can also apply for TX2 with JetPack3.1 version?

hello 53216142,

No, you can’t, since JetPack3.1 was using l4t-r28.1

please upgrade your software release.
the kernel patch in comment #3 was based-on JetPack-4.2.1 / l4t-r32.2
thanks

Hello guys,

I have applied this patch on my Jetson Xavier with L4T 32.2.0 (and JP 4.2.1).
I have also made this firmware change: https://devtalk.nvidia.com/default/topic/1048804/jetson-agx-xavier/realsense-camera-unstable/post/5364499/#5364499

It’s true that I have noticed improvements and fewer issues on my system. However, I am still not able to make work my triple camera system. I have this two troubles:

  1. I can connect two realsense D435 cameras without any problem (unless I have to wait a reasonable delay between them), but when I try to connect a third D435, it show me the message: “Device or resource busy”..
    I use a Rogue Carrier Board as a interface between Jetson and devices, http://connecttech.com/product/rogue-carrier-nvidia-jetson-agx-xavier/.

  2. The other issue, is that even the system is able to work with two cameras, it’s a little bit unstable: one camera crashed at more or les 2 hours of working, and the other one 12 h after gived a message of overflow.
    Note: I use librealsense v2.28.1 with ROS-realsense 2.2.8.

I would be very grateful if someone could help me.

Hi mateu.calafat,

Please open a new topic for your issue. Thanks