Let's have UTV007 (Fushicai) based USB video grabber (e.g. this )
Use the kernel V4L2 driver 'usbtv' from the default kernel
Assume the UTV007 device is /dev/video0
Open the /dev/video0 in VLC (or any other tool using the V4L usbtv driver; actually it is enough to cat /dev/video0>/dev/null)
What happens:
The system becomes unresponsive and later freezes completely.
The following log is found in the /var/log/syslog:
[ 491.108750] INFO: rcu_sched self-detected stall on CPU
[ 491.109524] 2-...: (1 GPs behind) idle=b82/140000000000002/0 softirq=19961/19962 fqs=4050
[ 491.109601] (t=21000 jiffies g=6765 c=6764 q=265)
[ 491.110023] NMI backtrace for cpu 2
[ 491.110328] CPU: 2 PID: 2077 Comm: kworker/2:0 Not tainted 4.14.65-sunxi #68
[ 491.110464] Hardware name: Allwinner sun8i Family
[ 491.110888] Workqueue: events dbs_work_handler
[ 491.111689] [<c010dacd>] (unwind_backtrace) from [<c010a0b5>] (show_stack+0x11/0x14)
[ 491.112147] [<c010a0b5>] (show_stack) from [<c086b7fd>] (dump_stack+0x69/0x78)
[ 491.112612] [<c086b7fd>] (dump_stack) from [<c086f5ef>] (nmi_cpu_backtrace+0xd3/0xd4)
[ 491.113015] [<c086f5ef>] (nmi_cpu_backtrace) from [<c086f67d>] (nmi_trigger_cpumask_backtrace+0x8d/0xc4)
[ 491.113505] [<c086f67d>] (nmi_trigger_cpumask_backtrace) from [<c01663c5>] (rcu_dump_cpu_stacks+0x77/0x96)
[ 491.113952] [<c01663c5>] (rcu_dump_cpu_stacks) from [<c0165b85>] (rcu_check_callbacks+0x4d5/0x690)
[ 491.114476] [<c0165b85>] (rcu_check_callbacks) from [<c016a203>] (update_process_times+0x2b/0x48)
[ 491.114974] [<c016a203>] (update_process_times) from [<c0178001>] (tick_sched_timer+0x31/0x68)
[ 491.115425] [<c0178001>] (tick_sched_timer) from [<c016af8d>] (__hrtimer_run_queues+0xf5/0x224)
[ 491.115812] [<c016af8d>] (__hrtimer_run_queues) from [<c016b289>] (hrtimer_interrupt+0x81/0x180)
[ 491.116293] [<c016b289>] (hrtimer_interrupt) from [<c074aae1>] (arch_timer_handler_phys+0x25/0x28)
[ 491.116793] [<c074aae1>] (arch_timer_handler_phys) from [<c015d637>] (handle_percpu_devid_irq+0x57/0x19c)
[ 491.117282] [<c015d637>] (handle_percpu_devid_irq) from [<c0159b4d>] (generic_handle_irq+0x1d/0x28)
[ 491.117795] [<c0159b4d>] (generic_handle_irq) from [<c0159f5d>] (__handle_domain_irq+0x45/0x84)
[ 491.118243] [<c0159f5d>] (__handle_domain_irq) from [<c01013b5>] (gic_handle_irq+0x39/0x68)
[ 491.118619] [<c01013b5>] (gic_handle_irq) from [<c010a9e5>] (__irq_svc+0x65/0x94)
[ 491.118786] Exception stack(0xee5a5c70 to 0xee5a5cb8)
[ 491.119081] 5c60: 00000000 40070193 9cb0c842 9cb0c842
[ 491.119463] 5c80: c9c45900 60070113 00000000 00000000 c987acdc c0d03f48 c0d02080 4000001f
[ 491.119771] 5ca0: 2ea10000 ee5a5cc0 c06cd097 c06b8fee 60070133 ffffffff
[ 491.120267] [<c010a9e5>] (__irq_svc) from [<c06b8fee>] (__usb_hcd_giveback_urb+0x5a/0xc0)
[ 491.120731] [<c06b8fee>] (__usb_hcd_giveback_urb) from [<c06b90cb>] (usb_giveback_urb_bh+0x77/0xb8)
[ 491.121242] [<c06b90cb>] (usb_giveback_urb_bh) from [<c011f231>] (tasklet_hi_action+0x3d/0x9c)
[ 491.121695] [<c011f231>] (tasklet_hi_action) from [<c01014a1>] (__do_softirq+0xb9/0x25c)
[ 491.122104] [<c01014a1>] (__do_softirq) from [<c011ef01>] (irq_exit+0x99/0xf0)
[ 491.122577] [<c011ef01>] (irq_exit) from [<c0159f61>] (__handle_domain_irq+0x49/0x84)
[ 491.122994] [<c0159f61>] (__handle_domain_irq) from [<c01013b5>] (gic_handle_irq+0x39/0x68)
[ 491.123362] [<c01013b5>] (gic_handle_irq) from [<c010a9e5>] (__irq_svc+0x65/0x94)
[ 491.123535] Exception stack(0xee5a5db0 to 0xee5a5df8)
[ 491.123793] 5da0: 00000000 00000000 9cb0c842 c05ccd11
[ 491.124174] 5dc0: ef003480 00000000 016e3600 1c9c3800 ffffe000 c9cf6100 ef003300 c0d03f6c
[ 491.124481] 5de0: 00000078 ee5a5e00 c016aa75 c05c57d2 60070033 ffffffff
[ 491.124946] [<c010a9e5>] (__irq_svc) from [<c05c57d2>] (clk_change_rate+0xa6/0x2b0)
[ 491.125474] [<c05c57d2>] (clk_change_rate) from [<c05c5c37>] (clk_core_set_rate_nolock+0x3f/0x68)
[ 491.125942] [<c05c5c37>] (clk_core_set_rate_nolock) from [<c05c5c7b>] (clk_set_rate+0x1b/0x24)
[ 491.126489] [<c05c5c7b>] (clk_set_rate) from [<c063b3b3>] (dev_pm_opp_set_rate+0x12f/0x28c)
[ 491.127065] [<c063b3b3>] (dev_pm_opp_set_rate) from [<c0731fdb>] (__cpufreq_driver_target+0x123/0x364)
[ 491.127511] [<c0731fdb>] (__cpufreq_driver_target) from [<c073500b>] (od_dbs_update+0x8f/0x108)
[ 491.127885] [<c073500b>] (od_dbs_update) from [<c0735871>] (dbs_work_handler+0x29/0x50)
[ 491.128334] [<c0735871>] (dbs_work_handler) from [<c012d4d1>] (process_one_work+0x155/0x37c)
[ 491.128760] [<c012d4d1>] (process_one_work) from [<c012e073>] (worker_thread+0xff/0x408)
[ 491.129213] [<c012e073>] (worker_thread) from [<c0131b3d>] (kthread+0xfd/0x104)
[ 491.129699] [<c0131b3d>] (kthread) from [<c01066f9>] (ret_from_fork+0x11/0x38)
[ 491.132532] hrtimer: interrupt took 24317996 ns
[ 499.171529] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.336672] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.438560] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.463659] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.484783] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.504574] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.522563] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.538389] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.552215] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.564230] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.575130] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.583608] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.592606] usbtv 4-1:1.0: Could not resubmit ISO URB
[ 499.604653] usbtv 4-1:1.0: Could not resubmit ISO URB
The process using the /dev/video0 starts to eat all system resources 390%load (on 4 cpu system) before the log message appears.
What is expected:
The system should process the video with average load approx 30% (tested with other USB grabbers and USB cameras).
System info
uname -a
Linux orangepipc 4.14.65-sunxi #68 SMP Tue Aug 21 19:57:06 CEST 2018 armv7l armv7l armv7l GNU/Linux
cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 61.71
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 61.71
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 2
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 61.71
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 3
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 61.71
Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : Allwinner sun8i Family
Revision : 0000
Serial : 02c0008179908356
- lsusb
Bus 008 Device 002: ID 1bcf:05cf Sunplus Innovation Technology Inc. Micro keyboard & mouse receiver
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 005: ID 1b71:3002 Fushicai USBTV007 Video Grabber [EasyCAP]
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
[ 4993.686404] usb 4-1: New USB device found, idVendor=1b71, idProduct=3002
[ 4993.686424] usb 4-1: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[ 4993.686435] usb 4-1: Product: usbtv007
[ 4993.686446] usb 4-1: Manufacturer: fushicai
[ 4993.686458] usb 4-1: SerialNumber: 300000000002
[ 4993.689798] usbtv 4-1:1.0: Fushicai USBTV007 Audio-Video Grabber
Should this be wrong place to report such bug, please let me know.
I also opened discussion [topic](https://forum.armbian.com/topic/8155-orangepi-pc-h3-usbtv-kernel-driver-causes-complete-system-freeze-on-armbian-orangepi-pc-kernel-414/?tab=comments#comment-61509) at the Armbian forum
UsbTV kernel driver causes complete system freeze on Armbian OrangePi PC kernel 4.14
How to reproduce:
cat /dev/video0>/dev/null
)What happens: The system becomes unresponsive and later freezes completely. The following log is found in the /var/log/syslog:
The process using the /dev/video0 starts to eat all system resources 390%load (on 4 cpu system) before the log message appears.
What is expected: The system should process the video with average load approx 30% (tested with other USB grabbers and USB cameras).
System info
Linux orangepipc 4.14.65-sunxi #68 SMP Tue Aug 21 19:57:06 CEST 2018 armv7l armv7l armv7l GNU/Linux
processor : 1 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 61.71 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
processor : 2 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 61.71 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
processor : 3 model name : ARMv7 Processor rev 5 (v7l) BogoMIPS : 61.71 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x0 CPU part : 0xc07 CPU revision : 5
Hardware : Allwinner sun8i Family Revision : 0000 Serial : 02c0008179908356
Bus 008 Device 002: ID 1bcf:05cf Sunplus Innovation Technology Inc. Micro keyboard & mouse receiver Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 005: ID 1b71:3002 Fushicai USBTV007 Video Grabber [EasyCAP] Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 006 Device 002: ID 1a86:7523 QinHeng Electronics HL-340 USB-Serial adapter Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 009 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
filename: /lib/modules/4.14.65-sunxi/kernel/drivers/media/usb/usbtv/usbtv.ko license: Dual BSD/GPL description: Fushicai USBTV007 Audio-Video Grabber Driver author: Lubomir Rintel, Federico Simoncelli alias: usb:v1F71p3301ddcdscdpiciscipin alias: usb:v1B71p3002ddcdscdpiciscipin depends: videobuf2-v4l2,snd-pcm,videobuf2-vmalloc,videobuf2-core,snd intree: Y name: usbtv vermagic: 4.14.65-sunxi SMP mod_unload ARMv7 thumb2 p2v8
[ 4993.686404] usb 4-1: New USB device found, idVendor=1b71, idProduct=3002 [ 4993.686424] usb 4-1: New USB device strings: Mfr=3, Product=4, SerialNumber=2 [ 4993.686435] usb 4-1: Product: usbtv007 [ 4993.686446] usb 4-1: Manufacturer: fushicai [ 4993.686458] usb 4-1: SerialNumber: 300000000002 [ 4993.689798] usbtv 4-1:1.0: Fushicai USBTV007 Audio-Video Grabber