[RCE] ERROR: camera-ip/vi5/vi5.c:745 [vi5_handle_eof] "General error queue is out of sync with frame queue

Hello.

Thanks to this community, I successed to enable our customized sensor.
However, I have an issue during streaming.

About after 10 minutes, stream image stturted and dmesg shows this error

[ 1303.814505] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1303.827691] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1303.852885] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: flags 2, err_data 0
[ 1303.880706] [RCE] ERROR: camera-ip/vi5/vi5.c:745 [vi5_handle_eof] "General error queue is out of sync with frame queue. ts=1326678480416 sof_ts=1326692923488 gerror_code=2 gerror_data=a0 notify_bits=0"
[ 1306.588630] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1306.588925] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1306.589909] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1306.590128] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 1306.590424] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1306.590633] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 1306.591054] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

I can’t find camera-ip/vi5/vi5.c:745 in the kernel source code. It looks it is not opened to public.

How to fix this issue?
Thanks

Increase the “define CAPTURE_TIMEOUT_MS 2500” in vi5_fops.c to try.
And boost the clocks to try.

sudo nvpmodel -m 0
sudo jetson_clocks
sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate

Thank you for your reply.

I’m sorry to say that the error still occurs if I applied your recommended modification and commands.

I tried define CAPTURE_TIMEOUT_MS 5000.
Here is the dmesg log.

[ 1301.571927] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1301.588008] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1301.613214] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: flags 2, err_data 0
[ 1301.625211] [RCE] ERROR: camera-ip/vi5/vi5.c:745 [vi5_handle_eof] "General error queue is out of sync with frame queue. ts=1324677118752 sof_ts=1324694429824 gerror_code=2 gerror_data=a0 notify_bits=0"
[ 1305.241289] start_addr=(0x20000), end_addr=(0x40000), buffer_size=(0x20000), smp_number_max=(16384)
[ 1306.845184] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 5000 ms
[ 1306.845457] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1306.846237] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1306.846441] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 1306.846727] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1306.846935] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 1306.847378] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 1307.155315] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1307.162269] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072
[ 1307.188208] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: flags 2, err_data 0
[ 1307.245186] [RCE] ERROR: camera-ip/vi5/vi5.c:745 [vi5_handle_eof] "General error queue is out of sync with frame queue. ts=1330260495488 sof_ts=1330268710816 gerror_code=2 gerror_data=a0 notify_bits=0"
[ 1312.221183] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 5000 ms
[ 1312.221468] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel

What’s if set lower frame rate?

In case of 40 fps, the error occured.
In case of 30 fps, the error doesn’t occur.

If I set lower fps, the error does not appear.
Is there fps limit in Orin?

What’s the sensor output size? Suppose boost the clocks should help on it.

Its resolution is 3840x2160.

For now, the error message disappeared. Thank you for your support.