New: uas driver hangs and causes usb reset
https://bugzilla.kernel.org/show_bug.cgi?id=221340
Bug ID: 221340
Summary: uas driver hangs and causes usb reset
Product: Drivers
Version: 2.5
Kernel Version: v6.19.11-arch1-1
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: USB
Assignee: [email protected]
Reporter: [email protected]
Regression: NoCreated attachment 309850
--> https://bugzilla.kernel.org/attachment.cgi?id=309850&action=edit
Linux Kernel log
The driver has been isolated to uas, usb-storage driver works without issue. Happens more often the more load there is on the drive.
I am not aware of any duplicate bug reports.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
https://bugzilla.kernel.org/show_bug.cgi?id=221340
Oliver Neukum ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #1 from Oliver Neukum ([email protected]) --- Are all errors due to READ_10 and WRITE_10?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #2 from [email protected] ---
Appears to be the case, yes
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
Michał Pecio ([email protected]) changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #3 from Michał Pecio ([email protected]) --- There is also Unmap/Read sub-channel in this log.
By "hang", do you mean that no I/O happens for 30 seconds or some other time before these messages show up?
BTW, if you run (as root)
echo 'func handle_tx_event +p' >/proc/dynamic_debug/control
do you see anything new appear in dmesg at this time?
That would point to some "action" at xHCI layer, though I suppose it's also possible that nothing interesting happens and the device simply never responds to some commands under some circumstances.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #4 from [email protected] ---
(In reply to Michał Pecio from comment #3)
Quoted 4 lines
There is also Unmap/Read sub-channel in this log.
By "hang", do you mean that no I/O happens for 30 seconds or some other time before these messages show up?
yes
Quoted 9 lines
BTW, if you run (as root)
echo 'funchandle_tx_event+p' >/proc/dynamic_debug/controldo you see anything new appear in dmesg at this time?
That would point to some "action" at xHCI layer, though I suppose it's also possible that nothing interesting happens and the device simply never responds to some commands under some circumstances.
I have been having difficulties reproducing the bug recently, I will let you know when it happens again
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #5 from [email protected] ---
This is what i got
[ 902.725085] sd 0:0:0:0: [sda] tag#29 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD OUT [ 902.725113] sd 0:0:0:0: [sda] tag#29 CDB: Write(10) 2a 00 01 46 1c 98 00 00 08 00 [ 902.725243] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 7 [ 902.725446] sd 0:0:0:0: [sda] tag#28 uas_eh_abort_handler 0 uas-tag 20 inflight: CMD OUT [ 902.725461] sd 0:0:0:0: [sda] tag#28 CDB: Write(10) 2a 00 01 46 1c 80 00 00 10 00 [ 902.725493] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 7 [ 902.725583] sd 0:0:0:0: [sda] tag#27 uas_eh_abort_handler 0 uas-tag 19 inflight: CMD OUT [ 902.725589] sd 0:0:0:0: [sda] tag#27 CDB: Write(10) 2a 00 01 46 1c 18 00 00 08 00 [ 902.725610] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 7 [ 902.725679] sd 0:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 21 inflight: CMD OUT [ 902.725685] sd 0:0:0:0: [sda] tag#0 CDB: Write(10) 2a 00 01 46 1c b8 00 00 10 00 [ 902.725706] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 7 [ 909.893015] sd 0:0:0:0: [sda] tag#8 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN [ 909.893033] sd 0:0:0:0: [sda] tag#8 CDB: Read(10) 28 00 00 32 00 a0 00 00 20 00 [ 909.893154] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 6 [ 916.037097] sd 0:0:0:0: [sda] tag#9 uas_eh_abort_handler 0 uas-tag 3 inflight: CMD OUT [ 916.037127] sd 0:0:0:0: [sda] tag#9 CDB: Unmap/Read sub-channel 42 00 00 00 00 00 00 00 18 00 [ 916.037256] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 7 [ 916.048101] scsi host0: uas_eh_device_reset_handler start [ 916.048197] xhci_hcd 0000:00:14.0: Stopped on Transfer TRB for slot 2 ep 1 [ 916.048250] usb 2-1: cmd cmplt err -2 [ 916.048385] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.048473] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.048558] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.048641] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.048721] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.048801] xhci_hcd 0000:00:14.0: Stopped on No-op or Link TRB for slot 2 ep 4 [ 916.161702] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd [ 916.174700] scsi host0: uas_eh_device_reset_handler success
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #6 from Michał Pecio ([email protected]) --- This shows UAS driver unlinking URBs related to timed out commands as they are being aborted, but I wondered if anything unusual happens 30 seconds prior, when the device stops executing SCSI commands and makes them time out.
IOW, was there anything related to uas or xhci before this snippet begins?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #7 from [email protected] ---
(In reply to Michał Pecio from comment #6)
Quoted 5 lines
This shows UAS driver unlinking URBs related to timed out commands as they are being aborted, but I wondered if anything unusual happens 30 seconds prior, when the device stops executing SCSI commands and makes them time out.
IOW, was there anything related to uas or xhci before this snippet begins?
there are no other logs before the aborted commands get logged
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #8 from [email protected] --- Is anyone working on this or is there not enough info?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #9 from Oliver Neukum ([email protected]) ---
Can you please try the "g" quirk (this turns into US_FL_MAX_SECTORS_240) as a quirk for your device?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #10 from [email protected] --- it appears to be working. I have yet to have an issue
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #11 from [email protected] --- Nevermind, It happened again. It took longer this time though
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #12 from Oliver Neukum ([email protected]) --- (In reply to DaisyTheFoxxo from comment #11)
Quoted 1 line
Nevermind, It happened again. It took longer this time though
Then please try the 'm' quirk.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #13 from [email protected] ---
(In reply to Oliver Neukum from comment #12)
Quoted 4 lines
(In reply to DaisyTheFoxxo from comment #11)
Quoted 1 line
Nevermind, It happened again. It took longer this time though
Then please try the 'm' quirk.
The problem still persists
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #14 from Oliver Neukum ([email protected]) ---
OK, it looks like there is a race condition in your device's firmware you don't see under other operating systems because they use a dirty trick for command abort.
Would you be willing to test some highly experimental kernel patches?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #15 from [email protected] ---
Yes, I would very much like to try some patches
What version will the patches be for?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #16 from [email protected] --- Reaffirming that I would like to try out the patches mentioned
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
Re: [Bug 221340] uas driver hangs and causes usb reset
Quoted 5 lines · On 26.04.26 04:54, [email protected] wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #16 from [email protected] --- Reaffirming that I would like to try out the patches mentioned
Thank you. They are about to be written. A few days please.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #17 from [email protected] ---
Quoted 5 lines · On 26.04.26 04:54, [email protected] wrote:
https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #16 from [email protected] --- Reaffirming that I would like to try out the patches mentioned
Thank you. They are about to be written. A few days please.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #18 from [email protected] ---
Checking in on the progress of the patches as it has been just over 2 weeks
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #19 from [email protected] --- Are the patches still in development? Just checking.
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.
[Bug 221340] uas driver hangs and causes usb reset
In reply to [email protected]https://bugzilla.kernel.org/show_bug.cgi?id=221340
--- Comment #20 from [email protected] ---
What's the status on this?
Signature · 4 lines
You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.