How to Prevent OS Crash on Loss of Power to MIPI Camera?

Hi all,

I’m working on a custom V4L2 driver for a MIPI CSI camera on a Jetson Orin Nano Developer Kit (running JetPack 5.1.3) and need some help preventing an OS crash when power to the camera is lost. The driver is built as a kernel module that loads at boot, but can be loaded and unloaded manually when the system is running. It is functioning well enough to load and display video using v4l2-ctl, gstreamer, and Guvcview.

During testing I’ve discovered that if camera power is cut while streaming video in Guvcview, the OS crashes when I subsequently close Guvcview. My goal is to ensure system stability in the event of loss of comms to the camera, and preferably to be able to use the camera again after reapplying power. So far my searches online have produced no solutions for handling this type of error. That leads me to two questions:

  1. When the video stream times out after cutting camera power, the driver code we’ve written is never called. I see warnings from tegra-camrtc-capture-vi, but nothing in our code. Does this mean that error handling occurs outside the V4L2 driver, and that I am therefore unable to fix this issue, or have I missed an essential piece of driver code?
  2. Where can I look for documentation or examples showing proper methods for handling such errors?

For reference here are kernel logs for two test cases. In the first case video is streamed with v4l2-ctl. When power is cut I can close v4l2-ctl (via CTRL-C) without crashing the OS.

Case 1 - v4l2-ctl
Start v4l2-ctl here.

[  372.936425] my-driver 9-0033: In my-driver_set_mode
[  372.940033] my-driver 9-0033: In my-driver_start_streaming

Cut power here.
[  379.100704] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  379.109876] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  379.119515] (NULL device *): vi_capture_control_message: NULL VI channel received
[  379.127270] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  379.138073] (NULL device *): vi_capture_control_message: NULL VI channel received
[  380.156868] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  380.165196] tegra194-vi5 13e40000.host1x:vi0@15c00000: vi_capture_control_send_message: failed to send IVC control message
[  381.180645] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  381.189015] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[  381.196381] tegra-camrtc-capture-vi tegra-capture-vi: fatal: error recovery failed

Pressed CTRL-C on v4l2-ctl here.

