Hi Minas,
Thanks for your reply. I did some more playing with this, and found that
I can cause kernel oops and reboot even with just one camera and by just
probing it with v4l2-ctl.
for each in `ls -1 /dev/video* /dev/v4l/by-id/* /dev/v4l/by-path/*`; do
echo "scan: $each"
v4l2-ctl --device $each --all | grep "H264" | grep "Pixel Format"
done
scan:
/dev/v4l/by-id/usb-Sonix_Technology_Co.__Ltd._H264_USB_Camera_SN0001-video-index0
Message from syslogd@localhost at Apr 11 06:54:09 ...
kernel:[ 142.777649] Internal error: Oops: 9600004f [#1] PREEMPT SMP
I have attached the regdump output as a file captured just before
running the v4l2-ctl command. Also, this is the output from dmesg --follow:
[ 134.163768] usb 1-1.2: reset high-speed USB device number 3 using dwc2
[ 136.891628] usb 1-1.2: reset high-speed USB device number 3 using dwc2
[ 139.619463] usb 1-1.2: reset high-speed USB device number 3 using dwc2
[ 142.595299] usb 1-1.2: reset high-speed USB device number 3 using dwc2
[ 142.777478] Unable to handle kernel write to read-only memory at
virtual address ffff80007e354ffe
[ 142.777527] Mem abort info:
[ 142.777538] ESR = 0x9600004f
[ 142.777548] Exception class = DABT (current EL), IL = 32 bits
[ 142.777556] SET = 0, FnV = 0
[ 142.777564] EA = 0, S1PTW = 0
[ 142.777571] Data abort info:
[ 142.777579] ISV = 0, ISS = 0x0000004f
[ 142.777594] CM = 0, WnR = 1
[ 142.777609] swapper pgtable: 4k pages, 48-bit VAs, pgdp =
00000000a5dbde96
[ 142.777626] [ffff80007e354ffe] pgd=000000007fffa003,
pud=000000007fe08003, pmd=000000007fc16003, pte=00e000007e354793
[ 142.777649] Internal error: Oops: 9600004f [#1] PREEMPT SMP
I hope this is helpful, thanks for your help!
regards,
Wayne
On 4/5/19 1:56 AM, Minas Harutyunyan wrote:
Hi Wayne,
On 4/4/2019 10:27 PM, Wayne Piekarski wrote:
Hi everyone,
I have three USB H.264 cameras connected to an ODroid-C2 running a
latest Armbian nightly build, with what appears to be kernel 5.0.5.
When trying to access these cameras via V4L, I immediately get a kernel
oops and the device reboots.
It appears as though the problem occurs in
dwc2_unmap_urb_for_dma+0x1c/0x28 which is in drivers/usb/dwc2.
I'm not a kernel developer so not sure what other information I can
provide apart from the oops dump. I can provide other information if needed.
Could you please provide register dump (debugfs: regdump) before start
playing and provide verbose debug log after start playing till oops.
Which is speed of your camera? Did you connected directly to root hub?
Thanks,
Minas
thanks!
[ 204.624452] Internal error: Oops: 9600004f [#1] PREEMPT SMP
[ 204.635515] Modules linked in: snd_soc_hdmi_codec dw_hdmi_i2s_audio
dw_hdmi_cec meson_vdec uvcvideo videobuf2_dma_contig videobuf2_vmalloc
v4l2_mem2mem videobuf2_memops lz4hc videobuf2_v4l2 lz4hc_compress ao_cec
videobuf2_common meson_dw_hdmi meson_rng meson_ir dw_hdmi meson_drm
rng_core rc_core videodev drm_kms_helper cec snd_soc_meson_aiu_spdif
snd_soc_meson_aiu_i2s drm media meson_canvas snd_soc_meson_audio_core
meson_gxbb_wdt drm_panel_orientation_quirks zram snd_usb_audio
snd_soc_simple_card snd_hwdep snd_usbmidi_lib snd_soc_simple_card_utils
snd_soc_core snd_rawmidi snd_seq_device snd_pcm_dmaengine snd_pcm
snd_timer snd scpi_hwmon soundcore ip_tables x_tables realtek
[ 204.728202] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G W
5.0.5-meson64 #5.77.190401
[ 204.745037] Hardware name: Hardkernel ODROID-C2 (DT)
[ 204.758748] pstate: 80000005 (Nzcv daif -PAN -UAO)
[ 204.772475] pc : __memcpy+0xa0/0x180
[ 204.786168] lr : dwc2_free_dma_aligned_buffer+0x78/0x80
[ 204.799988] sp : ffff000010013da0
[ 204.813726] x29: ffff000010013da0 x28: 0000000000000000
[ 204.827504] x27: 0000000000000038 x26: ffff000010e960c0
[ 204.841198] x25: 0000000000000101 x24: 0000000000000020
[ 204.854820] x23: ffff000010e9d000 x22: ffff80006b378594
[ 204.868394] x21: 0000000000000000 x20: ffff80006a124f79
[ 204.881902] x19: ffff80007e6f1800 x18: 000000000098090c
[ 204.895494] x17: 0000000000000000 x16: 0000000000000000
[ 204.909050] x15: 000000000000014d x14: 0000000000000400
[ 204.922531] x13: 0000000000000000 x12: 0000000000000001
[ 204.935862] x11: 000000000047f7f9 x10: 0000000000000040
[ 204.948999] x9 : 0000000000000002 x8 : ffff000010eb82a0
[ 204.962085] x7 : 0000000000000002 x6 : ffff80006a124f79
[ 204.975122] x5 : 0000000000000000 x4 : 0000000000800200
[ 204.988041] x3 : 00000000000001f4 x2 : 0000000000000002
[ 205.000822] x1 : ffff80007edbf202 x0 : ffff80006a124f79
[ 205.013627] Process swapper/2 (pid: 0, stack limit = 0x0000000035e14788)
[ 205.027581] Call trace:
[ 205.040442] __memcpy+0xa0/0x180
[ 205.053332] dwc2_unmap_urb_for_dma+0x1c/0x28
[ 205.066319] unmap_urb_for_dma+0x18/0x28
[ 205.079213] __usb_hcd_giveback_urb+0x38/0xe0
[ 205.092009] usb_giveback_urb_bh+0xac/0x108
[ 205.104753] tasklet_action_common.isra.2+0x7c/0x168
[ 205.117479] tasklet_action+0x24/0x30
[ 205.130030] __do_softirq+0x10c/0x220
[ 205.142521] irq_exit+0xac/0xc0
[ 205.154950] __handle_domain_irq+0x60/0xb0
[ 205.167376] gic_handle_irq+0x58/0xa8
[ 205.179784] el1_irq+0xb0/0x128
[ 205.192121] arch_cpu_idle+0x10/0x18
[ 205.204478] do_idle+0x1dc/0x2a0
[ 205.216787] cpu_startup_entry+0x24/0x28
[ 205.229051] secondary_start_kernel+0x19c/0x1d8
[ 205.241263] Code: b8404423 b80044c3 36080062 78402423 (780024c3)
[ 205.253985] ---[ end trace 156b59abcb22f143 ]---
[ 205.266298] Kernel panic - not syncing: Fatal exception in interrupt
[ 205.279479] SMP: stopping secondary CPUs
[ 205.291947] Kernel Offset: disabled
[ 205.304384] CPU features: 0x002,24002004
[ 205.316867] Memory Limit: none
[ 205.329314] Rebooting in 10 seconds..
$ sudo cat /sys/kernel/debug/c9100000.usb/regdump
GOTGCTL = 0x02200000
GOTGINT = 0x00000000
GAHBCFG = 0x0000002b
GUSBCFG = 0x0000140f
GRSTCTL = 0x80000000
GINTSTS = 0x04000029
GINTMSK = 0xf3000006
GRXSTSR = 0x000f0041
GRXFSIZ = 0x00000200
GNPTXFSIZ = 0x01f40200
GNPTXSTS = 0x080801f4
GI2CCTL = 0x00000000
GPVNDCTL = 0x00000000
GGPIO = 0x00000000
GUID = 0x12345678
GSNPSID = 0x4f54310a
GHWCFG1 = 0x00000000
GHWCFG2 = 0x228fc855
GHWCFG3 = 0x07c05068
GHWCFG4 = 0xc9e04030
GLPMCFG = 0x00000000
GPWRDN = 0x08000010
GDFIFOCFG = 0x07c00800
ADPCTL = 0x00000000
HPTXFSIZ = 0x01f403f4
DPTXFSIZN(1) = 0x00000000
DPTXFSIZN(2) = 0x00000000
DPTXFSIZN(3) = 0x00000000
DPTXFSIZN(4) = 0x00000000
DPTXFSIZN(5) = 0x00000000
DPTXFSIZN(6) = 0x00000000
DPTXFSIZN(7) = 0x00000000
DPTXFSIZN(8) = 0x00000000
DPTXFSIZN(9) = 0x00000000
DPTXFSIZN(10) = 0x00000000
DPTXFSIZN(11) = 0x00000000
DPTXFSIZN(12) = 0x00000000
DPTXFSIZN(13) = 0x00000000
DPTXFSIZN(14) = 0x00000000
DPTXFSIZN(15) = 0x00000000
DCFG = 0x00000000
DCTL = 0x00000000
DSTS = 0x00000000
DIEPMSK = 0x00000000
DOEPMSK = 0x00000000
DAINT = 0x00000000
DAINTMSK = 0x00000000
DTKNQR1 = 0x00000000
DTKNQR2 = 0x00000000
DTKNQR3 = 0x00000000
DTKNQR4 = 0x00000000
DVBUSDIS = 0x00010ea5
DVBUSPULSE = 0x000002c6
DIEPCTL(0) = 0x00900040
DIEPCTL(1) = 0x00908040
DIEPCTL(2) = 0x00900040
DIEPCTL(3) = 0x00900040
DIEPCTL(4) = 0x00908040
DIEPCTL(5) = 0x00900040
DIEPCTL(6) = 0x00900040
DIEPCTL(7) = 0x00900040
DIEPCTL(8) = 0x00908040
DIEPCTL(9) = 0x00908040
DIEPCTL(10) = 0x00908040
DIEPCTL(11) = 0x00900040
DIEPCTL(12) = 0x00908040
DIEPCTL(13) = 0x00900040
DIEPCTL(14) = 0x00900040
DIEPCTL(15) = 0x00900040
DOEPCTL(0) = 0x00900040
DOEPCTL(1) = 0x00908040
DOEPCTL(2) = 0x00900040
DOEPCTL(3) = 0x00900040
DOEPCTL(4) = 0x00908040
DOEPCTL(5) = 0x00900040
DOEPCTL(6) = 0x00900040
DOEPCTL(7) = 0x00900040
DOEPCTL(8) = 0x00908040
DOEPCTL(9) = 0x00908040
DOEPCTL(10) = 0x00908040
DOEPCTL(11) = 0x00900040
DOEPCTL(12) = 0x00908040
DOEPCTL(13) = 0x00900040
DOEPCTL(14) = 0x00900040
DOEPCTL(15) = 0x00900040
DIEPINT(0) = 0x00000080
DIEPINT(1) = 0x00000000
DIEPINT(2) = 0x00000000
DIEPINT(3) = 0x00000000
DIEPINT(4) = 0x00000000
DIEPINT(5) = 0x00000000
DIEPINT(6) = 0x00000000
DIEPINT(7) = 0x00000000
DIEPINT(8) = 0x00000000
DIEPINT(9) = 0x00000000
DIEPINT(10) = 0x00000000
DIEPINT(11) = 0x00000000
DIEPINT(12) = 0x00000000
DIEPINT(13) = 0x00000000
DIEPINT(14) = 0x00000000
DIEPINT(15) = 0x00000000
DOEPINT(0) = 0x00000000
DOEPINT(1) = 0x00000000
DOEPINT(2) = 0x00000000
DOEPINT(3) = 0x00000000
DOEPINT(4) = 0x00000000
DOEPINT(5) = 0x00000000
DOEPINT(6) = 0x00000000
DOEPINT(7) = 0x00000000
DOEPINT(8) = 0x00000000
DOEPINT(9) = 0x00000000
DOEPINT(10) = 0x00000000
DOEPINT(11) = 0x00000000
DOEPINT(12) = 0x00000000
DOEPINT(13) = 0x00000000
DOEPINT(14) = 0x00000000
DOEPINT(15) = 0x00000000
DIEPTSIZ(0) = 0x00000000
DIEPTSIZ(1) = 0x8000003c
DIEPTSIZ(2) = 0x20000008
DIEPTSIZ(3) = 0x20000008
DIEPTSIZ(4) = 0x8000003c
DIEPTSIZ(5) = 0x00000000
DIEPTSIZ(6) = 0x00000000
DIEPTSIZ(7) = 0x20000008
DIEPTSIZ(8) = 0x80000040
DIEPTSIZ(9) = 0x8000003c
DIEPTSIZ(10) = 0x80000040
DIEPTSIZ(11) = 0x20000008
DIEPTSIZ(12) = 0x8000003c
DIEPTSIZ(13) = 0x00000000
DIEPTSIZ(14) = 0x20000008
DIEPTSIZ(15) = 0x20000008
DOEPTSIZ(0) = 0x00000000
DOEPTSIZ(1) = 0x8000003c
DOEPTSIZ(2) = 0x20000008
DOEPTSIZ(3) = 0x20000008
DOEPTSIZ(4) = 0x8000003c
DOEPTSIZ(5) = 0x00000000
DOEPTSIZ(6) = 0x00000000
DOEPTSIZ(7) = 0x20000008
DOEPTSIZ(8) = 0x80000040
DOEPTSIZ(9) = 0x8000003c
DOEPTSIZ(10) = 0x80000040
DOEPTSIZ(11) = 0x20000008
DOEPTSIZ(12) = 0x8000003c
DOEPTSIZ(13) = 0x00000000
DOEPTSIZ(14) = 0x20000008
DOEPTSIZ(15) = 0x20000008
DIEPDMA(0) = 0x6d881000
DIEPDMA(1) = 0x7ec00f84
DIEPDMA(2) = 0x7eaa7008
DIEPDMA(3) = 0x7eaa7008
DIEPDMA(4) = 0x7ec00f84
DIEPDMA(5) = 0x6d881000
DIEPDMA(6) = 0x6d881000
DIEPDMA(7) = 0x7eaa7008
DIEPDMA(8) = 0x6d881000
DIEPDMA(9) = 0x7ec00f84
DIEPDMA(10) = 0x6d881000
DIEPDMA(11) = 0x7eaa7008
DIEPDMA(12) = 0x7ec00f84
DIEPDMA(13) = 0x6d881000
DIEPDMA(14) = 0x7eaa7008
DIEPDMA(15) = 0x7eaa7008
DOEPDMA(0) = 0x6d881000
DOEPDMA(1) = 0x7ec00f84
DOEPDMA(2) = 0x7eaa7008
DOEPDMA(3) = 0x7eaa7008
DOEPDMA(4) = 0x7ec00f84
DOEPDMA(5) = 0x6d881000
DOEPDMA(6) = 0x6d881000
DOEPDMA(7) = 0x7eaa7008
DOEPDMA(8) = 0x6d881000
DOEPDMA(9) = 0x7ec00f84
DOEPDMA(10) = 0x6d881000
DOEPDMA(11) = 0x7eaa7008
DOEPDMA(12) = 0x7ec00f84
DOEPDMA(13) = 0x6d881000
DOEPDMA(14) = 0x7eaa7008
DOEPDMA(15) = 0x7eaa7008
DTXFSTS(0) = 0x00000000
DTXFSTS(1) = 0x00000000
DTXFSTS(2) = 0x00000000
DTXFSTS(3) = 0x00000000
DTXFSTS(4) = 0x00000000
DTXFSTS(5) = 0x00000000
DTXFSTS(6) = 0x00000000
DTXFSTS(7) = 0x00000000
DTXFSTS(8) = 0x00000000
DTXFSTS(9) = 0x00000000
DTXFSTS(10) = 0x00000000
DTXFSTS(11) = 0x00000000
DTXFSTS(12) = 0x00000000
DTXFSTS(13) = 0x00000000
DTXFSTS(14) = 0x00000000
DTXFSTS(15) = 0x00000000
PCGCTL = 0x00000000
HCFG = 0x00000200
HFIR = 0x00010ea5
HFNUM = 0x083d3729
HPTXSTS = 0x530801f4
HAINT = 0x00000000
HAINTMSK = 0x00000000
HFLBADDR = 0x00000000
HPRT0 = 0x00001005
HCCHAR(0) = 0x00900040
HCCHAR(1) = 0x00908040
HCCHAR(2) = 0x00900040
HCCHAR(3) = 0x00900040
HCCHAR(4) = 0x00908040
HCCHAR(5) = 0x00900040
HCCHAR(6) = 0x00900040
HCCHAR(7) = 0x00900040
HCCHAR(8) = 0x00908040
HCCHAR(9) = 0x00908040
HCCHAR(10) = 0x00908040
HCCHAR(11) = 0x00900040
HCCHAR(12) = 0x00908040
HCCHAR(13) = 0x00900040
HCCHAR(14) = 0x00900040
HCCHAR(15) = 0x00900040
HCSPLT(0) = 0x00000000
HCSPLT(1) = 0x00000000
HCSPLT(2) = 0x00000000
HCSPLT(3) = 0x00000000
HCSPLT(4) = 0x00000000
HCSPLT(5) = 0x00000000
HCSPLT(6) = 0x00000000
HCSPLT(7) = 0x00000000
HCSPLT(8) = 0x00000000
HCSPLT(9) = 0x00000000
HCSPLT(10) = 0x00000000
HCSPLT(11) = 0x00000000
HCSPLT(12) = 0x00000000
HCSPLT(13) = 0x00000000
HCSPLT(14) = 0x00000000
HCSPLT(15) = 0x00000000
HCINT(0) = 0x00000000
HCINT(1) = 0x00000000
HCINT(2) = 0x00000000
HCINT(3) = 0x00000000
HCINT(4) = 0x00000000
HCINT(5) = 0x00000000
HCINT(6) = 0x00000000
HCINT(7) = 0x00000000
HCINT(8) = 0x00000000
HCINT(9) = 0x00000000
HCINT(10) = 0x00000000
HCINT(11) = 0x00000000
HCINT(12) = 0x00000000
HCINT(13) = 0x00000000
HCINT(14) = 0x00000000
HCINT(15) = 0x00000000
HCINTMSK(0) = 0x00000000
HCINTMSK(1) = 0x00000000
HCINTMSK(2) = 0x00000000
HCINTMSK(3) = 0x00000000
HCINTMSK(4) = 0x00000000
HCINTMSK(5) = 0x00000000
HCINTMSK(6) = 0x00000000
HCINTMSK(7) = 0x00000000
HCINTMSK(8) = 0x00000000
HCINTMSK(9) = 0x00000000
HCINTMSK(10) = 0x00000000
HCINTMSK(11) = 0x00000000
HCINTMSK(12) = 0x00000000
HCINTMSK(13) = 0x00000000
HCINTMSK(14) = 0x00000000
HCINTMSK(15) = 0x00000000
HCTSIZ(0) = 0x00000000
HCTSIZ(1) = 0x8000003c
HCTSIZ(2) = 0x20000008
HCTSIZ(3) = 0x20000008
HCTSIZ(4) = 0x8000003c
HCTSIZ(5) = 0x00000000
HCTSIZ(6) = 0x00000000
HCTSIZ(7) = 0x20000008
HCTSIZ(8) = 0x80000040
HCTSIZ(9) = 0x8000003c
HCTSIZ(10) = 0x80000040
HCTSIZ(11) = 0x20000008
HCTSIZ(12) = 0x8000003c
HCTSIZ(13) = 0x00000000
HCTSIZ(14) = 0x20000008
HCTSIZ(15) = 0x20000008
HCDMA(0) = 0x6d881000
HCDMA(1) = 0x7ec00f84
HCDMA(2) = 0x7eaa7008
HCDMA(3) = 0x7eaa7008
HCDMA(4) = 0x7ec00f84
HCDMA(5) = 0x6d881000
HCDMA(6) = 0x6d881000
HCDMA(7) = 0x7eaa7008
HCDMA(8) = 0x6d881000
HCDMA(9) = 0x7ec00f84
HCDMA(10) = 0x6d881000
HCDMA(11) = 0x7eaa7008
HCDMA(12) = 0x7ec00f84
HCDMA(13) = 0x6d881000
HCDMA(14) = 0x7eaa7008
HCDMA(15) = 0x7eaa7008
HCDMAB(0) = 0x7eaa7008
HCDMAB(1) = 0x7eaa7008
HCDMAB(2) = 0x7eaa7008
HCDMAB(3) = 0x7eaa7008
HCDMAB(4) = 0x7eaa7008
HCDMAB(5) = 0x7eaa7008
HCDMAB(6) = 0x7eaa7008
HCDMAB(7) = 0x7eaa7008
HCDMAB(8) = 0x7eaa7008
HCDMAB(9) = 0x7eaa7008
HCDMAB(10) = 0x7eaa7008
HCDMAB(11) = 0x7eaa7008
HCDMAB(12) = 0x7eaa7008
HCDMAB(13) = 0x7eaa7008
HCDMAB(14) = 0x7eaa7008
HCDMAB(15) = 0x7eaa7008