Bug 1531966 - USB storage works only once per boot
Summary: USB storage works only once per boot
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-01-06 22:46 UTC by Madison Kelly
Modified: 2018-01-22 18:40 UTC (History)
17 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-01-22 09:01:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
lsusb -vvv pre-plug (59.98 KB, text/plain)
2018-01-06 23:20 UTC, Madison Kelly
no flags Details

Description Madison Kelly 2018-01-06 22:46:54 UTC
Description of problem:

I've noticed in the last month that I can plug in a USB drive once, it mounts fine, then when I unplug it, USB storage stops working. If I try to reboot, it hangs and won't actually reboot until I hard power cycle the machine.

On eject, I see this in journalctl;

====
# Manually unmount;
Jan 06 14:32:32 neutron.alteeve.com udisksd[1068]: Cleaning up mount point /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 (device 8:17 is not mounted)
# Unplug;
Jan 06 14:32:39 neutron.alteeve.com kernel: usb 2-3.2: Disable of device-initiated U1 failed.
Jan 06 14:32:40 neutron.alteeve.com kernel: usb 2-3.2: Disable of device-initiated U2 failed.
Jan 06 14:32:40 neutron.alteeve.com kernel: scsi host2: uas_post_reset: alloc streams error -19 after reset
Jan 06 14:32:40 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
====

After this, plugging in the USB drive powers the drive up, but nothing gets written to journalctl and I can't see the drive 


Version-Release number of selected component (if applicable):

Linux neutron.alteeve.com 4.14.11-300.fc27.x86_64 #1 SMP Wed Jan 3 13:52:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


How reproducible:

100%


Steps to Reproduce:
1. Plug in a USB drive, see that it is seen, gets a /dev/sdX md path, and mounts.
2. Unplug it
3. Plug it back in an observe that it doesn't get a dm path or mount.


Actual results:


Expected results:


Additional info:

The laptop is a Thinkpad 13 and the USB drives are Siig USB 3.0 2.5" carrier. I will post again shortly with more details of the hardware.

Comment 1 Madison Kelly 2018-01-06 22:59:19 UTC
Before plugging in the drive;

====
[root@neutron ~]# lsusb
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 8087:0a2b Intel Corp. 
Bus 001 Device 006: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 001 Device 004: ID 1bcf:2c82 Sunplus Innovation Technology Inc. 
Bus 001 Device 007: ID 046d:c07e Logitech, Inc. G402 Gaming Mouse
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 05ac:1402 Apple, Inc. Ethernet Adapter [A1277]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
====

journalctl -f while plugging in;

====
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: new SuperSpeed USB device number 3 using xhci_hcd
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: New USB device found, idVendor=174c, idProduct=1053
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: Product: USB3.0 Device
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: Manufacturer: Generic
Jan 06 14:52:59 neutron.alteeve.com kernel: usb 2-3.1: SerialNumber: AC0000000001
Jan 06 14:52:59 neutron.alteeve.com mtp-probe[3749]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1"
Jan 06 14:52:59 neutron.alteeve.com mtp-probe[3749]: bus: 2, device: 3 was not an MTP device
Jan 06 14:52:59 neutron.alteeve.com kernel: usbcore: registered new interface driver usb-storage
Jan 06 14:52:59 neutron.alteeve.com kernel: scsi host2: uas
Jan 06 14:52:59 neutron.alteeve.com kernel: usbcore: registered new interface driver uas
Jan 06 14:52:59 neutron.alteeve.com kernel: scsi 2:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 4096-byte physical blocks
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 06 14:52:59 neutron.alteeve.com kernel:  sdb: sdb1
Jan 06 14:52:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Jan 06 14:53:00 neutron.alteeve.com kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Jan 06 14:53:00 neutron.alteeve.com udisksd[950]: Mounted /dev/sdb1 at /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 on behalf of uid 1000
Jan 06 14:53:00 neutron.alteeve.com dbus-daemon[1902]: [session uid=1000 pid=1902] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.17' (uid=1000 pid=1990 comm="/usr/bin/gnome-shell " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jan 06 14:53:00 neutron.alteeve.com dbus-daemon[1902]: [session uid=1000 pid=1902] Successfully activated service 'org.gnome.Shell.HotplugSniffer'
====

