Bug 204095
Summary: | freeze while write on external usb 3.0 hard disk | ||
---|---|---|---|
Product: | Drivers | Reporter: | Antonio (antdev66) |
Component: | USB | Assignee: | Greg Kroah-Hartman (greg) |
Status: | RESOLVED CODE_FIX | ||
Severity: | high | CC: | AlleyTrotter, piergiorgio.sartor, tytso |
Priority: | P1 | ||
Hardware: | x86-64 | ||
OS: | Linux | ||
Kernel Version: | 5.2 | Subsystem: | |
Regression: | No | Bisected commit-id: |
Description
Antonio
2019-07-08 12:57:44 UTC
previous kernel ok: 5.1.16 also the 5.1.17 version seems ok Just a me-to. I'm having the same issue. Works fine in all previous kernels problem started in 5.2.0 and persists in 5.2.1 This info may help the person trying to solve the issus Jul 12 11:16:12 NVMe kernel: [ 123.758841] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.758845] xhci_hcd 0000:07:00.0: overflow 0x00000007c67ab000+348160 of DMA mask ffffffff bus mask 0 Jul 12 11:16:12 NVMe kernel: [ 123.758856] WARNING: CPU: 0 PID: 924 at kernel/dma/direct.c:43 report_addr+0x2f/0x90 Jul 12 11:16:12 NVMe kernel: [ 123.758857] Modules linked in: ipv6 xt_limit xt_pkttype ipt_REJECT nf_reject_ipv4 xt_tcpudp nf_log_ipv4 nf_log_common xt_LOG xt_conntrack iptable_mangle iptable_nat iptable_filter nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ip_tables x_tables cfg80211 rfkill hid_generic usbhid hid fuse uas usb_storage snd_hda_codec_hdmi coretemp intel_rapl x86_pkg_temp_thermal intel_powerclamp snd_hda_codec_realtek kvm_intel snd_hda_codec_generic ledtrig_audio kvm irqbypass i2c_dev mxm_wmi crct10dif_pclmul crc32_pclmul i915 crc32c_intel cec rc_core drm_kms_helper ghash_clmulni_intel snd_hda_intel drm snd_hda_codec intel_cstate snd_hda_core intel_gtt snd_hwdep intel_rapl_perf snd_pcm snd_timer evdev agpgart i2c_algo_bit serio_raw fb_sys_fops snd syscopyarea sysfillrect tg3 sysimgblt i2c_i801 xhci_pci soundcore mei_me xhci_hcd lpc_ich i2c_core ehci_pci libphy mei ehci_hcd ie31200_edac hwmon wmi video pcc_cpufreq intel_smartconnect button loop Jul 12 11:16:12 NVMe kernel: [ 123.758903] CPU: 0 PID: 924 Comm: usb-storage Not tainted 5.2.0 #3 Jul 12 11:16:12 NVMe kernel: [ 123.758904] Hardware name: To Be Filled By O.E.M. To Be Filled By O.E.M./Z77 Extreme4, BIOS P2.90 07/11/2013 Jul 12 11:16:12 NVMe kernel: [ 123.758907] RIP: 0010:report_addr+0x2f/0x90 Jul 12 11:16:12 NVMe kernel: [ 123.758909] Code: 48 83 ec 08 48 8b 87 28 02 00 00 48 89 34 24 48 85 c0 74 29 4c 8b 00 b8 fe ff ff ff 49 39 c0 76 10 80 3d 43 cf a7 01 00 74 31 <0f> 0b 48 83 c4 08 c3 48 83 bf 38 02 00 00 00 75 e6 eb ed 80 3d 28 Jul 12 11:16:12 NVMe kernel: [ 123.758911] RSP: 0018:ffffa46203ef7bc8 EFLAGS: 00010282 Jul 12 11:16:12 NVMe kernel: [ 123.758912] RAX: 0000000000000000 RBX: ffff90f1fb5b30b0 RCX: 0000000000000006 Jul 12 11:16:12 NVMe kernel: [ 123.758913] RDX: 0000000000000000 RSI: 0000000000000082 RDI: ffff90f1ff4164c0 Jul 12 11:16:12 NVMe kernel: [ 123.758914] RBP: 0000000000055000 R08: 000000000001279c R09: 0000000000000384 Jul 12 11:16:12 NVMe kernel: [ 123.758915] R10: 0000000000000000 R11: 0000000000000384 R12: ffff90f1fb5b30b0 Jul 12 11:16:12 NVMe kernel: [ 123.758916] R13: 0000000000000001 R14: 0000000000000000 R15: ffff90f1f13102b0 Jul 12 11:16:12 NVMe kernel: [ 123.758918] FS: 0000000000000000(0000) GS:ffff90f1ff400000(0000) knlGS:0000000000000000 Jul 12 11:16:12 NVMe kernel: [ 123.758919] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 Jul 12 11:16:12 NVMe kernel: [ 123.758921] CR2: 000000000189b000 CR3: 0000000320a0a005 CR4: 00000000001606f0 Jul 12 11:16:12 NVMe kernel: [ 123.758921] Call Trace: Jul 12 11:16:12 NVMe kernel: [ 123.758927] dma_direct_map_page+0xd9/0xf0 Jul 12 11:16:12 NVMe kernel: [ 123.758930] dma_direct_map_sg+0x64/0xb0 Jul 12 11:16:12 NVMe kernel: [ 123.758934] usb_hcd_map_urb_for_dma+0x3d1/0x540 Jul 12 11:16:12 NVMe kernel: [ 123.758937] usb_hcd_submit_urb+0x84/0xa00 Jul 12 11:16:12 NVMe kernel: [ 123.758941] ? schedule_timeout+0x1dc/0x2f0 Jul 12 11:16:12 NVMe kernel: [ 123.758943] ? usb_hcd_submit_urb+0xa9/0xa00 Jul 12 11:16:12 NVMe kernel: [ 123.758946] ? __switch_to_asm+0x40/0x70 Jul 12 11:16:12 NVMe kernel: [ 123.758948] ? _cond_resched+0x16/0x40 Jul 12 11:16:12 NVMe kernel: [ 123.758951] ? __kmalloc+0x5d/0x200 Jul 12 11:16:12 NVMe kernel: [ 123.758954] ? usb_alloc_urb+0x24/0x60 Jul 12 11:16:12 NVMe kernel: [ 123.758956] usb_sg_wait+0x64/0x110 Jul 12 11:16:12 NVMe kernel: [ 123.758963] usb_stor_bulk_transfer_sglist.part.4+0x69/0xc0 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758967] usb_stor_bulk_srb+0x68/0x80 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758971] usb_stor_Bulk_transport+0x184/0x3e0 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758973] ? schedule+0x33/0x90 Jul 12 11:16:12 NVMe kernel: [ 123.758976] usb_stor_invoke_transport+0x3a/0x4e0 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758979] ? wait_for_completion_interruptible+0xaf/0x170 Jul 12 11:16:12 NVMe kernel: [ 123.758983] ? wake_up_q+0x80/0x80 Jul 12 11:16:12 NVMe kernel: [ 123.758986] usb_stor_control_thread+0x165/0x270 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758990] ? fill_inquiry_response+0x20/0x20 [usb_storage] Jul 12 11:16:12 NVMe kernel: [ 123.758993] kthread+0xf8/0x130 Jul 12 11:16:12 NVMe kernel: [ 123.758996] ? kthread_destroy_worker+0x40/0x40 Jul 12 11:16:12 NVMe kernel: [ 123.758999] ret_from_fork+0x35/0x40 Jul 12 11:16:12 NVMe kernel: [ 123.759001] ---[ end trace 10d0ae5c82ba2fb9 ]--- Jul 12 11:16:12 NVMe kernel: [ 123.759072] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.759141] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.759210] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.759278] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.759363] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) Jul 12 11:16:12 NVMe kernel: [ 123.759433] xhci_hcd 0000:07:00.0: swiotlb buffer is full (sz: 348160 bytes), total 32768 (slots), used 1 (slots) On Mon, Jul 15, 2019 at 02:06:46AM +0000, bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=204095 > > Theodore Tso (tytso@mit.edu) changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |tytso@mit.edu > Assignee|fs_ext4@kernel-bugs.osdl.or |greg@kroah.com > |g | > All USB bugs should be sent to the linux-usb@vger.kernel.org mailing list, and not entered into bugzilla. Please bring this issue up there, if it is still a problem in the latest kernel release. On Sun, 14 Jul 2019, Theodore Y. Ts'o wrote: > This bug was initially (and wrongly) assigned to the ext4 component, > when it's very clearly a regression in the USB mass storage driver in > the 5.2.0 kernel. > > For people who hate bugzilla, you can also see the full thread at: > > > https://lore.kernel.org/linux-ext4/bug-204095-13602@https.bugzilla.kernel.org%2F/T/#ra57c95759df5bee542d85f2541bda87735c09f16 I'm not so sure it's a regression in the USB mass-storage driver, but in any case, it looks very much like the problem fixed by this patch (not yet merged): https://marc.info/?l=linux-usb&m=156044081619171&w=2 Maybe the original bug reporters can try it out and tell us if it works. Alan Stern Re: #5 So would you prefer that we file a ticket to have the Drivers/USB component removed from the kernel bugzilla? Alternatively, we could have the default assignee for the Drivers/USB component be the linux-usb@vger.kernel.org list. (This is how we handle things for the ext4 list, and TBH, I actually find the kernel bugzilla to be helpful when I we get bulk-filed bugs for ext4 fuzzing reports from security researchers; that way I don't lose track of them all. But it should be up to the linux-usb@ folks to decide how they want to handle things.) Not sure I replied to the right place but Alan Sterns patch works for me on 5.2.1 AlleyTrotter On Mon, 15 Jul 2019, John Yost wrote:
> On 7/15/19 11:16 AM, Alan Stern wrote:
> > On Sun, 14 Jul 2019, Theodore Y. Ts'o wrote:
> >
> >> This bug was initially (and wrongly) assigned to the ext4 component,
> >> when it's very clearly a regression in the USB mass storage driver in
> >> the 5.2.0 kernel.
> >>
> >> For people who hate bugzilla, you can also see the full thread at:
> >>
> >>
> https://lore.kernel.org/linux-ext4/bug-204095-13602@https.bugzilla.kernel.org%2F/T/#ra57c95759df5bee542d85f2541bda87735c09f16
> >
> > I'm not so sure it's a regression in the USB mass-storage driver, but
> > in any case, it looks very much like the problem fixed by this patch
> > (not yet merged):
> >
> > https://marc.info/?l=linux-usb&m=156044081619171&w=2
> >
> > Maybe the original bug reporters can try it out and tell us if it
> > works.
> >
> > Alan Stern
> >
>
>
> Thanks for the patch
> It works for me on 5.2.1
> John
Okay, good.
Greg, it looks like we need to expedite getting this patch into the
mainline.
Alan Stern
(In reply to Alan Stern from comment #6) > On Sun, 14 Jul 2019, Theodore Y. Ts'o wrote: > > > This bug was initially (and wrongly) assigned to the ext4 component, > > when it's very clearly a regression in the USB mass storage driver in > > the 5.2.0 kernel. > > > > For people who hate bugzilla, you can also see the full thread at: > > > > > > > https://lore.kernel.org/linux-ext4/bug-204095-13602@https.bugzilla.kernel.org%2F/T/#ra57c95759df5bee542d85f2541bda87735c09f16 > > I'm not so sure it's a regression in the USB mass-storage driver, but > in any case, it looks very much like the problem fixed by this patch > (not yet merged): > > https://marc.info/?l=linux-usb&m=156044081619171&w=2 > > Maybe the original bug reporters can try it out and tell us if it > works. > > Alan Stern the proposed patch seems to work for me, too On Mon, Jul 15, 2019 at 01:47:44PM -0400, Alan Stern wrote:
> On Mon, 15 Jul 2019, John Yost wrote:
>
> > On 7/15/19 11:16 AM, Alan Stern wrote:
> > > On Sun, 14 Jul 2019, Theodore Y. Ts'o wrote:
> > >
> > >> This bug was initially (and wrongly) assigned to the ext4 component,
> > >> when it's very clearly a regression in the USB mass storage driver in
> > >> the 5.2.0 kernel.
> > >>
> > >> For people who hate bugzilla, you can also see the full thread at:
> > >>
> > >>
> https://lore.kernel.org/linux-ext4/bug-204095-13602@https.bugzilla.kernel.org%2F/T/#ra57c95759df5bee542d85f2541bda87735c09f16
> > >
> > > I'm not so sure it's a regression in the USB mass-storage driver, but
> > > in any case, it looks very much like the problem fixed by this patch
> > > (not yet merged):
> > >
> > > https://marc.info/?l=linux-usb&m=156044081619171&w=2
> > >
> > > Maybe the original bug reporters can try it out and tell us if it
> > > works.
> > >
> > > Alan Stern
> > >
> >
> >
> > Thanks for the patch
> > It works for me on 5.2.1
> > John
>
> Okay, good.
>
> Greg, it looks like we need to expedite getting this patch into the
> mainline.
Am working on it now...
solved with kernel 5.2.5 Thanks, Antonio Or maybe not... I've Fedora 30 and there was an update, from kernel 5.1.20 to 5.2.5, and now I've the logs full of: ehci-pci 0000:00:13.2: swiotlb buffer is full (sz: 327680 bytes), total 32768 (slots), used 97 (slots) Or similarly: ehci-pci 0000:00:13.2: swiotlb buffer is full (sz: 315392 bytes), total 32768 (slots), used 103 (slots) This happens whenever I access an external USB3.0 drive connected to a USB2.0 port, I'm not sure if this makes any difference. It is enough something like "hdparm -t /dev/sdX" to trigger the above (and cause a lock-up of the command and 100% CPU load for "usb-storage"). Nevertheless, it seems that the first access, likely few bytes read, is successful since the device is recognize by the file manager. Anything else, (large) file copy causes the issue. Could it be the same bug? That is the fix for 5.2.5 does not fix it completely? If you think it is a new bug, I'll open one. Maybe directly at Fedora bugzilla, not sure, let me know. Thanks, bye, pg Hi again. Some more comments. I tested a different PC, this does not show any problem, neither with the "old" 5.1.20 nor with the new 5.2.5 kernel. Second, the original PC still have problems, here below the log output at the moment of the "crash" due to "hdparm -t /dev/sdX": [ 47.212609] xhci_hcd 0000:02:00.0: swiotlb buffer is full (sz: 421888 bytes), total 32768 (slots), used 1 (slots) [ 47.212620] xhci_hcd 0000:02:00.0: overflow 0x0000000383a19000+421888 of DMA mask ffffffff bus mask 0 [ 47.212646] WARNING: CPU: 0 PID: 454 at kernel/dma/direct.c:43 report_addr+0x33/0x60 [ 47.212649] Modules linked in: fuse cfg80211 rfkill nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_state xt_conntrack xt_owner xt_LOG iptable_filter nf_conntrack_ftp xt_CT nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 iptable_raw hwmon_vid sunrpc dm_crypt dm_cache_smq nvidia_drm(POE) dm_cache nvidia_modeset(POE) dm_persistent_data dm_bio_prison libcrc32c nvidia_uvm(OE) amd64_edac_mod edac_mce_amd kvm_amd ccp kvm snd_hda_codec_hdmi irqbypass joydev crct10dif_pclmul nvidia(POE) crc32_pclmul ghash_clmulni_intel snd_hda_codec_via snd_hda_codec_generic ledtrig_audio snd_hda_intel drm_kms_helper wmi_bmof snd_hda_codec fam15h_power k10temp snd_hda_core sp5100_tco snd_hwdep i2c_piix4 snd_seq snd_seq_device drm snd_pcm snd_timer ipmi_devintf snd ipmi_msghandler asus_atk0110 soundcore pcc_cpufreq acpi_cpufreq vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) vboxdrv(OE) binfmt_misc ip_tables firewire_sbp2 raid1 raid10 crc32c_intel firewire_ohci firewire_core serio_raw crc_itu_t r8169 wmi uas [ 47.212719] usb_storage hid_logitech ff_memless ecryptfs [ 47.212734] CPU: 0 PID: 454 Comm: usb-storage Tainted: P OE 5.2.6-200.fc30.x86_64 #1 [ 47.212738] Hardware name: System manufacturer System Product Name/M5A78L-M/USB3, BIOS 2101 12/02/2014 [ 47.212744] RIP: 0010:report_addr+0x33/0x60 [ 47.212750] Code: 48 8b 87 28 02 00 00 48 89 34 24 48 85 c0 74 2d 4c 8b 00 b8 fe ff ff ff 49 39 c0 76 14 80 3d a3 ae 41 01 00 0f 84 a9 06 00 00 <0f> 0b 48 83 c4 08 c3 48 83 bf 38 02 00 00 00 74 ef eb e0 80 3d 84 [ 47.212754] RSP: 0018:ffffa85941bffbc8 EFLAGS: 00010246 [ 47.212758] RAX: 0000000000000000 RBX: 0000000000000002 RCX: 0000000000000000 [ 47.212762] RDX: 0000000000000007 RSI: 0000000000000092 RDI: ffff9a45af617900 [ 47.212765] RBP: ffff9a45accc00b0 R08: ffffa85941bff92d R09: 00000000000003a3 [ 47.212769] R10: ffffffffb6bece08 R11: ffffa85941bff92d R12: 0000000000067000 [ 47.212772] R13: 0000000000000002 R14: 0000000000000000 R15: ffff9a45a40502b0 [ 47.212777] FS: 0000000000000000(0000) GS:ffff9a45af600000(0000) knlGS:0000000000000000 [ 47.212780] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 47.212784] CR2: 000055b215f34c50 CR3: 00000003d622e000 CR4: 00000000000406f0 [ 47.212787] Call Trace: [ 47.212797] dma_direct_map_page+0xdf/0xf0 [ 47.212803] dma_direct_map_sg+0x67/0xb0 [ 47.212811] usb_hcd_map_urb_for_dma+0x343/0x530 [ 47.212817] usb_hcd_submit_urb+0x9a/0xbb0 [ 47.212824] ? schedule_timeout+0x209/0x300 [ 47.212829] ? usb_hcd_submit_urb+0xbf/0xbb0 [ 47.212835] ? __switch_to_asm+0x40/0x70 [ 47.212840] ? __switch_to_asm+0x34/0x70 [ 47.212845] ? _cond_resched+0x15/0x30 [ 47.212852] ? __kmalloc+0x16c/0x210 [ 47.212857] ? _cond_resched+0x15/0x30 [ 47.212863] ? usb_alloc_urb+0x35/0x60 [ 47.212867] usb_sg_wait+0x7e/0x150 [ 47.212879] usb_stor_bulk_transfer_sglist.part.0+0x64/0xb0 [usb_storage] [ 47.212886] usb_stor_bulk_srb+0x49/0x80 [usb_storage] [ 47.212893] usb_stor_Bulk_transport+0x163/0x3e0 [usb_storage] [ 47.212898] ? schedule+0x33/0x90 [ 47.212905] usb_stor_invoke_transport+0x3a/0x500 [usb_storage] [ 47.212910] ? wait_for_completion_interruptible+0x156/0x1a0 [ 47.212915] ? wake_up_q+0x60/0x60 [ 47.212922] usb_stor_control_thread+0x183/0x280 [usb_storage] [ 47.212928] kthread+0xfb/0x130 [ 47.212934] ? usb_stor_disconnect+0xb0/0xb0 [usb_storage] [ 47.212938] ? kthread_park+0x80/0x80 [ 47.212943] ret_from_fork+0x22/0x40 [ 47.212948] ---[ end trace 848c6eec31ed7f76 ]--- Hope this helps, bye, pg |