[  400.137561] ------------[ cut here ]------------
[  400.142360] refcount_t: addition on 0; use-after-free.
[  400.142393] WARNING: CPU: 5 PID: 10432 at lib/refcount.c:25 refcount_warn_saturate+0x98/0x140
[  400.151192] Modules linked in: my-driver(E) fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) ramoops(E) reed_solomon(E) bnep(E) loop(E) nvgpu(E) aes_ce_blk(E) snd_soc_tegra186_dspk(E) crypto_simd(E) snd_soc_tegra210_ope(E) cryptd(E) rtk_btusb(E) snd_soc_tegra186_asrc(E) rtl8822ce(E) snd_soc_tegra210_iqc(E) aes_ce_cipher(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_afc(E) btusb(E) ghash_ce(E) r8168(E) input_leds(E) snd_soc_tegra210_dmic(E) btrtl(E) sha2_ce(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_mixer(E) sha256_arm64(E) btbcm(E) cfg80211(E) snd_soc_tegra210_i2s(E) snd_soc_tegra_pcm(E) sha1_ce(E) snd_soc_tegra210_adsp(E) snd_soc_tegra210_sfc(E) btintel(E) snd_soc_tegra_machine_driver(E) snd_hda_tegra(E) snd_soc_tegra_utils(E) nvadsp(E) snd_hda_codec(E) snd_soc_spdif_tx(E) pwm_fan(E) snd_soc_simple_card_utils(E) snd_soc_tegra210_ahub(E) snd_hda_core(E) fusb301(E) ina3221(E)
[  400.151337]  tegra_bpmp_thermal(E) userspace_alert(E) tegra210_adma(E) nvidia(OE) spi_tegra114(E) binfmt_misc(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: my-driver]
[  400.151370] CPU: 5 PID: 10432 Comm: v4l2-ctl Tainted: G           OE     5.10.192 #2
[  400.151373] Hardware name: NVIDIA Orin Nano Developer Kit (DT)
[  400.151379] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  400.151384] pc : refcount_warn_saturate+0x98/0x140
[  400.151387] lr : refcount_warn_saturate+0x98/0x140
[  400.151389] sp : ffff800019c83a80
[  400.151392] x29: ffff800019c83a80 x28: ffff717f85ac0000 
[  400.151398] x27: 0000000000000000 x26: 0000ffffa5b2eacc 
[  400.151404] x25: ffffc34374302000 x24: ffff717f85ac0600 
[  400.151410] x23: ffff7180d88451f8 x22: ffff717f82ff00a0 
[  400.151415] x21: ffff717f8d510030 x20: ffff7180d8845550 
[  400.151421] x19: ffff717f8d510000 x18: 0000000000000010 
[  400.151427] x17: 0000000000000000 x16: ffffc343729050f0 
[  400.151432] x15: ffff717f85ac0570 x14: ffffffffffffffff 
[  400.151438] x13: ffff800099c836b7 x12: ffff800019c836bf 
[  400.151444] x11: ffffc343748c1a80 x10: 0000000000000ab0 
[  400.151449] x9 : ffff800019c83a80 x8 : 6572662d72657466 
[  400.151455] x7 : 612d657375203b30 x6 : c0000000ffffefff 
[  400.151461] x5 : ffff7180ee96e978 x4 : ffffc34374617ba8 
[  400.151466] x3 : 0000000000000001 x2 : ffff7180ee96e980 
[  400.151472] x1 : 0000000000000000 x0 : 0000000000000000 
[  400.151479] Call trace:
[  400.151483]  refcount_warn_saturate+0x98/0x140
[  400.151491]  kthread_stop+0x4c/0x290
[  400.151500]  vi5_channel_stop_kthreads+0x44/0x60
[  400.151505]  vi5_channel_stop_streaming+0xa8/0xb0
[  400.151512]  tegra_channel_stop_streaming+0x3c/0x70
[  400.151516]  __vb2_queue_cancel+0x40/0x220
[  400.151520]  vb2_core_queue_release+0x30/0x60
[  400.151524]  _vb2_fop_release+0x88/0xb0
[  400.151529]  tegra_channel_close+0x68/0x190
[  400.151536]  v4l2_release+0xc0/0x100
[  400.151544]  __fput+0x80/0x260
[  400.151548]  ____fput+0x24/0x30
[  400.151554]  task_work_run+0x88/0xe0
[  400.151561]  do_exit+0x35c/0xb00
[  400.151566]  do_group_exit+0x4c/0xb0
[  400.151571]  get_signal+0x184/0x8c0
[  400.151579]  do_notify_resume+0x18c/0x990
[  400.151583]  work_pending+0xc/0x738
[  400.151587] ---[ end trace 8a4d75f9118a3694 ]---
[  400.156388] ------------[ cut here ]------------
[  400.161148] refcount_t: underflow; use-after-free.
[  400.161167] WARNING: CPU: 5 PID: 10432 at lib/refcount.c:28 refcount_warn_saturate+0xec/0x140
[  400.169960] Modules linked in: my-driver(E) fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) ramoops(E) reed_solomon(E) bnep(E) loop(E) nvgpu(E) aes_ce_blk(E) snd_soc_tegra186_dspk(E) crypto_simd(E) snd_soc_tegra210_ope(E) cryptd(E) rtk_btusb(E) snd_soc_tegra186_asrc(E) rtl8822ce(E) snd_soc_tegra210_iqc(E) aes_ce_cipher(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) snd_soc_tegra210_afc(E) btusb(E) ghash_ce(E) r8168(E) input_leds(E) snd_soc_tegra210_dmic(E) btrtl(E) sha2_ce(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_mixer(E) sha256_arm64(E) btbcm(E) cfg80211(E) snd_soc_tegra210_i2s(E) snd_soc_tegra_pcm(E) sha1_ce(E) snd_soc_tegra210_adsp(E) snd_soc_tegra210_sfc(E) btintel(E) snd_soc_tegra_machine_driver(E) snd_hda_tegra(E) snd_soc_tegra_utils(E) nvadsp(E) snd_hda_codec(E) snd_soc_spdif_tx(E) pwm_fan(E) snd_soc_simple_card_utils(E) snd_soc_tegra210_ahub(E) snd_hda_core(E) fusb301(E) ina3221(E)
[  400.170067]  tegra_bpmp_thermal(E) userspace_alert(E) tegra210_adma(E) nvidia(OE) spi_tegra114(E) binfmt_misc(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: my-driver]
[  400.170091] CPU: 5 PID: 10432 Comm: v4l2-ctl Tainted: G        W  OE     5.10.192 #2
[  400.170094] Hardware name: NVIDIA Orin Nano Developer Kit (DT)
[  400.170098] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  400.170101] pc : refcount_warn_saturate+0xec/0x140
[  400.170105] lr : refcount_warn_saturate+0xec/0x140
[  400.170107] sp : ffff800019c83a80
[  400.170110] x29: ffff800019c83a80 x28: ffff717f85ac0000 
[  400.170116] x27: 0000000000000000 x26: 0000ffffa5b2eacc 
[  400.170121] x25: ffffc34374302000 x24: ffff717f85ac0600 
[  400.170127] x23: ffff7180d88451f8 x22: ffff717f82ff00a0 
[  400.170133] x21: ffff717f8d510030 x20: 0000000000000000 
[  400.170138] x19: ffff717f8d510000 x18: 0000000000000010 
[  400.170144] x17: 0000000000000000 x16: ffffc343729050f0 
[  400.170150] x15: ffff717f85ac0570 x14: ffffffffffffffff 
[  400.170155] x13: ffff800099c836b7 x12: ffff800019c836bf 
[  400.170161] x11: ffffc343748c1a80 x10: 0000000000000ab0 
[  400.170166] x9 : ffff800019c83a80 x8 : 75203b776f6c6672 
[  400.170172] x7 : 65646e75203a745f x6 : c0000000ffffefff 
[  400.170177] x5 : ffff7180ee96e978 x4 : ffffc34374617ba8 
[  400.170183] x3 : 0000000000000001 x2 : ffff7180ee96e980 
[  400.170188] x1 : 0000000000000000 x0 : 0000000000000000 
[  400.170194] Call trace:
[  400.170198]  refcount_warn_saturate+0xec/0x140
[  400.170202]  kthread_stop+0x27c/0x290
[  400.170207]  vi5_channel_stop_kthreads+0x44/0x60
[  400.170211]  vi5_channel_stop_streaming+0xa8/0xb0
[  400.170216]  tegra_channel_stop_streaming+0x3c/0x70
[  400.170220]  __vb2_queue_cancel+0x40/0x220
[  400.170224]  vb2_core_queue_release+0x30/0x60
[  400.170228]  _vb2_fop_release+0x88/0xb0
[  400.170233]  tegra_channel_close+0x68/0x190
[  400.170239]  v4l2_release+0xc0/0x100
[  400.170243]  __fput+0x80/0x260
[  400.170248]  ____fput+0x24/0x30
[  400.170253]  task_work_run+0x88/0xe0
[  400.170258]  do_exit+0x35c/0xb00
[  400.170262]  do_group_exit+0x4c/0xb0
[  400.170267]  get_signal+0x184/0x8c0
[  400.170273]  do_notify_resume+0x18c/0x990
[  400.170276]  work_pending+0xc/0x738
[  400.170279] ---[ end trace 8a4d75f9118a3695 ]---
[  400.175080] my-driver 9-0033: In my-driver_stop_streaming
[  400.180618] bwmgr API not supported
[  400.188879] In my-driver_power_off.
[  400.204325] [RCE] WARNING: core/hsp/hsp-vm.c:283 [camrtc_hsp_full_ss_isr] "VM0 issued IVC in inactive state."
[  401.212541] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  401.220895] tegra194-vi5 13e40000.host1x:vi0@15c00000: csi_stream_release: failed to disable nvcsi tpg on stream 1 virtual channel 0