lsusb post plug in;

====
[root@neutron ~]# lsusb
Bus 002 Device 003: ID 174c:1053 ASMedia Technology Inc. 
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 8087:0a2b Intel Corp. 
Bus 001 Device 006: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 001 Device 004: ID 1bcf:2c82 Sunplus Innovation Technology Inc. 
Bus 001 Device 007: ID 046d:c07e Logitech, Inc. G402 Gaming Mouse
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 05ac:1402 Apple, Inc. Ethernet Adapter [A1277]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
====

lsusb -vvv diff;

====
[root@neutron ~]# diff -u lsusb.pre-plug lsusb.post-plug 
--- lsusb.pre-plug	2018-01-06 14:50:42.526460119 -0800
+++ lsusb.post-plug	2018-01-06 14:53:23.297948236 -0800
@@ -1,4 +1,152 @@
 
+Bus 002 Device 003: ID 174c:1053 ASMedia Technology Inc. 
+Device Descriptor:
+  bLength                18
+  bDescriptorType         1
+  bcdUSB               3.00
+  bDeviceClass            0 
+  bDeviceSubClass         0 
+  bDeviceProtocol         0 
+  bMaxPacketSize0         9
+  idVendor           0x174c ASMedia Technology Inc.
+  idProduct          0x1053 
+  bcdDevice            1.00
+  iManufacturer           2 Generic
+  iProduct                3 USB3.0 Device
+  iSerial                 1 AC0000000001
+  bNumConfigurations      1
+  Configuration Descriptor:
+    bLength                 9
+    bDescriptorType         2
+    wTotalLength          121
+    bNumInterfaces          1
+    bConfigurationValue     1
+    iConfiguration          0 
+    bmAttributes         0xc0
+      Self Powered
+    MaxPower              144mA
+    Interface Descriptor:
+      bLength                 9
+      bDescriptorType         4
+      bInterfaceNumber        0
+      bAlternateSetting       0
+      bNumEndpoints           2
+      bInterfaceClass         8 Mass Storage
+      bInterfaceSubClass      6 SCSI
+      bInterfaceProtocol     80 Bulk-Only
+      iInterface              0 
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x81  EP 1 IN
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst              15
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x02  EP 2 OUT
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst              15
+    Interface Descriptor:
+      bLength                 9
+      bDescriptorType         4
+      bInterfaceNumber        0
+      bAlternateSetting       1
+      bNumEndpoints           4
+      bInterfaceClass         8 Mass Storage
+      bInterfaceSubClass      6 SCSI
+      bInterfaceProtocol     98 
+      iInterface              0 
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x81  EP 1 IN
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst              15
+        MaxStreams             32
+        Data-in pipe (0x03)
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x02  EP 2 OUT
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst              15
+        MaxStreams             32
+        Data-out pipe (0x04)
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x83  EP 3 IN
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst              15
+        MaxStreams             32
+        Status pipe (0x02)
+      Endpoint Descriptor:
+        bLength                 7
+        bDescriptorType         5
+        bEndpointAddress     0x04  EP 4 OUT
+        bmAttributes            2
+          Transfer Type            Bulk
+          Synch Type               None
+          Usage Type               Data
+        wMaxPacketSize     0x0400  1x 1024 bytes
+        bInterval               0
+        bMaxBurst               0
+        Command pipe (0x01)
+Binary Object Store Descriptor:
+  bLength                 5
+  bDescriptorType        15
+  wTotalLength           22
+  bNumDeviceCaps          2
+  USB 2.0 Extension Device Capability:
+    bLength                 7
+    bDescriptorType        16
+    bDevCapabilityType      2
+    bmAttributes   0x00000002
+      HIRD Link Power Management (LPM) Supported
+  SuperSpeed USB Device Capability:
+    bLength                10
+    bDescriptorType        16
+    bDevCapabilityType      3
+    bmAttributes         0x00
+    wSpeedsSupported   0x000e
+      Device can operate at Full Speed (12Mbps)
+      Device can operate at High Speed (480Mbps)
+      Device can operate at SuperSpeed (5Gbps)
+    bFunctionalitySupport   1
+      Lowest fully-functional device speed is Full Speed (12Mbps)
+    bU1DevExitLat          10 micro seconds
+    bU2DevExitLat        2047 micro seconds
+Device Status:     0x000d
+  Self Powered
+  U1 Enabled
+  U2 Enabled
+
 Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
 Device Descriptor:
   bLength                18
