I use v4l2 open the multi cameras on R35.3.1,but occur kernel panic ,the same problem never happened on R35.1 ,this log is below:
000000000000003c
[ 283.164106] Mem abort info:
[ 283.164107] ESR = 0x96000005
[ 283.164110] EC = 0x25: DABT (current EL), IL = 32 bits
[ 283.164111] SET = 0, FnV = 0
[ 283.164112] EA = 0, S1PTW = 0
[ 283.164112] Data abort info:
[ 283.164113] ISV = 0, ISS = 0x00000005
[ 283.164114] CM = 0, WnR = 0
[ 283.164116] user pgtable: 4k pages, 48-bit VAs, pgdp=0000000138add000
[ 283.164117] [000000000000003c] pgd=00000001bd70d003, p4d=00000001bd70d003, pu d=0000000000000000
[ 283.164124] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 283.164127] Modules linked in: nvidia_modeset(OE) fuse(E) spidev(E) lzo_rle(E ) lzo_compress(E) zram(E) overlay(E) ramoops(E) reed_solomon(E) loop(E) option(E ) usb_wwan(E) snd_soc_tegra186_asrc(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_ arad(E) snd_soc_tegra186_dspk(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_iqc(E) can_raw(E) can(E) cdc_mbim(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E ) snd_soc_tegra210_afc(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_dmic(E) usbse rial(E) cdc_wdm(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_i2s(E) snd_soc_teg ra210_sfc(E) snd_soc_tegra_pcm(E) aes_ce_blk(E) crypto_simd(E) nvgpu(E) mcp25xxf d(E) cryptd(E) aes_ce_cipher(E) ghash_ce(E) sha2_ce(E) sha256_arm64(E) input_led s(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_adsp(E) 88x2cs(E) sha1_ce(E) snd_soc tegra_machine_driver(E) ucsi_ccg(E) mttcan(E) snd_soc_tegra_utils(E) typec_ucsi (E) snd_hda_tegra(E) cfg80211(E) pps_gpio(E) nvadsp(E) snd_soc_simple_card_utils (E) pwm_fan(E) typec(E) snd_soc_spdif_tx(E)
[ 283.164192] nv_ht_ar0231(E) snd_soc_tegra210_ahub(E) snd_hda_codec(E) nv_ht imx390(E) nv_ox3cc(E) ina3221(E) nct1008(E) can_dev(E) snd_soc_rt5640(E) tegra_b pmp_thermal(E) snd_hda_core(E) tegra210_adma(E) userspace_alert(E) max96712(E) s nd_soc_rl6231(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: mtd]
[ 283.164219] CPU: 5 PID: 3760 Comm: h60f_ros_node Tainted: G W OE 5.10.104-tegra #3
[ 283.164220] Hardware name: Unknown Jetson AGX Orin/Jetson AGX Orin, BIOS 3.1- 32827747 03/19/2023
[ 283.164223] pstate: 80400009 (Nzcv daif +PAN -UAO -TCO BTYPE=–)
[ 283.164233] pc : __mutex_lock.isra.0+0xc4/0x550
[ 283.164235] lr : __mutex_lock.isra.0+0x68/0x550
[ 283.164236] sp : ffff80002751bb00
[ 283.164237] x29: ffff80002751bb00 x28: ffff77827325d700
[ 283.164239] x27: 00000000c058560f x26: ffff80002751bd08
[ 283.164241] x25: ffff80002751bd08 x24: ffffffde0b482900
[ 283.164243] x23: ffff77824c128000 x22: 0000000000000001
[ 283.164245] x21: ffff77824c128000 x20: 000000000000000f
[ 283.164247] x19: ffffffde0b482900 x18: 0000000000000000
[ 283.164249] x17: 0000000000000000 x16: 0000000000000000
[ 283.164251] x15: 0000ffffcf9d59f0 x14: 0000000100000003
[ 283.164252] x13: 0000000000000000 x12: 0000000000000000
[ 283.164254] x11: 0000000000000000 x10: 0000000000000000
[ 283.164256] x9 : 0000000000000001 x8 : 00000000003f4800
[ 283.164258] x7 : 0000000000bdf000 x6 : 0000000000000000
[ 283.164260] x5 : ffff80002751bd60 x4 : ffff77827325d700
[ 283.164262] x3 : ffff77824c128000 x2 : ffffa26293d87460
[ 283.164264] x1 : ffff77824c128000 x0 : 8000000000000000
[ 283.164266] Call trace:
[ 283.164269] __mutex_lock.isra.0+0xc4/0x550
[ 283.164271] __mutex_lock_interruptible_slowpath+0x24/0x30
[ 283.164274] mutex_lock_interruptible+0x4c/0x80
[ 283.164277] __video_do_ioctl+0xe4/0x3f0
[ 283.164279] video_usercopy+0x27c/0x790
[ 283.164280] video_ioctl2+0x3c/0x180
[ 283.164283] v4l2_ioctl+0x64/0x90
[ 283.164287] __arm64_sys_ioctl+0xa8/0xf0
[ 283.164292] el0_svc_common.constprop.0+0x7c/0x1c0
[ 283.164294] do_el0_svc+0x34/0xa0
[ 283.164296] el0_svc+0x1c/0x30
[ 283.164298] el0_sync_handler+0xa8/0xb0
[ 283.164300] el0_sync+0x16c/0x180
[ 283.164303] Code: 72001c1f 54001ec0 d503203f 17fffff4 (b9403c01)
[ 283.164312] —[ end trace a47f34e14df3bfc8 ]—
[ 283.170538] Kernel panic - not syncing: Oops: Fatal exception
[ 283.170542] SMP: stopping secondary CPUs
[ 283.171439] ------------[ cut here ]------------
[ 283.179481] Mem abort info:
[ 283.188415] WARNING: CPU: 10 PID: 3841 at kernel/sched/core.c:1999 set_task_c pu+0x234/0x240
[ 283.191294] ESR = 0x96000047
[ 283.191297] EC = 0x25: DABT (current EL), IL = 32 bits
[ 283.194443] Modules linked in:
[ 283.199869] SET = 0, FnV = 0
[ 283.199871] EA = 0, S1PTW = 0
[ 283.202844] nvidia_modeset(OE)
[ 283.205993] Data abort info:
[ 283.205996] ISV = 0, ISS = 0x00000047
[ 283.208881] fuse(E)
[ 283.212730] CM = 0, WnR = 1
[ 283.212732] swapper pgtable: 4k pages, 48-bit VAs, pgdp=00000002d1e9f000
[ 283.215881] spidev(E)
[ 283.222444] [ffffa262955aca70] pgd=000000102edff003, p4d=000000102edff003
[ 283.231281] lzo_rle(E)
[ 283.237056] , pud=000000102edfe003, pmd=000000102edfb003
[ 283.323418] lzo_compress(E)
[ 283.354656] , pte=0000000000000000
[ 283.363319] zram(E) overlay(E) ramoops(E) reed_solomon(E) loop(E) option(E) usb_wwan(E) snd_soc_tegra186_asrc(E) snd_soc_tegra210_ope(E) snd_soc_tegra186_ar ad(E) snd_soc_tegra186_dspk(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_iqc(E) c an_raw(E) can(E) cdc_mbim(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E) snd_soc_tegra210_afc(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_dmic(E) usbseri al(E) cdc_wdm(E) snd_soc_tegra210_mixer(E) snd_soc_tegra210_i2s(E) snd_soc_tegra 210_sfc(E) snd_soc_tegra_pcm(E) aes_ce_blk(E) crypto_simd(E) nvgpu(E) mcp25xxfd( E) cryptd(E) aes_ce_cipher(E) ghash_ce(E) sha2_ce(E) sha256_arm64(E) input_leds( E) snd_hda_codec_hdmi(E) snd_soc_tegra210_adsp(E) 88x2cs(E) sha1_ce(E) snd_soc_t egra_machine_driver(E) ucsi_ccg(E) mttcan(E) snd_soc_tegra_utils(E) typec_ucsi(E ) snd_hda_tegra(E) cfg80211(E) pps_gpio(E) nvadsp(E) snd_soc_simple_card_utils(E ) pwm_fan(E) typec(E) snd_soc_spdif_tx(E) nv_ht_ar0231(E) snd_soc_tegra210_ahub( E) snd_hda_codec(E) nv_ht_imx390(E) nv_ox3cc(E)
[ 283.624642] ina3221(E) nct1008(E) can_dev(E) snd_soc_rt5640(E) tegra_bpmp_th ermal(E) snd_hda_core(E) tegra210_adma(E) userspace_alert(E) max96712(E) snd_soc _rl6231(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) nvmap(E) ip_tables(E) x_tab les(E) [last unloaded: mtd]
[ 283.735369] CPU: 10 PID: 3841 Comm: vi-output, ht_i Tainted: G D W OE 5.10.104-tegra #3
[ 283.744293] Hardware name: Unknown Jetson AGX Orin/Jetson AGX Orin, BIOS 3.1- 32827747 03/19/2023
[ 283.753219] pstate: 20400089 (nzCv daIf +PAN -UAO -TCO BTYPE=–)
[ 283.759255] pc : set_task_cpu+0x234/0x240
[ 283.763456] lr : set_task_cpu+0x20/0x240
[ 283.767393] sp : ffff800010053d50
[ 283.770804] x29: ffff800010053d50 x28: ffff77916eba2200
[ 283.776318] x27: ffff800027633910 x26: ffffa262958893f8
[ 283.781655] x25: ffffa262955abd80 x24: ffff77828804b394
[ 283.787166] x23: 0000000000000080 x22: 0000000000000004
[ 283.792679] x21: ffffa26295888998 x20: 000000000000000b
[ 283.798191] x19: ffff77828804ab80 x18: 0000000000000010
[ 283.803618] x17: 0000000000000000 x16: ffffa26293bf2d90
[ 283.809129] x15: ffff7782409613f0 x14: 5f35697363203a30
[ 283.814642] x13: 3030303061353140 x12: 204956203a6e6570
[ 283.820067] x11: 0000000000000040 x10: ffffa26295917a80
[ 283.825580] x9 : ffffa26295917a78 x8 : 0000000000000004
[ 283.830917] x7 : 0000000000000000 x6 : 000000002df7707e
[ 283.836430] x5 : 00ffffffffffffff x4 : 0000000000000015
[ 283.841855] x3 : 0000000000115380 x2 : ffffa26293d87460
[ 283.847192] x1 : 000000000000000b x0 : 0000000000000000
[ 283.852530] Call trace:
[ 283.854982] set_task_cpu+0x234/0x240
[ 283.858480] try_to_wake_up+0x1e8/0x720
[ 283.862418] wake_up_process+0x28/0x40
[ 283.866182] hrtimer_wakeup+0x28/0x40
[ 283.869680] __hrtimer_run_queues+0x144/0x370
[ 283.874145] hrtimer_interrupt+0xec/0x240
[ 283.878170] arch_timer_handler_phys+0x3c/0x50
[ 283.882457] handle_percpu_devid_irq+0x8c/0x280
[ 283.887005] generic_handle_irq+0x3c/0x60
[ 283.891030] __handle_domain_irq+0x6c/0xc0
[ 283.895231] gic_handle_irq+0x64/0x130
[ 283.898992] el1_irq+0xd0/0x180
[ 283.901969] console_unlock+0x284/0x530
[ 283.905905] vprintk_emit+0x120/0x2a0
[ 283.909406] dev_vprintk_emit+0x150/0x17c
[ 283.913431] dev_printk_emit+0x7c/0xa0
[ 283.917193] __dev_printk+0x78/0xa0
[ 283.920693] _dev_err+0x70/0x94
[ 283.923845] csi5_stream_open+0xf4/0x100
[ 283.927695] csi5_start_streaming+0xa8/0xe0
[ 283.931717] csi5_error_recover+0x40/0x90
[ 283.935919] tegra_csi_error_recovery+0x50/0xb0
[ 283.940555] tegra_csi_sync_event+0x40/0x50
[ 283.944581] vi5_channel_error_recover+0x1bc/0x230
[ 283.949567] tegra_channel_error_recover+0x74/0x90
[ 283.954381] tegra_channel_kthread_capture_dequeue+0x124/0x1e0
[ 283.960156] kthread+0x148/0x170
[ 283.963567] ret_from_fork+0x10/0x18
[ 283.967068] —[ end trace a47f34e14df3bfc9 ]—
[ 284.218638] SMP: failed to stop secondary CPUs 5-6
[ 284.218788] Kernel Offset: 0x226283bd0000 from 0xffff800010000000
[ 284.218963] PHYS_OFFSET: 0xffff887ec0000000
[ 284.219080] CPU features: 0x0040006,4a80aa38
[ 284.219213] Memory Limit: none
[ 284.224404] —[ end Kernel panic - not syncing: Oops: Fatal exception ]—
Is it the same issue as Orin Multi Camera stop lead to kernel panic - Jetson & Embedded Systems / Jetson AGX Orin - NVIDIA Developer Forums?
maybe,this use v4l2 open,another use gst-launch cmd stop
Did you run v4l2-ctl?
What the reproduce step?
我们复现了这个问题,这个问题不是每次必现,但是概率还是比较大,我们测试流程步入下:
1、使用两个csi接口,其中一个接了2个相机,另一个没接相机,我们使用进行v4l2 打开和关闭测试,
2、出现问题的时候,关闭没有接相机那路v4l2接口,串口打印下:
并且top显示接了相机那路vi-output 100%
3、这个时候我们去停止接了相机那路v4l2,然后出现kernel panic,错误内容如下:
[ 1306.939142] CPU: 6 PID: 6890 Comm: h60f_ros_node Tainted: G W OE 5.10.104-tegra #3
[ 1306.947805] Hardware name: Unknown Jetson AGX Orin/Jetson AGX Orin, BIOS 3.1-32827747 03/19/2023
[ 1306.956729] pstate: 60400089 (nZCv daIf +PAN -UAO -TCO BTYPE=–)
[ 1306.962770] pc : __prepare_to_swait+0x50/0x60
[ 1306.967229] lr : __prepare_to_swait+0x1c/0x60
[ 1306.971692] sp : ffff800027473a00
[ 1306.975103] x29: ffff800027473a00 x28: ffff7678d21cd700
[ 1306.980617] x27: ffffce4f821e7000 x26: 0000ffffa55bc624
[ 1306.986128] x25: fffffffffffffdfe x24: ffff7678d21cd700
[ 1306.991642] x23: 0000000000000002 x22: ffff7678d21cd700
[ 1306.997156] x21: 7fffffffffffffff x20: ffff7678d2a5a450
[ 1307.002667] x19: ffff800027473a60 x18: 0000000000000010
[ 1307.008005] x17: 0000000000000007 x16: ffffce4f80842d90
[ 1307.013517] x15: ffff7678d21cdc70 x14: ffffffffffffffff
[ 1307.019028] x13: ffff8000a74736a7 x12: ffff8000274736af
[ 1307.024455] x11: ffff800027473ba8 x10: 0000000000000000
[ 1307.029967] x9 : ffff800027473a70 x8 : 612d657375203b30
[ 1307.035391] x7 : 206e6f206e6f6974 x6 : c0000000fffff34d
[ 1307.040816] x5 : ffff7687eeb1a958 x4 : ffffce4f824f7968
[ 1307.046242] x3 : 0000000000000000 x2 : 0000000000000000
[ 1307.051579] x1 : ffff800027473a68 x0 : ffff7678d2a5a458
[ 1307.056917] Call trace:
[ 1307.059368] __prepare_to_swait+0x50/0x60
[ 1307.063397] wait_for_completion+0x74/0x110
[ 1307.067592] kthread_stop+0xa8/0x260
[ 1307.071093] vi5_channel_stop_kthreads+0x40/0x60
[ 1307.075641] vi5_channel_stop_streaming+0xbc/0xe0
[ 1307.080192] tegra_channel_stop_streaming+0x38/0x60
[ 1307.085006] __vb2_queue_cancel+0x3c/0x220
[ 1307.089204] vb2_core_queue_release+0x2c/0x60
[ 1307.093493] _vb2_fop_release+0x84/0xa0
[ 1307.097255] tegra_channel_close+0x64/0x180
[ 1307.101280] v4l2_release+0xbc/0xf0
[ 1307.104954] __fput+0x7c/0x230
[ 1307.107930] ____fput+0x20/0x30
[ 1307.110904] task_work_run+0x88/0x140
[ 1307.114579] do_exit+0x350/0xab0
[ 1307.117819] do_group_exit+0x48/0xb0
[ 1307.121492] get_signal+0x104/0x830
[ 1307.124817] do_notify_resume+0x17c/0x9f0
[ 1307.128842] work_pending+0xc/0x384
[ 1307.132519] Code: f9400a82 f9000a81 91002280 a9008a60 (f9000041)
[ 1307.138737] —[ end trace 0d23e1348b958ce4 ]—
[ 1307.147775] Kernel panic - not syncing: Oops: Fatal exception
[ 1307.149145] SMP: stopping secondary CPUs
[ 1307.153000] Kernel Offset: 0x4e4f70820000 from 0xffff800010000000
[ 1307.159117] PHYS_OFFSET: 0xffff898840000000
[ 1307.163230] CPU features: 0x0040006,4a80aa38
[ 1307.167691] Memory Limit: none
[ 1307.175056] —[ end Kernel panic - not syncing: Oops: Fatal exception ]—
What’s situation able to close unplug camera?
不是拔掉相机,是根本就没有接相机,我们现在测试发现一个csi对应一个max96712,如果96712上面有接了一路相机,三路没接,应用还是打开4路video,就不会出现vi-ouput 100%,如果96712上面一个都没有接,应用还是打开四路video,就会很容易出现vi-ouput 100%,此时close video就会出现kernel panic
Why open the camera that didn’t connect?
I would suggest your sensor driver to detect the connection to unregister the video node to avoid the case.
Thanks
我尝试着通过i2c检测连接来注销未连接的video 节点,但是发现这种情况下注册的video节点没有数据,并且/dev下一共出现13个v4l-subdev节点,
但是如果我把所有的video节点都保留,对应有连接的video能够正常显示数据,请问这是什么情况
这是所有节点都保留的情况,
这种情况下对应的video能够显示图像
Did you unregister the video and subdev by below function?
tegracam_device_unregister()
tegracam_v4l2subdev_unregister()
是的,我就是用的这两个函数,而且我也尝试只注册一个video,同样出来13个subdev,并且没有图像数据
That’s unreasonable.
Could you print the message to confirm if only run the tegracam_device_unregister() one time?
Sorry ,我们找到问题了,是注销设备前 max96712的配置未设置完全,我们会尝试用这种方式注销掉未连接的节点,之前的那个未注销设备超时问题nvidia这边会继续分析吗?
因为如果相机在初始化的时候已连接,但如果运行过程中出现偶然的掉线后,就会出现vi-output 100%的情况,导致系统卡死
Do you mean capture failed during the sensor disconnected accidentally?
You can modify the recovery of the vi5_fops.c to break instead try recovery the capture.
是的,从目前现象来看,当一个csi接口对应超过一个video设备时,且所有video设备都掉线时,重置过程就会很容易出现vi-ouput 100%,你的意思就是当出现相机掉线时,超时就退出stream,不再reset?
Yes, don’t try recovery while detected device disconnected.
Thanks
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.