Seagate external drive causes SCSI bus resets when UAS enabled

Bug #1584557 reported by Ian Turner on 2016-05-23
46
This bug affects 9 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Medium
Unassigned

Bug Description

Seagate STEA1000400 external USB hard disk (USB ID 0bc2:2322) causes continuous SCSI bus resets by default. As a workaround, disabling UAS causes the device to work fine.

To disable UAS, I created a file in /etc/modprobe.d with the following contents:
options usb-storage quirks=0bc2:02322:u

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ubuntu-release-upgrader-core 1:16.04.14
ProcVersionSignature: Ubuntu 4.4.0-22.40-generic 4.4.8
Uname: Linux 4.4.0-22-generic x86_64
ApportVersion: 2.20.1-0ubuntu2
Architecture: amd64
CrashDB: ubuntu
Date: Sun May 22 22:02:26 2016
InstallationDate: Installed on 2012-10-07 (1323 days ago)
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release amd64 (20120822.4)
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: ubuntu-release-upgrader
Symptom: ubuntu-release-upgrader
UpgradeStatus: Upgraded to xenial on 2016-04-09 (43 days ago)

Ian Turner (vectro) wrote :
affects: ubuntu-release-upgrader (Ubuntu) → linux (Ubuntu)

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Joseph Salisbury (jsalisbury) wrote :

Did this issue start happening after an update/upgrade? Was there a prior kernel version where you were not having this particular problem?

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.7 kernel[0].

If this bug is fixed in the mainline kernel, please add the following tag 'kernel-fixed-upstream'.

If the mainline kernel does not fix this bug, please add the tag: 'kernel-bug-exists-upstream'.

Once testing of the upstream kernel is complete, please mark this bug as "Confirmed".

Thanks in advance.

[0] http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.7

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Ian Turner (vectro) wrote :

Using upstream kernel 4.7.0-040700-generic, I did not observe SCSI bus resets, but did observe a single instance of I/O related "hung task" messages in dmesg, which are attached, during heavy read/write load. I could not reproduce the message on subsequent attempts.

Ian Turner (vectro) wrote :

On 4.4.0-31-generic, I'm still seeing this issue. This is new hardware and 4.4.0-22-generic was the first kernel I tried to use with this device.

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
tags: added: kernel-fixed-upstream
Filofel (filofel) wrote :

Same problem here using 16.04 / kernel 4.4.0-42-generic (i686) and external drive LaCie d2 Quadra, USB ID 059f:105e

I get random hangs under heavy traffic, during rsync from one external USB drive to another.
rsync just hangs during a transfer. Sometimes it recovers after a number of seconds, sometimes it never does and hangs there, possibly for hours.
dmesg contains then contains repeated error recovery sequences such as:

[ 2350.056247] usb 1-4.4: cmd cmplt err -2
[ 2350.128049] usb 1-4.4: reset high-speed USB device number 12 using ehci-pci
[ 2350.333548] scsi host8: uas_eh_bus_reset_handler success
[ 2381.032039] sd 8:0:0:0: [sdc] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD
[ 2381.032045] sd 8:0:0:0: [sdc] tag#1 CDB: Read(10) 28 00 95 5a 11 00 00 00 08 00
[ 2381.032049] sd 8:0:0:0: [sdc] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD
[ 2381.032052] sd 8:0:0:0: [sdc] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 20 00
[ 2381.032079] scsi host8: uas_eh_bus_reset_handler start

Disabling uas worked the problem around. I still see some:

usb 1-4.4: reset high-speed USB device number 14 using ehci-pci

in dmesg but the disk recovers after the reset.

Additionally, disabling uas allows me to see the external disk SMART data (including using Disks), something I couldn't do before and was sorely missing in these circumstances!

The bottom line is that it seems under certain circumstances, uas is not able to recover from errors.

James Agnew (jamesagnew-j) wrote :

I am seeing the same issue with Kernel 4.8.0-26-generic #28-Ubuntu SMP Tue Oct 18 14:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

Workaround as reported in the orinal description also clears it for me

claudio@ubuntu (claudio.ubuntu) wrote :

The workaround from above kind of works as making a USB3 drive usable, but it's certainly not a solution, becase the reset still happen and the IO interrupted.

I listen to music with rhythmbox On Ubuntu 16.4.1. My FLAC collection in on an external USB3 disk. Every 9 minutes, there is a usb reset resulting in a pause in the music for 1 or 2 seconds.

# grep reset syslog
Dec 3 09:39:51 kodi kernel: [833306.998449] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 09:48:25 kodi kernel: [833820.826351] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 09:57:56 kodi kernel: [834391.952203] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 10:36:53 kodi kernel: [836729.119419] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 10:47:38 kodi kernel: [837374.645305] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd

# grep "usb 2-3" syslog
Dec 3 09:39:51 kodi kernel: [833306.882385] usb 2-3: Disable of device-initiated U1 failed.
Dec 3 09:39:51 kodi kernel: [833306.886614] usb 2-3: Disable of device-initiated U2 failed.
Dec 3 09:39:51 kodi kernel: [833306.998449] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 09:48:24 kodi kernel: [833820.709518] usb 2-3: Disable of device-initiated U1 failed.
Dec 3 09:48:24 kodi kernel: [833820.713862] usb 2-3: Disable of device-initiated U2 failed.
Dec 3 09:48:25 kodi kernel: [833820.826351] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 09:57:56 kodi kernel: [834391.831138] usb 2-3: Disable of device-initiated U1 failed.
Dec 3 09:57:56 kodi kernel: [834391.837003] usb 2-3: Disable of device-initiated U2 failed.
Dec 3 09:57:56 kodi kernel: [834391.952203] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 10:36:53 kodi kernel: [836729.003142] usb 2-3: Disable of device-initiated U1 failed.
Dec 3 10:36:53 kodi kernel: [836729.007545] usb 2-3: Disable of device-initiated U2 failed.
Dec 3 10:36:53 kodi kernel: [836729.119419] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 10:47:38 kodi kernel: [837374.529443] usb 2-3: Disable of device-initiated U1 failed.
Dec 3 10:47:38 kodi kernel: [837374.533545] usb 2-3: Disable of device-initiated U2 failed.
Dec 3 10:47:38 kodi kernel: [837374.645305] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd

System info:
# cat /etc/issue
Ubuntu 16.04.1 LTS \n \l

# uname -a
Linux kodi 4.4.0-47-generic #68-Ubuntu SMP Wed Oct 26 19:39:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

# dmesg |grep Seagate
[ 2.086528] usb 2-3: Manufacturer: Seagate
[ 3.099308] scsi 2:0:0:0: Direct-Access Seagate Backup+ SL A905 PQ: 0 ANSI: 6

There is no firmware update available from the manufacturer.

Thx,

C.

claudio@ubuntu (claudio.ubuntu) wrote :

I just plugged in the drive into my laptop running Ubuntu 16.10 and there are no reset with the drive and no workaround needed.

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.10
Release: 16.10
Codename: yakkety
$ uname -a
Linux bologna 4.8.0-28-generic #30-Ubuntu SMP Fri Nov 11 14:03:52 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
$ lspci |grep USB
00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04)
00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04)

The affected 16.04 system:
$ lspci |grep USB
00:14.0 USB controller: Intel Corporation Device 22b5 (rev 21)

However, I think it's kernel related. I'll boot the affected system with a 4.8 kernel.

I spoke too soon.While on my Ubuntu 16.10 laptop there hasn't been any usb reses, the problems still persist on the 16.04 NUC when booted through a 16.10 live session:

Dec 3 11:08:49 ubuntu kernel: [ 686.880835] xhci_hcd 0000:00:14.0: ERROR Unknown event condition 10, HC probably busted
Dec 3 11:08:49 ubuntu kernel: [ 686.880852] xhci_hcd 0000:00:14.0: ERROR Unknown event condition 10, HC probably busted
Dec 3 11:08:49 ubuntu kernel: [ 686.884132] xhci_hcd 0000:00:14.0: ERROR Transfer event for disabled endpoint or incorrect stream ring
Dec 3 11:08:49 ubuntu kernel: [ 686.884164] xhci_hcd 0000:00:14.0: @0000000179f91ba0 00000000 00000000 04000000 02038001
Dec 3 11:09:20 ubuntu kernel: [ 718.048017] sd 3:0:0:0: [sda] tag#1 uas_eh_abort_handler 0 uas-tag 2 inflight: CMD IN
Dec 3 11:09:20 ubuntu kernel: [ 718.048039] sd 3:0:0:0: [sda] tag#1 CDB: Read(10) 28 00 75 e4 70 e0 00 01 00 00
Dec 3 11:09:20 ubuntu kernel: [ 718.048445] sd 3:0:0:0: [sda] tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: CMD IN
Dec 3 11:09:20 ubuntu kernel: [ 718.048463] sd 3:0:0:0: [sda] tag#0 CDB: Read(10) 28 00 75 e4 6f e0 00 01 00 00
Dec 3 11:09:20 ubuntu kernel: [ 718.048980] scsi host3: uas_eh_bus_reset_handler start
Dec 3 11:09:20 ubuntu kernel: [ 718.175974] usb 2-3: reset SuperSpeed USB device number 2 using xhci_hcd
Dec 3 11:09:20 ubuntu kernel: [ 718.206258] scsi host3: uas_eh_bus_reset_handler success