In this case the system remained stable. I removed the driver module, powered
on the camera and then reloaded the driver module. This all worked correctly:

[  794.731310] my-driver 9-0033: probing v4l2 sensor at addr 0x33
[  794.731411] my-driver 9-0033: In my-driver_parse_dt
[  794.731414] my-driver 9-0033: In my-driver_power_get
[  794.731483] my-driver 9-0033: tegracam sensor driver:my-driver_v2.0.6
[  794.731484] my-driver 9-0033: tegra camera driver registration succeeded.
[  794.731551] tegra-camrtc-capture-vi tegra-capture-vi: subdev my-driver 9-0033 bound
[  794.733266] my-driver 9-0033: MIPI I²C-Core Version = 1.3.11
[  794.733272] my-driver 9-0033: detected my-driver sensor
[  794.739379] my-driver 9-0033: In my-driver_open

However subsequent attempts to stream failed:

[  806.012030] In my-driver_power_on.
[  807.026367] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  807.034805] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[  808.050107] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  808.058465] tegra194-vi5 13e40000.host1x:vi0@15c00000: csi_stream_release: failed to disable nvcsi tpg on stream 1 virtual channel 0

I tried the unload/reload/stream test a second time with identical results.

In the second case video is streaming in Guvcview. The OS crashes when closing Guvcview after power to the camera is cut.

