AGX Xavier capture video steam error

Hi @JerryChang

v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=1 --stream-mmap --stream-count=1 --stream-to=test.raw --set-fmt-video=width=1920,height=1080,pixelformat=UYVY

“bypass_mode=1” will cause kernel crash and if “bypass_mode=0” no kernel crash.

[ 4683.871004] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 4683.871167] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 4683.871316] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 4683.893171] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 4683.924512] [RCE] ERROR: capture-scheduler.c:965 [capture_scheduler_process_channel_reset_req] "RESET timeout on ch : 0"
[ 4683.924974] [RCE] Configuring VI GoS.
[ 4683.925003] [RCE] VM GOS[#0] addr=0xc2100000
[ 4683.925028] [RCE] VM GOS[#1] addr=0xc2101000
[ 4683.925051] [RCE] VM GOS[#2] addr=0xc2102000
[ 4683.925073] [RCE] VM GOS[#3] addr=0xc2103000
[ 4683.925095] [RCE] VM GOS[#4] addr=0xc2104000
[ 4683.925188] [RCE] VM GOS[#5] addr=0xc2105000
[17962.409483] ------------[ cut here ]------------
[17962.409724] WARNING: CPU: 0 PID: 10728 at drivers/media/v4l2-core/videobuf2-core.c:1664 __vb2_queue_cancel+0x11c/0x188
[17962.409925] Modules linked in: bnep fuse xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack br_netfilter zram overlay bluedroid_pm userspace_alert nvgpu ip_tables x_tables

[17962.410069] CPU: 0 PID: 10728 Comm: v4l2-ctl Tainted: G        W       4.9.253-tegra #5
[17962.410073] Hardware name: Jetson-AGX (DT)
[17962.410094] task: ffffffc7654c7000 task.stack: ffffffc765410000
[17962.410102] PC is at __vb2_queue_cancel+0x11c/0x188
[17962.410109] LR is at __vb2_queue_cancel+0x34/0x188
[17962.410121] pc : [<ffffff8008b2c7e4>] lr : [<ffffff8008b2c6fc>] pstate: 20400045
[17962.410126] sp : ffffffc765413ae0
[17962.410133] x29: ffffffc765413ae0 x28: ffffffc7654c7000 
[17962.410146] x27: ffffff8008f82000 x26: ffffffc79ac8eb40 
[17962.410161] x25: ffffffc79adb6268 x24: ffffffc7c5ce1048 
[17962.410173] x23: 0000000000000001 x22: ffffffc7da76a018 
[17962.410185] x21: ffffffc7c5c44800 x20: ffffffc7da76a5d0 
[17962.410196] x19: ffffffc7da76a5d0 x18: 00000000000034e3 
[17962.410207] x17: 0000007fad55a1a8 x16: 0000000000003213 
[17962.410219] x15: 0000000000000000 x14: 00000000000362ae 
[17962.410230] x13: 000000000000049c x12: 071c71c71c71c71c 
[17962.410241] x11: 000000000000000b x10: 0000000000000a10 
[17962.410255] x9 : ffffffc7654131d0 x8 : ffffffc7654c7a70 
[17962.410267] x7 : fefefeff646c606d x6 : 00000082d0565a3f 
[17962.410278] x5 : 0000000000000000 x4 : 0000000000000000 
[17962.410289] x3 : ffffff80094fb898 x2 : ffffffc7654c7000 
[17962.410300] x1 : ffffffc7d7d04090 x0 : 0000000000000004 

[17962.410316] ---[ end trace 39298aba7f16ef5a ]---
[17962.410412] Call trace:
[17962.410435] [<ffffff8008b2c7e4>] __vb2_queue_cancel+0x11c/0x188
[17962.410456] [<ffffff8008b2dc24>] vb2_core_queue_release+0x2c/0x58
[17962.410474] [<ffffff8008b302a4>] _vb2_fop_release+0x84/0xa0
[17962.410494] [<ffffff8008b35d7c>] tegra_channel_close+0x64/0x140
[17962.410518] [<ffffff8008b09670>] v4l2_release+0x48/0xa0
[17962.410545] [<ffffff800825dcb8>] __fput+0x90/0x1d0
[17962.410649] [<ffffff800825de70>] ____fput+0x20/0x30
[17962.410673] [<ffffff80080d8dac>] task_work_run+0xbc/0xd8
[17962.410688] [<ffffff80080b8408>] do_exit+0x2e0/0xa88
[17962.410703] [<ffffff80080b8c40>] do_group_exit+0x40/0xa8
[17962.410715] [<ffffff80080c64ec>] get_signal+0xbc/0x750
[17962.410728] [<ffffff800808add8>] do_signal+0x130/0x500
[17962.410736] [<ffffff800808b320>] do_notify_resume+0x90/0xb0
[17962.410748] [<ffffff800808379c>] work_pending+0x8/0x10

I also got the same problem V4L2 timeout leads to NULL pointer dereference in kernel in jetpack 4.6 - Jetson & Embedded Systems / Jetson Xavier NX - NVIDIA Developer Forums

nvidia@agx-dev-1:~$ cat /etc/nv_tegra_release 
# R32 (release), REVISION: 6.1, GCID: 27863751, BOARD: t186ref, EABI: aarch64, DATE: Mon Jul 26 19:36:31 UTC 2021

Is JetPack4.6.1 is a stable release for jetson agx xavier?

thanks.