在orin上使用相机功能出现错误并且会卡死

在使用相机功能的时候会出现报错并且系统卡死,错误的日志如下

*[ 380.685394] bwmgr API not supported
[ 383.414769] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 383.423959] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 383.433553] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 383.441291] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 383.451964] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 383.459917] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 386.230780] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 386.239931] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 386.249515] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 386.257229] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 386.267893] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 386.275604] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[ 386.286354] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 389.046949] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 389.056100] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 389.065707] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 389.073428] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 389.084090] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 390.102771] Unable to handle kernel paging request at virtual address 2ef8de265f58eecd
[ 390.110930] Mem abort info:
[ 390.113807] ESR = 0x96000004
[ 390.116945] EC = 0x25: DABT (current EL), IL = 32 bits
[ 390.122404] SET = 0, FnV = 0
[ 390.125537] EA = 0, S1PTW = 0
[ 390.128769] Data abort info:
[ 390.131738] ISV = 0, ISS = 0x00000004
[ 390.135693] CM = 0, WnR = 0
[ 390.138750] [2ef8de265f58eecd] address between user and kernel address ranges
[ 390.146292] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 390.152733] Modules linked in: ar0233yuv(E) fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) hid_logitech_hidpp(E) ramoops(E) reed_solomon(E) input_leds(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_asrc(E) snd_soc_tegra186_dspk(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_iqc(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_afc(E) snd_soc_tegra210_dmic(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_admaif(E) snd_soc_tegra210_amx(E) aes_ce_blk(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_i2s(E) snd_soc_tegra210_sfc(E) crypto_simd(E) snd_soc_tegra_pcm(E) cryptd(E) mt7601u(E) aes_ce_cipher(E) ghash_ce(E) mac80211(E) sha2_ce(E) loop(E) hid_logitech_dj(E) sha256_arm64(E) cfg80211(E) cam_cdi_tsc(E) sha1_ce(E) ucsi_ccg(E) snd_soc_tegra_machine_driver(E) typec_ucsi(E) snd_soc_tegra_utils(E) nv_hawk_owl(E) snd_soc_simple_card_utils(E) snd_soc_spdif_tx(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_ahub(E) typec(E) max96712(E) i2c_nvvrs11(E) nct1008(E) userspace_alert(E) tegra_bpmp_thermal(E)
[ 390.152787] tegra210_adma(E) snd_hda_tegra(E) snd_hda_codec(E) snd_soc_rt5640(E) snd_soc_rl6231(E) snd_hda_core(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) ina3221(E) pwm_fan(E) nvgpu(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: mtd]
[ 390.266283] CPU: 1 PID: 3848 Comm: vi-output, ar02 Tainted: G OE 5.10.216-tegra #7
[ 390.275306] Hardware name: NVIDIA Jetson AGX Orin Developer Kit/Jetson, BIOS 6.0-37391689 08/28/2024
[ 390.284688] pstate: 00c00009 (nzcv daif +PAN +UAO -TCO BTYPE=–)
[ 390.290859] pc : string_nocheck+0x3c/0x70
[ 390.294982] lr : string+0x54/0x70
[ 390.298390] sp : ffff80002109b650
[ 390.301800] x29: ffff80002109b650 x28: ffffbb3b6cdecbe6
[ 390.307261] x27: ffff80002109b862 x26: 0000000000000020
[ 390.312719] x25: ffffbb3b6cdecbe6 x24: 0000000000000030
[ 390.318177] x23: 00000000ffffffe8 x22: ffffbb3b6c962830
[ 390.323630] x21: ffff0a00ffffff04 x20: 2ef8de265f58eecd
[ 390.329097] x19: ffff80002109b888 x18: 0000000000001800
[ 390.334555] x17: 0000000000000000 x16: 0000000000000000
[ 390.340013] x15: 0000000000000000 x14: ffff6e7740163b00
[ 390.345470] x13: ffffb342fffbb000 x12: 000000003464d91d
[ 390.350931] x11: 0000000000000002 x10: 0101010101010101
[ 390.356389] x9 : 00000000fffffffe x8 : ffff80002109b888
[ 390.361848] x7 : 0000000000000008 x6 : ffff80002109b862
[ 390.362677] mt7601u 1-2.1:1.0: Error: TSSI upper saturation
[ 390.367304] x5 : 0000000000000000 x4 : 0000000000000000
[ 390.367305] x3 : ffff0a00ffffff04 x2 : 2ef8de265f58eecd
[ 390.367306] x1 : ffff80002109b888 x0 : ffff80002109b862
[ 390.367308] Call trace:
[ 390.367311] string_nocheck+0x3c/0x70
[ 390.395692] string+0x54/0x70
[ 390.398748] vsnprintf+0x26c/0x720
[ 390.402243] snprintf+0x58/0x80
[ 390.405475] dev_vprintk_emit+0x128/0x184
[ 390.409602] dev_printk_emit+0x80/0xa8
[ 390.413459] __dev_printk+0x7c/0xa4
[ 390.417047] _dev_err+0x74/0x9c
[ 390.420280] vi_capture_ivc_send_control.isra.0+0x10c/0x130
[ 390.426009] vi_capture_control_send_message+0x7c/0x230
[ 390.431376] vi_capture_control_message+0xa0/0x140
[ 390.436302] csi5_send_control_message+0x54/0xb0
[ 390.441046] csi5_stream_open+0x94/0x110
[ 390.445075] csi5_start_streaming+0xac/0xe0
[ 390.449367] csi5_error_recover+0x44/0x90
[ 390.453495] tegra_csi_error_recovery+0x58/0xc0
[ 390.458152] tegra_csi_sync_event+0x44/0x50
[ 390.462452] vi5_channel_error_recover+0x1ac/0x200
[ 390.467375] tegra_channel_error_recover+0x78/0xa0
[ 390.472301] tegra_channel_kthread_capture_dequeue+0x134/0x200
[ 390.478299] kthread+0x148/0x170
[ 390.481623] ret_from_fork+0x10/0x18
[ 390.485299] Code: 91000400 110004e1 aa0603e4 540000e0 (38646845)
[ 390.491577] —[ end trace 30e49f4a0a7abfe7 ]—
[ 390.500455] Kernel panic - not syncing: Oops: Fatal exception
[ 390.506354] SMP: stopping secondary CPUs
[ 390.510567] Kernel Offset: 0x3b3b5b680000 from 0xffff800010000000
[ 390.516829] PHYS_OFFSET: 0xffff9189c0000000
[ 390.521130] CPU features: 0x08040006,4a80aa38
[ 390.525610] Memory Limit: none
[ 390.532858] —[ end Kernel panic - not syncing: Oops: Fatal exception ]—

在使用cat /sys/kernel/debug/tracing/trace的时候显示如下图

请问出现这种情况的原因是什么?我应该如何去解决他

tracer: nop

entries-in-buffer/entries-written: 16/16 #P:8

_-----=> irqs-off

/ _----=> need-resched

| / _—=> hardirq/softirq

|| / _–=> preempt-depth

||| / delay

TASK-PID CPU# |||| TIMESTAMP FUNCTION

| | | |||| | |

      v4l_id-12301   [000] ....  2422.844102: tegra_channel_open: vi-output, ar0233yuv 2-0021
      v4l_id-12301   [000] ....  2422.844182: tegra_channel_close: vi-output, ar0233yuv 2-0021
      v4l_id-12323   [006] ....  2423.360752: tegra_channel_open: vi-output, ar0233yuv 2-0022
      v4l_id-12323   [006] ....  2423.360918: tegra_channel_close: vi-output, ar0233yuv 2-0022
      v4l_id-12329   [001] ....  2424.039697: tegra_channel_open: vi-output, ar0233yuv 2-001f
      v4l_id-12329   [001] ....  2424.039851: tegra_channel_close: vi-output, ar0233yuv 2-001f
      v4l_id-12336   [001] ....  2424.563630: tegra_channel_open: vi-output, ar0233yuv 2-0020
      v4l_id-12336   [001] ....  2424.563809: tegra_channel_close: vi-output, ar0233yuv 2-0020
      v4l_id-12339   [000] ....  2424.806275: tegra_channel_open: vi-output, ar0233yuv 2-001d
      v4l_id-12339   [000] ....  2424.806455: tegra_channel_close: vi-output, ar0233yuv 2-001d
      v4l_id-12341   [002] ....  2425.022876: tegra_channel_open: vi-output, ar0233yuv 2-001e
      v4l_id-12341   [002] ....  2425.023050: tegra_channel_close: vi-output, ar0233yuv 2-001e
      v4l_id-12349   [003] ....  2425.265827: tegra_channel_open: vi-output, ar0233yuv 2-001b
      v4l_id-12349   [003] ....  2425.266033: tegra_channel_close: vi-output, ar0233yuv 2-001b
      v4l_id-12351   [002] ....  2425.475816: tegra_channel_open: vi-output, ar0233yuv 2-001c
      v4l_id-12351   [002] ....  2425.475912: tegra_channel_close: vi-output, ar0233yuv 2-001c

图像没有贴出来,我将输出的信息补充进来

Get the trace log be below command.

sudo su
modprobe rtcpu_debug

echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 3 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace

v4l2-ctl --stream-mmap -c bypass_mode=0

cat /sys/kernel/debug/tracing/trace

[ 1033.522624] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1033.531775] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1033.541367] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1033.549087] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 1033.559746] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1033.567751] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 1035.600237] mt7601u 1-2.1:1.0: Error: TSSI upper saturation
[ 1036.082949] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1036.092138] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1036.101828] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1036.109648] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 1036.120435] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1036.128186] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 5 vc- 0
[ 1036.138995] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[ 1038.898980] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 1038.908145] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 1038.917779] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1038.925512] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=5, csi_port=6
[ 1038.936190] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 1039.697237] mt7601u 1-2.1:1.0: Error: TSSI upper saturation
[ 1039.955191] Unable to handle kernel paging request at virtual address ffffb271a34bbb30
[ 1039.963343] Mem abort info:
[ 1039.966221] ESR = 0x96000047
[ 1039.969369] EC = 0x25: DABT (current EL), IL = 32 bits
[ 1039.974832] SET = 0, FnV = 0
[ 1039.977963] EA = 0, S1PTW = 0
[ 1039.981180] Data abort info:
[ 1039.984133] ISV = 0, ISS = 0x00000047
[ 1039.988076] CM = 0, WnR = 1
[ 1039.991123] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000004055af000
[ 1039.998017] [ffffb271a34bbb30] pgd=000000082d2ff003, p4d=000000082d2ff003, pud=000000082d2fe003, pmd=000000082d2fa003, pte=0000000000000000
[ 1040.010917] Internal error: Oops: 0000000096000047 [#1] PREEMPT SMP
[ 1040.017353] Modules linked in: ar0233yuv(E) fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) ramoops(E) reed_solomon(E) hid_logitech_hidpp(E) input_leds(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_dspk(E) snd_soc_tegra186_asrc(E) snd_soc_tegra210_afc(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_iqc(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_dmic(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_i2s(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_sfc(E) snd_soc_tegra210_admaif(E) snd_soc_tegra_pcm(E) aes_ce_blk(E) crypto_simd(E) cryptd(E) aes_ce_cipher(E) mt7601u(E) ghash_ce(E) hid_logitech_dj(E) sha2_ce(E) mac80211(E) cfg80211(E) sha256_arm64(E) sha1_ce(E) snd_soc_tegra_machine_driver(E) snd_soc_tegra_utils(E) snd_soc_simple_card_utils(E) ucsi_ccg(E) typec_ucsi(E) snd_soc_spdif_tx(E) typec(E) i2c_nvvrs11(E) nct1008(E) cam_cdi_tsc(E) tegra_bpmp_thermal(E) nv_hawk_owl(E) userspace_alert(E) max96712(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_ahub(E)
[ 1040.017411] tegra210_adma(E) snd_hda_tegra(E) snd_hda_codec(E) snd_soc_rt5640(E) snd_hda_core(E) snd_soc_rl6231(E) spi_tegra114(E) loop(E) nvidia(OE) binfmt_misc(E) ina3221(E) pwm_fan(E) nvgpu(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: mtd]
[ 1040.130855] CPU: 5 PID: 9208 Comm: vi-output, ar02 Tainted: G OE 5.10.216-tegra #7
[ 1040.139914] Hardware name: NVIDIA Jetson AGX Orin Developer Kit/Jetson, BIOS 6.0-37391689 08/28/2024
[ 1040.149306] pstate: 80c00089 (Nzcv daIf +PAN +UAO -TCO BTYPE=–)
[ 1040.155508] pc : queued_spin_lock_slowpath+0x214/0x3c0
[ 1040.160797] lr : queued_spin_lock_slowpath+0x20/0x3c0
[ 1040.165998] sp : ffff8000256cb960
[ 1040.169412] x29: ffff8000256cb960 x28: 0000000000000000
[ 1040.174880] x27: ffff8000256d3998 x26: ffff091943847880
[ 1040.180348] x25: ffff091982f21930 x24: 0000000000000002
[ 1040.185817] x23: ffff09195f6d3b00 x22: ffff09195f6d3b00
[ 1040.191274] x21: ffff091982f218f8 x20: 00000000002f3262
[ 1040.196743] x19: ffff091982f218f8 x18: 0000000000000000
[ 1040.202212] x17: 0000000000000000 x16: 0000000000000000
[ 1040.207678] x15: 0000000000000000 x14: ffff0919402abb00
[ 1040.213140] x13: ffff56aec9c4a000 x12: 000000003464d91d
[ 1040.218597] x11: 0000000000000000 x10: 0000000000000000
[ 1040.224063] x9 : 0000000000180000 x8 : 0000000000000000
[ 1040.229530] x7 : ffff09206d105b00 x6 : ffff09195f6d3b00
[ 1040.234991] x5 : ffffb271a34bbb00 x4 : ffff09206d105b00
[ 1040.240456] x3 : 0000000000000000 x2 : ffffb271a34bbb30
[ 1040.245925] x1 : ffffb271a34bbb30 x0 : ffff09206d105b08
[ 1040.251388] Call trace:
[ 1040.253898] queued_spin_lock_slowpath+0x214/0x3c0
[ 1040.258831] _raw_spin_lock_irq+0x98/0xb0
[ 1040.262952] wait_for_completion_timeout+0x98/0x110
[ 1040.267967] vi_capture_ivc_send_control.isra.0+0x80/0x130
[ 1040.273606] vi_capture_control_send_message+0x7c/0x230
[ 1040.278973] vi_capture_control_message+0xa0/0x140
[ 1040.283896] csi5_send_control_message+0x54/0xb0
[ 1040.288640] csi5_stream_open+0x94/0x110
[ 1040.292667] csi5_start_streaming+0xac/0xe0
[ 1040.296967] csi5_error_recover+0x44/0x90
[ 1040.301092] tegra_csi_error_recovery+0x58/0xc0
[ 1040.305756] tegra_csi_sync_event+0x44/0x50
[ 1040.310049] vi5_channel_error_recover+0x1ac/0x200
[ 1040.314977] tegra_channel_error_recover+0x78/0xa0
[ 1040.319906] tegra_channel_kthread_capture_dequeue+0x134/0x200
[ 1040.325906] kthread+0x148/0x170
[ 1040.329232] ret_from_fork+0x10/0x18
[ 1040.332912] Code: 910020e0 8b0200a2 f861d863 aa0203e1 (f8236827)
[ 1040.339194] —[ end trace 3bae9eac580491c0 ]—
[ 1040.348603] Kernel panic - not syncing: Oops: Fatal exception
[ 1040.354527] SMP: stopping secondary CPUs
[ 1040.358677] Kernel Offset: 0x327191a70000 from 0xffff800010000000
[ 1040.364951] PHYS_OFFSET: 0xfffff6e7c0000000
[ 1040.369253] CPU features: 0x08040006,4a80aa38
[ 1040.373732] Memory Limit: none
[ 1040.381506] —[ end Kernel panic - not syncing: Oops: Fatal exception ]—

你好在执行完v4l2-ctl --stream-mmap -c bypass_mode=0这个后内核直接崩溃了,这个是崩溃打印出来的日志

You can still get the trace log even the kernel panic.

What’s the verison?

cat /etc/nv_tegra_release

R35 (release), REVISION: 6.0, GCID: 37391689, BOARD: t186ref, EABI: aarch64, DATE: Wed Aug 28 09:12:27 UTC 2024

Please follow my previous comment to get the trace log even the kernel panic.

你好,执行命令后直接卡死了我没有办法输入任何指令,因此我没有办法输入这个 命令只能通过重新上电来恢复设备正常运行

Apply below patch to try.

[Camera][VI] kernel panic when accessing non-existent camera on developer kit
https://forums.developer.nvidia.com/t/344342/8