Kernel 4.8.0-22-generic.

C.

An *addition* to the workaround suggested by the original poster, for my use case I disabled the autosuspend feature (that causes the reset according to the logs). This seems to work fine around the problem:

# echo -1 >/sys/module/usbcore/parameters/autosuspend

With this option, I don't longer have the sound interruptions when playing music from the disk.

The modules options for the workaround looks like this:
$ cat /etc/modprobe.d/usb3-disk-bug.conf
# Get uids from lsusb -b => Id Vendor:Id Product:u
# update-initramfs -u
options usb-storage quirks=0x0bc2:0xab20:u
options usbcore autosuspend=-1

I've been seeing issues like this with a bevy of external drives hooked up through USB, on every single GNU/Linux distribution that is running kernel 4.3 or later. Sadly, this even affects recent releases of distros that exist solely to *repair* disks, like SystemRescueCD. Extremely frustrating, and I hope Ubuntu is the first distribution to release some kind of lasting fix or workaround.

same problem on ubuntu 16.10 on a lenovo yoga x1 with a rugged lacie drive

uname -a
Linux placebo 4.8.0-41-generic #44-Ubuntu SMP Fri Mar 3 15:27:17 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

[ 2049.287915] usb 2-1: new SuperSpeed USB device number 8 using xhci_hcd
[ 2049.308640] usb 2-1: New USB device found, idVendor=059f, idProduct=1061
[ 2049.308645] usb 2-1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[ 2049.308648] usb 2-1: Product: Rugged USB3-FW
[ 2049.308651] usb 2-1: Manufacturer: LaCie
[ 2049.308653] usb 2-1: SerialNumber: 00000000152a9abd1077
[ 2049.311450] scsi host0: uas
[ 2049.312151] scsi 0:0:0:0: Direct-Access LaCie Rugged FW USB3 051E PQ: 0 ANSI: 6
[ 2049.355724] sd 0:0:0:0: Attached scsi generic sg0 type 0
[ 2049.364519] sd 0:0:0:0: [sda] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
[ 2049.364835] sd 0:0:0:0: [sda] Write Protect is off
[ 2049.364836] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[ 2049.364994] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA

and then:
[ 2081.759381] sd 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: IN
[ 2081.759388] sd 0:0:0:0: tag#0 CDB: Report supported operation codes a3 0c 01 12 00 00 00 00 02 00 00 00
[ 2081.759576] scsi host0: uas_eh_bus_reset_handler start
[ 2081.879432] usb 2-1: reset SuperSpeed USB device number 8 using xhci_hcd
[ 2081.902123] scsi host0: uas_eh_bus_reset_handler success
[ 2114.526621] sd 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: IN
[ 2114.526628] sd 0:0:0:0: tag#0 CDB: Report supported operation codes a3 0c 01 12 00 00 00 00 02 00 00 00
[ 2114.526751] scsi host0: uas_eh_bus_reset_handler start
[ 2114.647413] usb 2-1: reset SuperSpeed USB device number 8 using xhci_hcd
[ 2114.669711] scsi host0: uas_eh_bus_reset_handler success
[ 2145.246599] sd 0:0:0:0: tag#0 uas_eh_abort_handler 0 uas-tag 1 inflight: IN
[ 2145.246606] sd 0:0:0:0: tag#0 CDB: Report supported operation codes a3 0c 01 12 00 00 00 00 02 00 00 00
[ 2145.246691] scsi host0: uas_eh_bus_reset_handler start
[ 2145.366868] usb 2-1: reset SuperSpeed USB device number 8 using xhci_hcd
[ 2145.388835] scsi host0: uas_eh_bus_reset_handler success

and regularli every 30sec it repeats

amichair (amichai2) wrote :

I'm having the same issue on Kubuntu 17.04, even after upgrading to latest mainline kernel 4.11.0.

The workaround works. Comment #11 helped in explaining how to do it - thanks. My device id is 0x0bc2:0xab28.

Kai-Heng Feng (kaihengfeng) wrote :

Hi, Can you guys try the kernel [1], *without* the modprobe quirk?
[1] http://people.canonical.com/~khfeng/lp1584557/

Kai-Heng Feng (kaihengfeng) wrote :

FWIW I add the quirk into Linux kernel directly, for both 0x0bc2:0x2322 and 0x0bc2:0xab28.

wdeurholt (wdeurholt) wrote :

I have this with 07ab:fca1

Kai-Heng Feng (kaihengfeng) wrote :

wdeurholt,

Do you mean "options usb-storage quirks=07ab:fca1:u" can solve the issue?

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers