NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/54977: xhci(4) bug: failed to create xfers



>Number:         54977
>Category:       kern
>Synopsis:       USB umass hard drive "failed to create xfers" when attaching via xhci(4)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Feb 17 16:40:00 +0000 2020
>Originator:     Paul Goyette
>Release:        NetBSD 9.99.46
>Organization:
+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+
>Environment:
	
	
System: NetBSD speedy.whooppee.com 9.99.46 NetBSD 9.99.46 (SPEEDY 2020-02-07 16:26:35 UTC) #1: Fri Feb 7 19:37:58 UTC 2020 paul%speedy.whooppee.com@localhost:/build/netbsd-local/obj/amd64/sys/arch/amd64/compile/SPEEDY amd64
Architecture: x86_64
Machine: amd64
>Description:
With a 9.99.46 kernel built from sources dated 2020-02-07 16:26:35 UTC
I get the following errors when plugging in a USB hard drive:

umass0 at uhub1 port 2 configuration 1 interface 0
umass0: Western Digital (0x1058) Ext HDD 1021 (0x1021), rev 2.00/20.02, addr 32
umass0: using SCSI over Bulk-Only
umass0: autoconfiguration error: failed to create xfers

This worked correctly with a 9.99.42 kernel built from sources dated
2020-01-25 19:35:05 UTC:

umass0 at uhub1 port 1 configuration 1 interface 0
umass0: Western Digital (0x1058) Ext HDD 1021 (0x1021), rev 2.00/20.02, addr 6
umass0: using SCSI over Bulk-Only
scsibus0 at umass0: 2 targets, 1 lun per target
sd0 at scsibus0 target 0 lun 0: <WD, Ext HDD 1021, 2002> disk fixed
sd0: fabricating a geometry
sd0: 1863 GB, 1907727 cyl, 64 head, 32 sec, 512 bytes/sect x 3907024896 sectors
sd0: fabricating a geometry

On IRC it was suggested (thanks, maya!) that the error message might be
related to memory fragmentation.  I didn't believe it (given that I have
128GB of RAM), but a quick check with top(1) showed that I had more than
100GB of 'file cache' active.  So, I unmounted all my development trees
(to force the cache to get flushed - and unmapped).  Sure enough, I was
then able to successfully mount the USB drive!

Concensus on IRC is that this is a bug in the xhci(4) driver, and is
triggered by fragmentation of kernel virtual address space.  It seems that
this has been reported/discussed before on the mailing lists, but no PR
seems to have been filed.

>How-To-Repeat:
Create fragmentation in kernel VA space, then attach a umass hard drive
to a xhci(4) USB port.
>Fix:
Unknown

>Unformatted:
 	
 	


Home | Main Index | Thread Index | Old Index