[Bug 1114385] New: raspberry pi 3: leap 15 kernel freeze when multiple /dev/ttyUSBx devices get opened
http://bugzilla.suse.com/show_bug.cgi?id=1114385 Bug ID: 1114385 Summary: raspberry pi 3: leap 15 kernel freeze when multiple /dev/ttyUSBx devices get opened Classification: openSUSE Product: openSUSE Distribution Version: Leap 15.0 Hardware: Other OS: Other Status: NEW Severity: Normal Priority: P5 - None Component: Kernel Assignee: kernel-maintainers@forge.provo.novell.com Reporter: abergmann@suse.com QA Contact: qa-bugs@suse.de Found By: --- Blocker: --- I came across a strange problem in openSUSE Leap 15.0 on a Raspberry Pi 3 B+. The system freezes when I open two /dev/ttyUSBx devices. This problem is fixed within the current Tumbleweed Raspberry Pi 3 aarch64 release. Kernel: 4.12.14-lp150.12.22-default How to reproduce: 1. Connect two USB serial adapters to the system. 2. Open the first device inside a terminal. #> cat /dev/ttyUSB0 3. Open the second device inside another terminal. #> cat /dev/ttyUSB1 Result: System freezes. I'm not sure if the following points to the cause of this problem, but it happened during one of the freezes. [ 7992.034984] NMI watchdog: BUG: soft lockup - CPU#0 stuck for 23s! [swapper/0:0] [ 7992.034999] Modules linked in: xt_nat xt_tcpudp veth ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter ip_tables xt_conntrack x_tables nf_nat nf_conntrack libcrc32c br_netfilter bridge stp llc overlay af_packet vc4 brcmfmac snd_soc_core ac97_bus snd_pcm_dmaengine snd_pcm snd_timer brcmutil snd cfg80211 ftdi_sio soundcore drm_kms_helper nls_iso8859_1 rfkill fb_ili9341(C) nls_cp437 vfat fat drm usbserial joydev smsc95xx usbnet fbtft(C) mii drm_panel_orientation_quirks fb_sys_fops syscopyarea ads7846 sysfillrect sysimgblt raspberrypi_hwmon spi_bcm2835 vchiq(C) bcm2835_thermal bcm2835_wdt bcm2835_rng crc32_ce uio_pdrv_genirq uio leds_gpio mmc_block dwc2 i2c_bcm2835 sdhci_iproc sdhci_pltfm [ 7992.035218] usbcore sdhci bcm2835 mmc_core bcm2835_dma phy_generic fixed sg efivarfs [ 7992.035257] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G C 4.12.14-lp150.12.22-default #1 openSUSE Leap 15.0 [ 7992.035261] Hardware name: raspberrypi rpi/rpi, BIOS 2018.03 04/12/2018 [ 7992.035267] task: ffff000008e82a00 task.stack: ffff000008e70000 [ 7992.035466] PC is at usb_hcd_unmap_urb_for_dma+0xd0/0x148 [usbcore] [ 7992.035642] LR is at usb_hcd_unmap_urb_for_dma+0x28/0x148 [usbcore] [ 7992.035648] pc : [<ffff000000a047e0>] lr : [<ffff000000a04738>] pstate: 20000005 [ 7992.035651] sp : ffff80003df4bb60 [ 7992.035655] x29: ffff80003df4bb60 x28: 0000000000000040 [ 7992.035664] x27: 0000000000000007 x26: ffff000008e761b0 [ 7992.035673] x25: ffff000008e76180 x24: ffff000008e5d018 [ 7992.035682] x23: 0000000000000006 x22: 0000000000000000 [ 7992.035691] x21: ffff80002c24e800 x20: ffff80002c24e800 [ 7992.035700] x19: ffff80002c3b9600 x18: 0000000000000000 [ 7992.035709] x17: 0000000000000002 x16: 0000000000000000 [ 7992.035717] x15: 000000000000000c x14: ffff80002c0da400 [ 7992.035726] x13: ffff80002c0da900 x12: ffff80002c0daf00 [ 7992.035735] x11: 0000000000000003 x10: 0000000000000200 [ 7992.035743] x9 : 0000000000000000 x8 : ffff80003b66f200 [ 7992.035752] x7 : 0000000000000000 x6 : 000000000000003f [ 7992.035760] x5 : 0000000000000040 x4 : 0000000000010200 [ 7992.035769] x3 : 0000000000000002 x2 : 0000000000010200 [ 7992.035777] x1 : ffff80002c3b9600 x0 : ffff000000a04738 [ 7992.035787] Call trace: [ 7992.035795] Exception stack(0xffff80003df4ba20 to 0xffff80003df4bb60) [ 7992.035803] ba20: ffff000000a04738 ffff80002c3b9600 0000000000010200 0000000000000002 [ 7992.035811] ba40: 0000000000010200 0000000000000040 000000000000003f 0000000000000000 [ 7992.035819] ba60: ffff80003b66f200 0000000000000000 0000000000000200 0000000000000003 [ 7992.035827] ba80: ffff80002c0daf00 ffff80002c0da900 ffff80002c0da400 000000000000000c [ 7992.035835] baa0: 0000000000000000 0000000000000002 0000000000000000 ffff80002c3b9600 [ 7992.035842] bac0: ffff80002c24e800 ffff80002c24e800 0000000000000000 0000000000000006 [ 7992.035850] bae0: ffff000008e5d018 ffff000008e76180 ffff000008e761b0 0000000000000007 [ 7992.035858] bb00: 0000000000000040 ffff80003df4bb60 ffff000000a04738 ffff80003df4bb60 [ 7992.035866] bb20: ffff000000a047e0 0000000020000005 0000000000000000 ffff80002c24e800 [ 7992.035874] bb40: 0000ffffffffffff ffff000000a04738 ffff80003df4bb60 ffff000000a047e0 [ 7992.036052] [<ffff000000a047e0>] usb_hcd_unmap_urb_for_dma+0xd0/0x148 [usbcore] [ 7992.036129] [<ffff000000a9b3e0>] dwc2_unmap_urb_for_dma+0x28/0x40 [dwc2] [ 7992.036307] [<ffff000000a0488c>] unmap_urb_for_dma+0x34/0x48 [usbcore] [ 7992.036483] [<ffff000000a04978>] __usb_hcd_giveback_urb+0x40/0x158 [usbcore] [ 7992.036660] [<ffff000000a04b30>] usb_giveback_urb_bh+0xa0/0xe8 [usbcore] [ 7992.036675] [<ffff0000080dc534>] tasklet_action+0x74/0x110 [ 7992.036685] [<ffff000008081a28>] __do_softirq+0x130/0x334 [ 7992.036695] [<ffff0000080dbf88>] irq_exit+0xc0/0xf0 [ 7992.036706] [<ffff00000813e59c>] __handle_domain_irq+0x6c/0xc0 [ 7992.036714] [<ffff0000080815e0>] bcm2836_arm_irqchip_handle_irq+0x78/0xd8 [ 7992.036720] Exception stack(0xffff000008e73de0 to 0xffff000008e73f20) [ 7992.036728] 3de0: 00000001000bb233 0000000000000080 00000000000003e8 ffff0000087a67f8 [ 7992.036736] 3e00: 0000000004ea4a8c 00ffffffffffffff 00000023b0c50175 0000000000000002 [ 7992.036744] 3e20: ffff000008e84450 ffff000008e73e90 00000000000019f0 0000000000000003 [ 7992.036751] 3e40: 0000000000000003 ffff000008962fe8 0000000000000000 000000000000000c [ 7992.036759] 3e60: 0000000000000000 000000000000000e 0000000000000000 00000000000000bd [ 7992.036767] 3e80: 0000000000000000 ffff000008ff9000 ffff000008e79000 ffff80003dfff400 [ 7992.036775] 3ea0: ffff000008d9f028 000000003ca05000 000000003c9840c0 0000000000000000 [ 7992.036783] 3ec0: 0000000000ce0018 ffff000008e73f20 ffff00000816ec78 ffff000008e73f20 [ 7992.036791] 3ee0: ffff00000816ec7c 0000000020000005 000000003ca05000 000000003c9840c0 [ 7992.036799] 3f00: ffffffffffffffff 0000000000ce0018 ffff000008e73f20 ffff00000816ec7c [ 7992.036807] [<ffff0000080830b0>] el1_irq+0xb0/0x140 [ 7992.036818] [<ffff00000816ec7c>] tick_nohz_idle_enter+0x3c/0x48 [ 7992.036826] [<ffff000008121e68>] do_idle+0x28/0x1f8 [ 7992.036833] [<ffff0000081221e4>] cpu_startup_entry+0x2c/0x30 [ 7992.036843] [<ffff00000892eecc>] rest_init+0x74/0x80 [ 7992.036854] [<ffff000008ce0d68>] start_kernel+0x3c0/0x3d4 -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Takashi Iwai
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c1
--- Comment #1 from Nicolas Patricio Saenz Julienne
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c2
Alexander Bergmann
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c3
--- Comment #3 from Oliver Neukum
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c4
Oliver Neukum
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c5
Alexander Bergmann
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c6
--- Comment #6 from Nicolas Patricio Saenz Julienne
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c7
--- Comment #7 from Nicolas Patricio Saenz Julienne
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c8
--- Comment #8 from Nicolas Patricio Saenz Julienne
I fixed the issue, please test it here: https://build.suse.de/project/monitor?project=home%3Ansaenzjulienne%3Adwc2- serial
Sorry went too fast, I meant I fixed the build issue in comment #5. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c9
--- Comment #9 from Alexander Bergmann
I fixed the issue, please test it here: https://build.suse.de/project/monitor?project=home%3Ansaenzjulienne%3Adwc2-s...
I've installed that kernel, but the system got stuck directly after the kernel gets executed. Unfortunately no error message is visible. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c10
Oliver Neukum
(In reply to Nicolas Patricio Saenz Julienne from comment #7)
I fixed the issue, please test it here: https://build.suse.de/project/monitor?project=home%3Ansaenzjulienne%3Adwc2-s...
I've installed that kernel, but the system got stuck directly after the kernel gets executed. Unfortunately no error message is visible.
Please test with no usbcore in initrd, respectively with "nousb"on the kernel command line. We need to establish whether the added patch or something else in the kernel version crashes your machine. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c11
--- Comment #11 from Nicolas Patricio Saenz Julienne
(In reply to Alexander Bergmann from comment #9)
(In reply to Nicolas Patricio Saenz Julienne from comment #7)
I fixed the issue, please test it here: https://build.suse.de/project/monitor?project=home%3Ansaenzjulienne%3Adwc2-s...
I've installed that kernel, but the system got stuck directly after the kernel gets executed. Unfortunately no error message is visible.
Alexander, sorry for that.
Please test with no usbcore in initrd, respectively with "nousb"on the kernel command line. We need to establish whether the added patch or something else in the kernel version crashes your machine.
Nevermind, I tested it myself, there still was an issue with the patch. I'm building a new fixed version. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c12
--- Comment #12 from Nicolas Patricio Saenz Julienne
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c13
Alexander Bergmann
The patched kernel can be found here: http://download.suse.de/ibs/home:/nsaenzjulienne:/dwc2-serial/standard/
I tested it boots properly on a RPi3-B+.
The new kernel fixes the problem. The test case as described in comment 0 is working fine. I've actually tested the setup with 3 ttyUSB devices. Was this fixed now by only the commit from comment 3? -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c14
--- Comment #14 from Nicolas Patricio Saenz Julienne
(In reply to Nicolas Patricio Saenz Julienne from comment #12)
The patched kernel can be found here: http://download.suse.de/ibs/home:/nsaenzjulienne:/dwc2-serial/standard/
I tested it boots properly on a RPi3-B+.
The new kernel fixes the problem. The test case as described in comment 0 is working fine. I've actually tested the setup with 3 ttyUSB devices.
Was this fixed now by only the commit from comment 3?
Yes, that was the only change applied. I'll prepare a pull request. -- You are receiving this mail because: You are on the CC list for the bug.
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c15
--- Comment #15 from Nicolas Patricio Saenz Julienne
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c16
--- Comment #16 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c19
--- Comment #19 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c20
--- Comment #20 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c24
--- Comment #24 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c25
--- Comment #25 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c26
--- Comment #26 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
http://bugzilla.suse.com/show_bug.cgi?id=1114385#c27
--- Comment #27 from Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
http://bugzilla.suse.com/show_bug.cgi?id=1114385
Swamp Workflow Management
participants (1)
-
bugzilla_noreply@novell.com