@@ -61,7 +209,7 @@
   wHubDelay          3202 nano seconds
   DeviceRemovable    0x08
  Hub Port Status:
-   Port 1: 0000.02a0 5Gbps power Rx.Detect
+   Port 1: 0000.0203 5Gbps power U0 enable connect
    Port 2: 0000.02a0 5Gbps power Rx.Detect
    Port 3: 0000.02a0 5Gbps power Rx.Detect
 Binary Object Store Descriptor:
@@ -164,7 +312,7 @@
  Hub Port Status:
    Port 1: 0000.02a0 5Gbps power Rx.Detect
    Port 2: 0000.02a0 5Gbps power Rx.Detect
-   Port 3: 0000.0263 5Gbps power suspend enable connect
+   Port 3: 0000.0203 5Gbps power U0 enable connect
    Port 4: 0000.02a0 5Gbps power Rx.Detect
    Port 5: 0000.02a0 5Gbps power Rx.Detect
    Port 6: 0000.02a0 5Gbps power Rx.Detect
====

journalctl during eject;

====
[root@neutron ~]# journalctl -f -n 0
-- Logs begin at Wed 2018-01-03 21:52:53 PST. --
Jan 06 14:55:59 neutron.alteeve.com kernel: usb 2-3.1: Disable of device-initiated U1 failed.
Jan 06 14:55:59 neutron.alteeve.com kernel: usb 2-3.1: Disable of device-initiated U2 failed.
Jan 06 14:55:59 neutron.alteeve.com kernel: scsi host2: uas_post_reset: alloc streams error -19 after reset
Jan 06 14:55:59 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 06 14:55:59 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jan 06 14:55:59 neutron.alteeve.com udisksd[950]: Cleaning up mount point /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 (device 8:17 no longer exists)
====

lsusb (note that ASMedia is still showing):

====
[root@neutron ~]# lsusb
Bus 002 Device 003: ID 174c:1053 ASMedia Technology Inc. 
Bus 002 Device 002: ID 0bda:0411 Realtek Semiconductor Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 008: ID 8087:0a2b Intel Corp. 
Bus 001 Device 006: ID 138a:0011 Validity Sensors, Inc. VFS5011 Fingerprint Reader
Bus 001 Device 004: ID 1bcf:2c82 Sunplus Innovation Technology Inc. 
Bus 001 Device 007: ID 046d:c07e Logitech, Inc. G402 Gaming Mouse
Bus 001 Device 003: ID 0bda:5411 Realtek Semiconductor Corp. 
Bus 001 Device 002: ID 05ac:1402 Apple, Inc. Ethernet Adapter [A1277]
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
====

lsusb -vvv hangs, and wouldn't return on 'ctrl + c', and couldn't be killed with 'kill -9' either.

Comment 2 Hans de Goede 2018-01-06 23:11:18 UTC
Hi,

I think I know what is going on here. Do you see this message:

Jan 06 14:32:40 neutron.alteeve.com kernel: scsi host2: uas_post_reset: alloc streams error -19 after reset

On each unplug and is the error-code always: "-19" ?

Regards,

Hans

Comment 3 Madison Kelly 2018-01-06 23:18:04 UTC
Here's what I see on the screen when I try to power off:

https://photos.app.goo.gl/OnswnDWH8jBwEjtD3

Here's what I see when I try to reboot:

https://photos.app.goo.gl/uKh0FzPvTKrPDsOE2

https://photos.app.goo.gl/5NljT8pr7FmlahU02

https://photos.app.goo.gl/dfSt4OeRsiJZhMD52

https://photos.app.goo.gl/PB0A4pNd7hzP607t1

At this point, I have to press and hold the power button for >4 seconds to force the laptop off.

Comment 4 Madison Kelly 2018-01-06 23:19:11 UTC
Hans,

  Yes, I believe so.

Comment 5 Madison Kelly 2018-01-06 23:20:15 UTC
Created attachment 1377987 [details]
lsusb -vvv pre-plug

Comment 6 Hans de Goede 2018-01-06 23:27:02 UTC
(In reply to digimer from comment #4)
> Hans,
> 
>   Yes, I believe so.

Ok, I believe that this patch should fix this:

--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1080,6 +1080,8 @@ static int uas_post_reset(struct usb_interface *intf)
                shost_printk(KERN_ERR, shost,
                             "%s: alloc streams error %d after reset",
                             __func__, err);
+         /* So that scsi_remove_host in uas_disconnect does not hang */
+         scsi_unblock_requests(shost);
                return 1;
        }
 

If you've experience with building your own kernels give this a try please. If you've no such experience, let me know and I will build a kernel with this patch for you tomorrow (it is 00:26 over here now :)

Comment 7 Hans de Goede 2018-01-06 23:27:54 UTC
Proper patch with tabs instead of spaces:

diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c
index 5d04c40ee40a..e320506743bb 100644
--- a/drivers/usb/storage/uas.c
+++ b/drivers/usb/storage/uas.c
@@ -1080,6 +1080,8 @@ static int uas_post_reset(struct usb_interface *intf)
 		shost_printk(KERN_ERR, shost,
 			     "%s: alloc streams error %d after reset",
 			     __func__, err);
+		/* So that scsi_remove_host in uas_disconnect does not hang */
+		scsi_unblock_requests(shost);
 		return 1;
 	}

Comment 8 Madison Kelly 2018-01-06 23:52:47 UTC
Forgive my ignorance... Can you point me to instructions on how to apply/test this patch?

Thanks!

Comment 9 Hans de Goede 2018-01-07 10:59:28 UTC
Hi,

(In reply to digimer from comment #8)
> Forgive my ignorance... Can you point me to instructions on how to
> apply/test this patch?

No worries and thank you for reporting this, this is likely the bite more users, so getting this fixed is a good thing.

A kernel with the proposed patch to fix this is building here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=24055998

Note it will typically take a couple of hours for this to finish. To test this kernel download kernel-core-....x86_64.rpm and kernel-modules-....x86_64.rpm, put them both in a dir and from that dir run:

sudo rpm -ivh kernel-*.x86_64.rpm

and then reboot into the new kernel.

Please let me know if this fixes things for you, if it does fix things then I will submit the patch upstream and add it to the Fedora kernels for now.

Regards,

Hans

Comment 10 Hans de Goede 2018-01-07 15:46:31 UTC
Note the build has finished now, you can find the rpms here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=24056003

Comment 11 Madison Kelly 2018-01-07 19:18:03 UTC
I've just installed them, thanks! I will test later today and report back.

Comment 12 Madison Kelly 2018-01-07 22:11:42 UTC
Hi,

  I got a "has invalid signature" when I try to boot your kernel (https://photos.app.goo.gl/W4nRLgWU9tvuMNFt2), which is the same thing I got when I tried to build a kernel I built yesterday with the patch applied. 

  Oddly enough, the USB can be reconnected now... I wonder if the uas.c recompile made it into the system and is used by the old kernel now?

Here is the journalctl output from a few plugs/unplugs using two drives across two USB ports;

====
[root@neutron ~]# journalctl -f -n 0 
-- Logs begin at Fri 2018-01-05 21:59:38 PST. --
Jan 07 14:06:13 neutron.alteeve.com realmd[1741]: quitting realmd service after timeout
Jan 07 14:06:13 neutron.alteeve.com realmd[1741]: stopping service
Jan 07 14:06:13 neutron.alteeve.com audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=realmd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: new SuperSpeed USB device number 3 using xhci_hcd
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: New USB device found, idVendor=174c, idProduct=1053
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: Product: USB3.0 Device
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: Manufacturer: Generic
Jan 07 14:06:16 neutron.alteeve.com kernel: usb 2-2: SerialNumber: AC0000000001
Jan 07 14:06:16 neutron.alteeve.com mtp-probe[3532]: checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
Jan 07 14:06:16 neutron.alteeve.com mtp-probe[3532]: bus: 2, device: 3 was not an MTP device
Jan 07 14:06:16 neutron.alteeve.com kernel: usbcore: registered new interface driver usb-storage
Jan 07 14:06:16 neutron.alteeve.com kernel: scsi host2: uas
Jan 07 14:06:16 neutron.alteeve.com kernel: usbcore: registered new interface driver uas
Jan 07 14:06:16 neutron.alteeve.com kernel: scsi 2:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 4096-byte physical blocks
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 07 14:06:16 neutron.alteeve.com kernel:  sdb: sdb1
Jan 07 14:06:16 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Attached SCSI disk


Jan 07 14:06:17 neutron.alteeve.com kernel: EXT4-fs (sdb1): recovery complete
Jan 07 14:06:17 neutron.alteeve.com kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Jan 07 14:06:17 neutron.alteeve.com udisksd[963]: Mounted /dev/sdb1 at /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 on behalf of uid 1000


Jan 07 14:06:19 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.17' (uid=1000 pid=1963 comm="/usr/bin/gnome-shell " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jan 07 14:06:19 neutron.alteeve.com tracker-miner-f[2423]: Could not set mount point in database 'urn:nepomuk:datasource:506ba3bb-5a9d-4df7-807e-b7c5fa196018', GDBus.Error:org.freedesktop.Tracker1.SparqlError.Internal: UNIQUE constraint failed: nie:DataObject.nie:url
Jan 07 14:06:19 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Successfully activated service 'org.gnome.Shell.HotplugSniffer'
Jan 07 14:06:19 neutron.alteeve.com audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 msg='unit=fprintd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


Jan 07 14:06:23 neutron.alteeve.com kernel: xhci_hcd 0000:00:14.0: Cannot set link state.
Jan 07 14:06:23 neutron.alteeve.com kernel: usb usb2-port2: cannot disable (err = -32)
Jan 07 14:06:23 neutron.alteeve.com kernel: usb 2-2: USB disconnect, device number 3
Jan 07 14:06:23 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:06:23 neutron.alteeve.com kernel: Aborting journal on device sdb1-8.
Jan 07 14:06:23 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:06:23 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:23 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jan 07 14:06:23 neutron.alteeve.com udisksd[963]: Cleaning up mount point /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 (device 8:17 no longer exists)
Jan 07 14:06:23 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:23 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:23 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:23 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:23 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK


Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: new SuperSpeed USB device number 4 using xhci_hcd
Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: New USB device found, idVendor=174c, idProduct=1053
Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: Product: USB3.0 Device
Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: Manufacturer: Generic
Jan 07 14:06:32 neutron.alteeve.com kernel: usb 2-2: SerialNumber: AC0000000001
Jan 07 14:06:32 neutron.alteeve.com kernel: scsi host2: uas
Jan 07 14:06:32 neutron.alteeve.com kernel: scsi 2:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jan 07 14:06:32 neutron.alteeve.com kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 07 14:06:32 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 976773168 512-byte logical blocks: (500 GB/466 GiB)
Jan 07 14:06:32 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 07 14:06:32 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 07 14:06:32 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 07 14:06:32 neutron.alteeve.com mtp-probe[3619]: checking bus 2, device 4: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
Jan 07 14:06:32 neutron.alteeve.com mtp-probe[3619]: bus: 2, device: 4 was not an MTP device
Jan 07 14:06:33 neutron.alteeve.com kernel:  sdb: sdb1
Jan 07 14:06:33 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Jan 07 14:06:34 neutron.alteeve.com udisksd[963]: Mounted /dev/sdb1 at /run/media/digimer/Videos on behalf of uid 1000
Jan 07 14:06:34 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.17' (uid=1000 pid=1963 comm="/usr/bin/gnome-shell " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jan 07 14:06:34 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Successfully activated service 'org.gnome.Shell.HotplugSniffer'


Jan 07 14:06:38 neutron.alteeve.com kernel: xhci_hcd 0000:00:14.0: Cannot set link state.
Jan 07 14:06:38 neutron.alteeve.com kernel: usb usb2-port2: cannot disable (err = -32)
Jan 07 14:06:38 neutron.alteeve.com kernel: usb 2-2: USB disconnect, device number 4
Jan 07 14:06:38 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jan 07 14:06:38 neutron.alteeve.com udisksd[963]: Cleaning up mount point /run/media/digimer/Videos (device 8:17 no longer exists)
Jan 07 14:06:38 neutron.alteeve.com mount.exfat[3631]: failed to write super block
Jan 07 14:06:38 neutron.alteeve.com kernel: blk_partition_remap: fail for partition 1
Jan 07 14:06:38 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK


Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: new SuperSpeed USB device number 5 using xhci_hcd
Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: New USB device found, idVendor=174c, idProduct=1053
Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: Product: USB3.0 Device
Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: Manufacturer: Generic
Jan 07 14:06:47 neutron.alteeve.com kernel: usb 2-2: SerialNumber: AC0000000001
Jan 07 14:06:47 neutron.alteeve.com kernel: scsi host2: uas
Jan 07 14:06:47 neutron.alteeve.com kernel: scsi 2:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 4096-byte physical blocks
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 07 14:06:47 neutron.alteeve.com mtp-probe[3663]: checking bus 2, device 5: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-2"
Jan 07 14:06:47 neutron.alteeve.com mtp-probe[3663]: bus: 2, device: 5 was not an MTP device
Jan 07 14:06:47 neutron.alteeve.com kernel:  sdb: sdb1
Jan 07 14:06:47 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Jan 07 14:06:49 neutron.alteeve.com kernel: EXT4-fs (sdb1): recovery complete
Jan 07 14:06:49 neutron.alteeve.com kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Jan 07 14:06:49 neutron.alteeve.com udisksd[963]: Mounted /dev/sdb1 at /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 on behalf of uid 1000
Jan 07 14:06:49 neutron.alteeve.com tracker-miner-f[2423]: Could not set mount point in database 'urn:nepomuk:datasource:506ba3bb-5a9d-4df7-807e-b7c5fa196018', GDBus.Error:org.freedesktop.Tracker1.SparqlError.Internal: UNIQUE constraint failed: nie:DataObject.nie:url
Jan 07 14:06:49 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.17' (uid=1000 pid=1963 comm="/usr/bin/gnome-shell " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jan 07 14:06:49 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Successfully activated service 'org.gnome.Shell.HotplugSniffer'


Jan 07 14:06:52 neutron.alteeve.com kernel: xhci_hcd 0000:00:14.0: Cannot set link state.
Jan 07 14:06:52 neutron.alteeve.com kernel: usb usb2-port2: cannot disable (err = -32)
Jan 07 14:06:52 neutron.alteeve.com kernel: usb 2-2: USB disconnect, device number 5
Jan 07 14:06:52 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:06:52 neutron.alteeve.com kernel: Aborting journal on device sdb1-8.
Jan 07 14:06:52 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:06:52 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:52 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jan 07 14:06:52 neutron.alteeve.com udisksd[963]: Cleaning up mount point /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 (device 8:17 no longer exists)
Jan 07 14:06:52 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:52 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:52 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:52 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:06:52 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
Jan 07 14:06:57 neutron.alteeve.com kernel: usb 1-2.1: USB disconnect, device number 4


Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: new SuperSpeed USB device number 6 using xhci_hcd
Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: New USB device found, idVendor=174c, idProduct=1053
Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: New USB device strings: Mfr=2, Product=3, SerialNumber=1
Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: Product: USB3.0 Device
Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: Manufacturer: Generic
Jan 07 14:07:04 neutron.alteeve.com kernel: usb 2-3.1: SerialNumber: AC0000000001
Jan 07 14:07:04 neutron.alteeve.com kernel: scsi host2: uas
Jan 07 14:07:04 neutron.alteeve.com kernel: scsi 2:0:0:0: Direct-Access     ASMT     2105             0    PQ: 0 ANSI: 6
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] 4096-byte physical blocks
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write Protect is off
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Mode Sense: 43 00 00 00
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Jan 07 14:07:04 neutron.alteeve.com mtp-probe[3733]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3/2-3.1"
Jan 07 14:07:04 neutron.alteeve.com mtp-probe[3733]: bus: 2, device: 6 was not an MTP device
Jan 07 14:07:04 neutron.alteeve.com kernel:  sdb: sdb1
Jan 07 14:07:04 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Attached SCSI disk
Jan 07 14:07:05 neutron.alteeve.com kernel: EXT4-fs (sdb1): recovery complete
Jan 07 14:07:05 neutron.alteeve.com kernel: EXT4-fs (sdb1): mounted filesystem with ordered data mode. Opts: (null)
Jan 07 14:07:05 neutron.alteeve.com udisksd[963]: Mounted /dev/sdb1 at /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 on behalf of uid 1000
Jan 07 14:07:05 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Activating service name='org.gnome.Shell.HotplugSniffer' requested by ':1.17' (uid=1000 pid=1963 comm="/usr/bin/gnome-shell " label="unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023")
Jan 07 14:07:05 neutron.alteeve.com tracker-miner-f[2423]: Could not set mount point in database 'urn:nepomuk:datasource:506ba3bb-5a9d-4df7-807e-b7c5fa196018', GDBus.Error:org.freedesktop.Tracker1.SparqlError.Internal: UNIQUE constraint failed: nie:DataObject.nie:url
Jan 07 14:07:05 neutron.alteeve.com dbus-daemon[1872]: [session uid=1000 pid=1872] Successfully activated service 'org.gnome.Shell.HotplugSniffer'


Jan 07 14:07:08 neutron.alteeve.com kernel: usb 2-3.1: USB disconnect, device number 6
Jan 07 14:07:08 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:07:08 neutron.alteeve.com kernel: Aborting journal on device sdb1-8.
Jan 07 14:07:08 neutron.alteeve.com kernel: JBD2: Error -5 detected when updating journal superblock for sdb1-8.
Jan 07 14:07:08 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronizing SCSI cache
Jan 07 14:07:08 neutron.alteeve.com udisksd[963]: Cleaning up mount point /run/media/digimer/506ba3bb-5a9d-4df7-807e-b7c5fa196018 (device 8:17 no longer exists)
Jan 07 14:07:08 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:07:08 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:07:08 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:07:08 neutron.alteeve.com kernel: print_req_error: I/O error, dev sdb, sector 0
Jan 07 14:07:08 neutron.alteeve.com kernel: sd 2:0:0:0: [sdb] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
====

Comment 13 Hans de Goede 2018-01-08 07:36:10 UTC
Hi,

(In reply to digimer from comment #12)
>   I got a "has invalid signature" when I try to boot your kernel
> (https://photos.app.goo.gl/W4nRLgWU9tvuMNFt2), which is the same thing I got
> when I tried to build a kernel I built yesterday with the patch applied. 

Ah yes, sorry test builds like these are not signed, so you need to disable "
secure boot" in your BIOS under the security settings (you can re-enable it after testing).

>   Oddly enough, the USB can be reconnected now... I wonder if the uas.c
> recompile made it into the system and is used by the old kernel now?

No, as I was afraid this is timing related, specifically to how fast you
pull out the USB connector, for this bug to trigger the USB-3 port needs to think that there was an intermediate error and try to reset the connection, hence the uas_post_reset error.

You could try pulling out the connector slowly to reproduce this. It is even possible that there was some dirt on the connector which repeated plugging / unplugging has cleared...  Anyways if you can reproduce somehow, please try the kernel I built. You will now that you've hid the previously bad code path by these 2 messages showing up on unplug:

Jan 06 14:32:39 neutron.alteeve.com kernel: usb 2-3.2: Disable of device-initiated U1 failed.
Jan 06 14:32:40 neutron.alteeve.com kernel: usb 2-3.2: Disable of device-initiated U2 failed.

Regards,

Hans

Comment 14 Hans de Goede 2018-01-08 07:40:14 UTC
s/hid/hit/

Comment 15 Hans de Goede 2018-01-22 09:01:49 UTC
The patch I've written to fix this has been queued for merging into the upstream 4.16 kernel and as such will show up in the Fedora kernels once they move over to 4.16, closing this with a resolution of upstream.

Comment 16 Madison Kelly 2018-01-22 18:40:02 UTC
Thanks for this!


Note You need to log in before you can comment on or make changes to this bug.