Case 2 - Guvcview
Start guvcview here.

[   85.667896] my-driver 9-0033: In my-driver_open
[   88.201353] tegra210-adsp tegra210-adsp: Broken Path1 - FE not linked to BE
[   88.208585] tegra210-adsp tegra210-adsp: ASoC: error at snd_soc_component_open on tegra210-adsp: -32
[   88.268117] tegra210-adsp tegra210-adsp: Broken Path1 - FE not linked to BE
[   88.275307] tegra210-adsp tegra210-adsp: ASoC: error at snd_soc_component_open on tegra210-adsp: -32
[   88.329921] tegra210-adsp tegra210-adsp: Broken Path2 - FE not linked to BE
[   88.337137] tegra210-adsp tegra210-adsp: ASoC: error at snd_soc_component_open on tegra210-adsp: -32
[   88.391568] tegra210-adsp tegra210-adsp: Broken Path2 - FE not linked to BE
[   88.398765] tegra210-adsp tegra210-adsp: ASoC: error at snd_soc_component_open on tegra210-adsp: -32
[   89.408843] In my-driver_power_on.
[   89.414834] bwmgr API not supported
[   89.424249] my-driver 9-0033: In my-driver_set_mode
[   89.427866] my-driver 9-0033: In my-driver_start_streaming
[   89.941576] my-driver 9-0033: In my-driver_stop_streaming
[   89.945060] bwmgr API not supported
[   89.953005] In my-driver_power_off.
[   89.960282] In my-driver_power_on.
[   89.967711] bwmgr API not supported
[   89.976428] my-driver 9-0033: In my-driver_set_mode
[   89.980052] my-driver 9-0033: In my-driver_start_streaming

Cut camera power here.

