NetBSD-Bugs archive

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

kern/57379: running "usbdevs" during USB disk access causes hang



>Number:         57379
>Category:       kern
>Synopsis:       running "usbdevs" during USB disk access causes hang
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 26 15:05:00 +0000 2023
>Originator:     Chuck Silvers
>Release:        NetBSD 10.99.4 as of 2023/04/23 12:09:30
>Organization:
NetBSD
>Environment:
Architecture: x86_64
Machine: amd64
>Description:

While doing a stream of I/O operations to a USB disk, running "usbdevs"
causes all the I/O to hang and start timing out.  The driver code attempts to
reset the hardware but that fails:

[ 2383.8243784] umass1: Invalid CSW: tag 762078582 should be 132562
[ 2513.8444156] umass1: Invalid CSW: tag -1644167167 should be 132602
[ 2513.8532048] umass1: BBB reset failed, IOERROR
[ 2518.8581824] umass1: BBB bulk-in clear stall failed, TIMEOUT
[ 2518.8639908] sd1d: error writing fsbn 3368947648 of 3368947648-3368947775 (sd1 bn 3368947648; cn 1644993 tn 62 sn 0)
[ 2518.8747843] umass1: Invalid CSW: tag 1818435696 should be 132603
[ 2523.8807384] umass1: BBB reset failed, TIMEOUT

Sometimes some I/O operations fail before I/O starts hanging:

[ 1230.9798184] sd0(umass0:0:0:0): generic HBA error
[ 1230.9851010] sd0d: error reading fsbn 1228608 of 1228608-1228735 (sd0 bn 1228608; cn 599 tn 58 sn 0)
[ 1230.9941070] sd0(umass0:0:0:0): generic HBA error
[ 1230.9990025] sd0d: error reading fsbn 1228736 of 1228736-1228863 (sd0 bn 1228736; cn 599 tn 62 sn 0)
[ 1231.0081803] sd0(umass0:0:0:0): generic HBA error
[ 1231.0129036] sd0d: error reading fsbn 1228864 of 1228864-1228991 (sd0 bn 1228864; cn 600 tn 2 sn 0)
[ 1231.0218223] sd0(umass0:0:0:0): generic HBA error
[ 1231.0267177] sd0d: error reading fsbn 1228992 of 1228992-1229119 (sd0 bn 1228992; cn 600 tn 6 sn 0)
...

Sometimes the usbdevs command hangs too:

trace: pid 414 lid 414 at 0xffffc5862c8748a0
sleepq_block() at netbsd:sleepq_block+0x139
cv_wait() at netbsd:cv_wait+0x49
usbd_transfer() at netbsd:usbd_transfer+0x5f0
usbd_do_request_len() at netbsd:usbd_do_request_len+0xff
usbd_get_string_desc() at netbsd:usbd_get_string_desc+0x81
usbd_get_string0() at netbsd:usbd_get_string0+0x90
usbd_get_string() at netbsd:usbd_get_string+0xe
usbd_fill_deviceinfo() at netbsd:usbd_fill_deviceinfo+0x2e7
usbioctl() at netbsd:usbioctl+0xff
cdev_ioctl() at netbsd:cdev_ioctl+0x99
spec_ioctl() at netbsd:spec_ioctl+0x58
VOP_IOCTL() at netbsd:VOP_IOCTL+0x6f
vn_ioctl() at netbsd:vn_ioctl+0xc7
sys_ioctl() at netbsd:sys_ioctl+0x56d
syscall() at netbsd:syscall+0x196


>How-To-Repeat:

Run "usbdevs" while accessing a USB disk.


>Fix:
unknown



Home | Main Index | Thread Index | Old Index