[  102.113682] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  102.122888] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  102.132712] (NULL device *): vi_capture_control_message: NULL VI channel received
[  102.140470] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  102.151164] (NULL device *): vi_capture_control_message: NULL VI channel received
[  102.160033] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
[  104.673816] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[  104.682962] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[  104.692577] (NULL device *): vi_capture_control_message: NULL VI channel received
[  104.700314] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=1, csi_port=1
[  104.710998] (NULL device *): vi_capture_control_message: NULL VI channel received
[  105.729861] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  105.738206] tegra194-vi5 13e40000.host1x:vi0@15c00000: vi_capture_control_send_message: failed to send IVC control message
[  106.753893] tegra194-vi5 13e40000.host1x:vi0@15c00000: capture control message timed out
[  106.762302] tegra-camrtc-capture-vi tegra-capture-vi: vi capture setup failed
[  106.769676] tegra-camrtc-capture-vi tegra-capture-vi: fatal: error recovery failed

Quit Guvcview here.

[  122.747590] ------------[ cut here ]------------
[  122.752386] refcount_t: addition on 0; use-after-free.
[  122.752414] WARNING: CPU: 0 PID: 2356 at lib/refcount.c:25 refcount_warn_saturate+0x98/0x140
[  122.761094] Modules linked in: fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) ramoops(E) reed_solomon(E) bnep(E) loop(E) nvgpu(E) rtk_btusb(E) snd_soc_tegra186_dspk(E) aes_ce_blk(E) crypto_simd(E) snd_soc_tegra186_asrc(E) rtl8822ce(E) cryptd(E) btusb(E) snd_soc_tegra210_ope(E) snd_soc_tegra210_iqc(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) r8168(E) btrtl(E) aes_ce_cipher(E) snd_soc_tegra210_afc(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_dmic(E) ghash_ce(E) input_leds(E) btbcm(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E) sha2_ce(E) snd_soc_tegra210_mixer(E) cfg80211(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_i2s(E) sha256_arm64(E) snd_soc_tegra_pcm(E) snd_soc_tegra210_adsp(E) snd_soc_tegra210_sfc(E) btintel(E) snd_soc_tegra_machine_driver(E) sha1_ce(E) snd_hda_tegra(E) snd_soc_tegra_utils(E) snd_hda_codec(E) nvadsp(E) pwm_fan(E) snd_soc_simple_card_utils(E) snd_soc_spdif_tx(E) snd_soc_tegra210_ahub(E) snd_hda_core(E) ina3221(E) fusb301(E)
[  122.761178]  tegra_bpmp_thermal(E) userspace_alert(E) my-driver(E) tegra210_adma(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: mtd]
[  122.761199] CPU: 0 PID: 2356 Comm: guvcview Tainted: G           OE     5.10.192 #2
[  122.761201] Hardware name: NVIDIA Orin Nano Developer Kit (DT)
[  122.761204] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  122.761206] pc : refcount_warn_saturate+0x98/0x140
[  122.761208] lr : refcount_warn_saturate+0x98/0x140
[  122.761209] sp : ffff80001bffba40
[  122.761211] x29: ffff80001bffba40 x28: ffff14a48c87f900 
[  122.761214] x27: 0000000040045613 x26: 0000000000000000 
[  122.761217] x25: ffff80001bffbd08 x24: ffff14a5d88421f8 
[  122.761220] x23: ffff14a4b7450ec0 x22: ffff80001bffbd08 
[  122.761223] x21: ffff14a48c86c9f0 x20: ffff14a5d8842550 
[  122.761226] x19: ffff14a48c86c9c0 x18: 0000000000000010 
[  122.761229] x17: 0000000000000000 x16: ffffc989b9d250f0 
[  122.761231] x15: ffff14a4b7451430 x14: ffffffffffffffff 
[  122.761234] x13: ffff80009bffb677 x12: ffff80001bffb67f 
[  122.761237] x11: 0000000000000000 x10: 0000000000000ab0 
[  122.761240] x9 : ffff80001bffba40 x8 : 612d657375203b30 
[  122.761243] x7 : 206e6f206e6f6974 x6 : c0000000ffffefff 
[  122.761246] x5 : ffff14a5ee8d0978 x4 : ffffc989bba37ba8 
[  122.761249] x3 : 0000000000000001 x2 : ffff14a5ee8d0980 
[  122.761251] x1 : 0000000000000000 x0 : 0000000000000000 
[  122.761255] Call trace:
[  122.761258]  refcount_warn_saturate+0x98/0x140
[  122.761263]  kthread_stop+0x4c/0x290
[  122.761269]  vi5_channel_stop_kthreads+0x44/0x60
[  122.761271]  vi5_channel_stop_streaming+0xa8/0xb0
[  122.761275]  tegra_channel_stop_streaming+0x3c/0x70
[  122.761278]  __vb2_queue_cancel+0x40/0x220
[  122.761279]  vb2_core_streamoff+0x34/0xd0
[  122.761282]  vb2_streamoff+0x34/0x80
[  122.761284]  vb2_ioctl_streamoff+0x58/0x70
[  122.761288]  v4l_streamoff+0x40/0x50
[  122.761291]  __video_do_ioctl+0x188/0x400
[  122.761293]  video_usercopy+0x280/0x7e0
[  122.761294]  video_ioctl2+0x40/0x100
[  122.761297]  v4l2_ioctl+0x68/0x90
[  122.761302]  __arm64_sys_ioctl+0xac/0xf0
[  122.761306]  el0_svc_common.constprop.0+0x80/0x1d0
[  122.761308]  do_el0_svc+0x38/0xc0
[  122.761313]  el0_svc+0x1c/0x30
[  122.761315]  el0_sync_handler+0xa8/0xb0
[  122.761318]  el0_sync+0x16c/0x180
[  122.761320] ---[ end trace d0fb20ee26272f16 ]---
[  122.766154] ------------[ cut here ]------------
[  122.766162] WARNING: CPU: 0 PID: 2356 at kernel/kthread.c:83 kthread_stop+0x58/0x290
[  122.774132] Modules linked in: fuse(E) nvidia_modeset(OE) lzo_rle(E) lzo_compress(E) zram(E) ramoops(E) reed_solomon(E) bnep(E) loop(E) nvgpu(E) rtk_btusb(E) snd_soc_tegra186_dspk(E) aes_ce_blk(E) crypto_simd(E) snd_soc_tegra186_asrc(E) rtl8822ce(E) cryptd(E) btusb(E) snd_soc_tegra210_ope(E) snd_soc_tegra210_iqc(E) snd_soc_tegra186_arad(E) snd_soc_tegra210_mvc(E) r8168(E) btrtl(E) aes_ce_cipher(E) snd_soc_tegra210_afc(E) snd_soc_tegra210_adx(E) snd_soc_tegra210_dmic(E) ghash_ce(E) input_leds(E) btbcm(E) snd_soc_tegra210_amx(E) snd_soc_tegra210_admaif(E) sha2_ce(E) snd_soc_tegra210_mixer(E) cfg80211(E) snd_hda_codec_hdmi(E) snd_soc_tegra210_i2s(E) sha256_arm64(E) snd_soc_tegra_pcm(E) snd_soc_tegra210_adsp(E) snd_soc_tegra210_sfc(E) btintel(E) snd_soc_tegra_machine_driver(E) sha1_ce(E) snd_hda_tegra(E) snd_soc_tegra_utils(E) snd_hda_codec(E) nvadsp(E) pwm_fan(E) snd_soc_simple_card_utils(E) snd_soc_spdif_tx(E) snd_soc_tegra210_ahub(E) snd_hda_core(E) ina3221(E) fusb301(E)
[  122.774196]  tegra_bpmp_thermal(E) userspace_alert(E) my-driver(E) tegra210_adma(E) spi_tegra114(E) nvidia(OE) binfmt_misc(E) nvmap(E) ip_tables(E) x_tables(E) [last unloaded: mtd]
[  122.774213] CPU: 0 PID: 2356 Comm: guvcview Tainted: G        W  OE     5.10.192 #2
[  122.774214] Hardware name: NVIDIA Orin Nano Developer Kit (DT)
[  122.774218] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[  122.774220] pc : kthread_stop+0x58/0x290
[  122.774222] lr : kthread_stop+0x4c/0x290
[  122.774223] sp : ffff80001bffba50
[  122.774224] x29: ffff80001bffba50 x28: ffff14a48c87f900 
[  122.774228] x27: 0000000040045613 x26: 0000000000000000 
[  122.774231] x25: ffff80001bffbd08 x24: ffff14a5d88421f8 
[  122.774234] x23: ffff14a4b7450ec0 x22: ffff80001bffbd08 
[  122.774237] x21: ffff14a48c86c9f0 x20: ffff14a5d8842550 
[  122.774240] x19: ffff14a48c86c9c0 x18: 0000000000000010 
[  122.774243] x17: 0000000000000000 x16: ffffc989b9d250f0 
[  122.774246] x15: ffff14a4b7451430 x14: ffffffffffffffff 
[  122.774249] x13: ffff80009bffb677 x12: ffff80001bffb67f 
[  122.774252] x11: 0000000000000000 x10: 0000000000000ab0 
[  122.774255] x9 : ffff80001bffba40 x8 : 612d657375203b30 
[  122.774258] x7 : 206e6f206e6f6974 x6 : c0000000ffffefff 
[  122.774261] x5 : ffff14a5ee8d0978 x4 : ffffc989bba37ba8 
[  122.774264] x3 : 0000000000000001 x2 : ffff14a5ee8d0980 
[  122.774267] x1 : 0000000000000000 x0 : 0000000000408444 
[  122.774271] Call trace:
[  122.774273]  kthread_stop+0x58/0x290
[  122.774277]  vi5_channel_stop_kthreads+0x44/0x60
[  122.774279]  vi5_channel_stop_streaming+0xa8/0xb0
[  122.774282]  tegra_channel_stop_streaming+0x3c/0x70
[  122.774284]  __vb2_queue_cancel+0x40/0x220
[  122.774286]  vb2_core_streamoff+0x34/0xd0
[  122.774288]  vb2_streamoff+0x34/0x80
[  122.774290]  vb2_ioctl_streamoff+0x58/0x70
[  122.774294]  v4l_streamoff+0x40/0x50
[  122.774296]  __video_do_ioctl+0x188/0x400
[  122.774298]  video_usercopy+0x280/0x7e0
[  122.774300]  video_ioctl2+0x40/0x100
[  122.774302]  v4l2_ioctl+0x68/0x90
[  122.774306]  __arm64_sys_ioctl+0xac/0xf0
[  122.774309]  el0_svc_common.constprop.0+0x80/0x1d0
[  122.774312]  do_el0_svc+0x38/0xc0
[  122.774315]  el0_svc+0x1c/0x30
[  122.774317]  el0_sync_handler+0xa8/0xb0
[  122.774319]  el0_sync+0x16c/0x180
[  122.774321] ---[ end trace d0fb20ee26272f17 ]---
[  122.779240] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000
[  122.788391] Mem abort info:
[  122.791357]   ESR = 0x96000004
[  122.794531]   EC = 0x25: DABT (current EL), IL = 32 bits
[  122.800029]   SET = 0, FnV = 0
[  122.803186]   EA = 0, S1PTW = 0
[  122.806430] Data abort info:
[  122.809394]   ISV = 0, ISS = 0x00000004
[  122.813355]   CM = 0, WnR = 0
[  122.816486] user pgtable: 4k pages, 48-bit VAs, pgdp=000000010cdf5000
[  122.823156] [0000000000000000] pgd=0000000000000000, p4d=0000000000000000

Message from syslogd@ubuntu at Sep 26 09:26:46 ...
 kernel:[  122.830201] Internal error: Oops: 96000004 [#1] PREEMPT SMP

Thanks for any help!

Apply the patch from below link to try.

That fixed it! Thanks so much!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.