Bug 1351305 - kernel-4.6.3-300 shows false warnings about USB hard disks.
Summary: kernel-4.6.3-300 shows false warnings about USB hard disks.
Status: CLOSED CANTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 25
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Keywords:
: 1364769 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-06-29 16:26 UTC by Account closed by the user
Modified: 2017-12-07 15:46 UTC (History)
31 users (show)

(edit)
Clone Of:
(edit)
Last Closed: 2017-05-14 01:36:08 UTC


Attachments (Terms of Use)
lspci -nn (deleted)
2016-06-29 16:26 UTC, Account closed by the user
no flags Details
lsusb -d 1058:070a (2.47 KB, text/plain)
2016-06-29 16:27 UTC, Account closed by the user
no flags Details
/va/log/messages warnings only (23.19 KB, text/plain)
2016-06-29 16:29 UTC, Account closed by the user
no flags Details
lspci -nn (3.34 KB, text/plain)
2016-06-29 16:31 UTC, Account closed by the user
no flags Details
dmesg (94.36 KB, text/plain)
2016-06-30 14:57 UTC, Account closed by the user
no flags Details
lsusb -v -d 0bc2:3300 (2.24 KB, text/plain)
2016-09-13 07:29 UTC, Andrea Perotti
no flags Details
usbmon trace requested by Alan Stern (115.85 KB, text/plain)
2017-05-18 01:30 UTC, GeekGirl1
no flags Details
Test patch to prevent usb-storage from reporting No Sense as a Hardware Error (666 bytes, patch)
2017-05-24 16:14 UTC, Alan Stern
no flags Details | Diff

Description Account closed by the user 2016-06-29 16:26:38 UTC
kernel: sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
kernel: sd 5:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
kernel: sd 5:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
kernel: sd 5:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
kernel: sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
kernel: sd 5:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
kernel: sd 5:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
kernel: sd 5:0:0:0: [sdb] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00

4.6.2-301.fc24.x86_64, or any previous kernel, does not show this behaviour.

Comment 1 Account closed by the user 2016-06-29 16:27 UTC
Created attachment 1174044 [details]
lsusb -d 1058:070a

Comment 2 Account closed by the user 2016-06-29 16:29 UTC
Created attachment 1174045 [details]
/va/log/messages warnings only

Comment 3 Account closed by the user 2016-06-29 16:31 UTC
Created attachment 1174047 [details]
lspci  -nn

Comment 4 Account closed by the user 2016-06-30 14:57 UTC
Created attachment 1174638 [details]
dmesg

Comment 5 Account closed by the user 2016-06-30 15:02:03 UTC
This is very strange, it happens exactly every 10 minutes(from /var/log/messages)

Jun 30 14:24:01
Jun 30 14:34:01
Jun 30 14:44:01
Jun 30 14:54:01
Jun 30 15:04:01
Jun 30 15:14:01
Jun 30 15:24:01
Jun 30 15:34:01
Jun 30 15:44:01
Jun 30 15:54:01
Jun 30 16:04:01
Jun 30 16:14:01
Jun 30 16:24:01
Jun 30 16:34:01
Jun 30 16:44:01
Jun 30 16:54:01

Comment 6 MartinG 2016-08-01 18:57:59 UTC
I see the same after booting kernel-4.6.4-201.fc23.x86_64. I did not see this before. I have an external USB HDD. It is encrypted, not sure if that is applicable.

For me, I get the error exactly every 5 minutes:
Aug  1 20:40:06 localhost kernel: [23849.467082] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Aug  1 20:40:06 localhost kernel: [23849.467088] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Aug  1 20:40:06 localhost kernel: [23849.467090] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
Aug  1 20:40:06 localhost kernel: [23849.467094] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
Aug  1 20:45:07 localhost kernel: [24150.108600] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Aug  1 20:45:07 localhost kernel: [24150.108605] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Aug  1 20:45:07 localhost kernel: [24150.108608] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
Aug  1 20:45:07 localhost kernel: [24150.108611] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
Aug  1 20:50:06 localhost kernel: [24449.793107] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Aug  1 20:50:06 localhost kernel: [24449.793112] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Aug  1 20:50:06 localhost kernel: [24449.793115] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
Aug  1 20:50:06 localhost kernel: [24449.793118] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
Aug  1 20:55:06 localhost kernel: [24749.682366] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Aug  1 20:55:06 localhost kernel: [24749.682371] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Aug  1 20:55:06 localhost kernel: [24749.682373] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
Aug  1 20:55:06 localhost kernel: [24749.682377] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00

Comment 7 Maarten van Leunen 2016-08-10 07:38:15 UTC
*** Bug 1364769 has been marked as a duplicate of this bug. ***

Comment 8 David Both 2016-08-16 01:10:01 UTC
I have 2 external USB hard drives connected to my system; one (WD MyPassport) has a hard-wired backup partition in addition to the main data partition. All three devices have been reported with these same errors in my dmesg buffer and the messages log file. As in a previous comment, this occurs at about 10 minute intervals.  

My kernel is: 4.6.5-300.fc24.x86_64

Comment 9 Danny 2016-09-08 23:42:57 UTC
Happening for me as well, latest Fedora 24 updates, running kernel:
4.7.2-201.fc24.x86_64

Comment 10 Andrea Perotti 2016-09-13 07:23:19 UTC
Hi, same problem here, notice on F24 kernel 4.7.2-201.fc24:

F24:

Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: new high-speed USB device number 6 using xhci_hcd
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: New USB device found, idVendor=0bc2, idProduct=3300
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: Product: Desktop         
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: Manufacturer: Seagate 
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb 2-3: SerialNumber: 2GHKA1L7    
Sep 13 09:03:31 stakanov6.goodfellow.local mtp-probe[2506]: checking bus 2, device 6: "/sys/devices/pci0000:00/0000:00:14.0/usb2/2-3"
Sep 13 09:03:31 stakanov6.goodfellow.local mtp-probe[2506]: bus: 2, device: 6 was not an MTP device
Sep 13 09:03:31 stakanov6.goodfellow.local systemd-udevd[2505]: Process '/usr/bin/setfacl -m g:lirc:rw ' failed with exit code 2.
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usb-storage 2-3:1.0: USB Mass Storage device detected
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: scsi host3: usb-storage 2-3:1.0
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usbcore: registered new interface driver usb-storage
Sep 13 09:03:31 stakanov6.goodfellow.local kernel: usbcore: registered new interface driver uas
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: scsi 3:0:0:0: Direct-Access     Seagate  Desktop          0130 PQ: 0 ANSI: 4
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: Attached scsi generic sg1 type 0
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/932 GiB)
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] Write Protect is off
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] Mode Sense: 2f 08 00 00
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] No Caching mode page found
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] Assuming drive cache: write through
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] Attached SCSI disk
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Sep 13 09:03:32 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[...]
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Sep 13 09:12:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00
[...]
Sep 13 09:22:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Sep 13 09:22:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Sep 13 09:22:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Sep 13 09:22:09 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
Sep 13 09:22:10 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Sep 13 09:22:10 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Sep 13 09:22:10 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Sep 13 09:22:10 stakanov6.goodfellow.local kernel: sd 3:0:0:0: [sdb] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00

Comment 11 Andrea Perotti 2016-09-13 07:29 UTC
Created attachment 1200375 [details]
lsusb -v -d 0bc2:3300

Comment 12 Paolo Bonzini 2016-09-14 14:08:28 UTC
This is a reset command. It is harmless but anyway this is the culprit patch: https://patchwork.kernel.org/patch/9194207/ - it's the only scsi patch in 4.6.2..4.6.3.

I suggest you report it to linux-scsi@vger.kernel.org.

I'm curious who is sending that command.  You may try using systemtap to look for senders of SG_IO ioctls.

Comment 13 Arno Moeller 2016-09-23 16:32:44 UTC
No need for systemtap. udisks2 is sending that command. It's doing this in src/udiskslinuxdrive.c (line 1212++.):
  io_v4.guard = 'Q';
  io_v4.protocol = BSG_PROTOCOL_SCSI;
  io_v4.subprotocol = BSG_SUB_PROTOCOL_SCSI_CMD;
  io_v4.request_len = cdb_len;
  io_v4.request = (uintptr_t) cdb;
  io_v4.max_response_len = sizeof (sense);
  io_v4.response = (uintptr_t) sense;
  io_v4.timeout = timeout_msec;

  rc = ioctl (fd, SG_IO, &io_v4);
  ^^^ This is the culprit
  if (rc != 0)
    {
      /* could be that the driver doesn't do version 4, try version 3 */
      if (errno == EINVAL)
        {
          struct sg_io_hdr io_hdr;
          memset (&io_hdr, 0, sizeof (struct sg_io_hdr));
          io_hdr.interface_id = 'S';
          io_hdr.cmdp = (unsigned char*) cdb;
          io_hdr.cmd_len = cdb_len;
          io_hdr.dxfer_direction = SG_DXFER_NONE;
          io_hdr.sbp = sense;
          io_hdr.mx_sb_len = sizeof (sense);
          io_hdr.timeout = timeout_msec;

stracing gives (sdj is the drive causing this):

[pid 27993] open("/dev/sdj", O_RDONLY|O_NONBLOCK) = 16
[pid 27993] ioctl(16, SG_IO, {'Q', BSG_PROTOCOL_SCSI, BSG_SUB_PROTOCOL_SCSI_CMD, request[16]=[85, 06, 20, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, e5, 00], request_tag=0, request_attr=0, request_priority=0, request_extra=0, max_response_len=32, dout_iovec_count=0, dout_xfer_len=0, din_iovec_count=0, din_xfer_len=0, timeout=5000, flags=0, usr_ptr=0, spare_in=0, dout[0]=NULL}) = -1 EINVAL (Invalid argument)
[pid 27993] ioctl(16, SG_IO, {'S', SG_DXFER_NONE, cmd[16]=[85, 06, 20, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, 00, e5, 00], mx_sb_len=32, iovec_count=0, dxfer_len=0, timeout=5000, flags=0, status=00, masked_status=00, sb[22]=[72, 04, 00, 00, 00, 00, 00, 0e, 09, 0c, 00, 00, 00, ff, 00, 00, 00, 00, 00, 00, 00, 50], host_status=0x7, driver_status=0x8, resid=0, duration=0, info=0x1}) = 0
[pid 27993] close(16)

Further information:
* udisks source: https://udisks.freedesktop.org/releases/udisks-2.1.7.tar.bz2

$ uname -a
Linux hadante 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64 GNU/Linux

# smartctl -a /dev/sdj
smartctl 6.5 2016-05-07 r4318 [x86_64-linux-4.7.2-1-ARCH] (local build)
Copyright (C) 2002-16, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     Western Digital Green
Device Model:     WDC WD20EZRX-00D8PB0
Serial Number:    WD-WMC4M1418198
LU WWN Device Id: 5 0014ee 603ddaee2
Firmware Version: 80.00A80
User Capacity:    2,000,398,934,016 bytes [2.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical                                                            
Rotation Rate:    5400 rpm                                                                                          
Device is:        In smartctl database [for details use: -P show]                                                   
ATA Version is:   ACS-2 (minor revision not indicated)                                                              
SATA Version is:  SATA 3.0, 6.0 Gb/s (current: 1.5 Gb/s)                                                            
Local Time is:    Thu Sep 22 02:21:33 2016 CEST                                                                     
SMART support is: Available - device has SMART capability.                                                          
SMART support is: Enabled
...

HTH...

Comment 14 Paolo Bonzini 2016-09-28 12:54:00 UTC
Actually it's udisks_ata_send_command_sync in udisksata.c.  It's sending power management and SMART commands.

Comment 15 Arno Moeller 2016-09-30 15:28:46 UTC
To quote Col. O'Neill from Stargate: So close. :)

Can this be fixed somehow, please? Maybe by rate limiting? I know it's harmless, but it's spamming the kernel log hiding potentially important messages.

Is this a udisks problem or a kernel regression?

Comment 16 Paolo Bonzini 2016-10-03 10:27:13 UTC
It's a kernel issue.

Comment 17 Paolo Bonzini 2016-10-03 22:58:51 UTC
Folks, what do you have in /proc/sys/kernel/printk?  The way I read the code, these should be KERN_INFO (severity 6) messages.

Comment 18 David Both 2016-10-03 23:02:00 UTC
[root@david ~]# cat /proc/sys/kernel/printk
4       4       1       7

Comment 19 Rand Kmiec 2016-10-04 00:36:06 UTC
Same here:

# cat /proc/sys/kernel/printk
4	4	1	7

Comment 20 Arno Moeller 2016-10-04 03:22:30 UTC
$ cat /proc/sys/kernel/printk
4       4       1       4

Comment 21 Account closed by the user 2016-10-08 18:53:28 UTC
$ cat /proc/sys/kernel/printk
7       4       1       7

Comment 22 Andrea Perotti 2016-10-17 11:13:30 UTC
cat /proc/sys/kernel/printk
4       4       1       7

Comment 23 George L. Roman 2016-10-19 00:46:57 UTC
# Yes, every 10 minutes.

% cat /proc/sys/kernel/printk
7	4	1	7

% uname -a
Linux xxx 4.6.4-201.fc23.x86_64 #1 SMP Tue Jul 12 11:43:59 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

# Trying 4.7.7-100 next.

Comment 24 Arno Moeller 2016-10-23 17:21:46 UTC
Still happens with
$ uname -a
Linux hadante 4.8.3-1-ARCH #1 SMP PREEMPT Thu Oct 20 19:53:59 CEST 2016 x86_64 GNU/Linux
$ cat /proc/sys/kernel/printk
4       4       1       4

Config:
https://git.archlinux.org/svntogit/packages.git/plain/trunk/config?h=packages/linux

Comment 25 koraq 2017-01-03 19:18:36 UTC
found in 4.8.15-300.fc25.x86_64 as well:

[ 3012.191685] sd 6:0:0:0: [sdc] 1953525167 512-byte logical blocks: (1.00 TB/932 GiB)
[ 3012.192453] sd 6:0:0:0: [sdc] Write Protect is off
[ 3012.192462] sd 6:0:0:0: [sdc] Mode Sense: 1f 00 10 08
[ 3012.193070] sd 6:0:0:0: [sdc] Write cache: disabled, read cache: enabled, supports DPO and FUA
[ 3012.226723]  sdc: sdc1
[ 3012.228532] sd 6:0:0:0: [sdc] Attached SCSI disk
[ 3012.399590] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[ 3012.399599] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[ 3012.399603] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[ 3012.399610] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[ 3012.578779] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[ 3012.578786] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[ 3012.578790] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[ 3012.578797] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00

Comment 26 Laura Abbott 2017-01-17 01:12:14 UTC
*********** MASS BUG UPDATE **************
We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.
 
Fedora 25 has now been rebased to 4.9.3-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.
 
If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.
 
If you experience different issues, please open a new bug report for those.

Comment 27 David Both 2017-01-17 01:35:51 UTC
Yes. Still experiencing this bug with Fedora 25 and kernel 4.8.15-300.fc25.x86_64



[113959.353065] sd 13:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[113959.353068] sd 13:0:0:0: [sdi] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[113959.353069] sd 13:0:0:0: [sdi] tag#0 Add. Sense: No additional sense information
[113959.353072] sd 13:0:0:0: [sdi] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[113959.553202] sd 13:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[113959.553206] sd 13:0:0:0: [sdi] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[113959.553207] sd 13:0:0:0: [sdi] tag#0 Add. Sense: No additional sense information
[113959.553210] sd 13:0:0:0: [sdi] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00
[114055.015611] sd 13:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[114055.015614] sd 13:0:0:0: [sdi] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[114055.015616] sd 13:0:0:0: [sdi] tag#0 Add. Sense: No additional sense information
[114055.015618] sd 13:0:0:0: [sdi] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[114055.409998] sd 13:0:0:0: [sdi] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[114055.410001] sd 13:0:0:0: [sdi] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[114055.410002] sd 13:0:0:0: [sdi] tag#0 Add. Sense: No additional sense information
[114055.410005] sd 13:0:0:0: [sdi] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00

Comment 28 Account closed by the user 2017-01-17 01:40:08 UTC
Also with 4.9.4-200.fc25.x86_64

Comment 29 GeekGirl1 2017-01-19 01:19:39 UTC
The error is present in Fedora 25 and kernel 4.9.3-200.fc25.x86_64.

Results show the log is updated at 8 to minute intervals.


#dmesg -d

[13906.843319 <  592.754641>] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[13906.843321 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[13906.843323 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[13906.843325 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[13907.332415 <    0.489090>] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[13907.332418 <    0.000003>] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[13907.332420 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[13907.332422 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00
[14432.855927 <  525.523505>] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[14432.855931 <    0.000004>] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[14432.855932 <    0.000001>] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[14432.855934 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[14433.322915 <    0.466981>] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[14433.322917 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[14433.322919 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[14433.322921 <    0.000002>] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00

Comment 30 Stefano Forli 2017-01-19 21:49:03 UTC
I know the bug report is specifically for Fedora, but I've found this web page because I have the same problem on a Debian stable 8.2, and so far it seems it's the only place where it has been reported.

I run a 3.x kernel version, which is way older than any of the kernels mentioned here, so maybe it may be useful for debugging the issue (a backported patch, maybe?):

# uname -a
Linux xxx 3.16.0-4-amd64 #1 SMP Debian 3.16.39-1 (2016-12-30) x86_64 GNU/Linux

The error appears for four different external USB hard drives (not encrypted) when they are connected and mounted. Disks have been tested with badblocks with no errors found. Errors repeat regularly every 10 minutes.

[156565.330844] sd 9:0:0:0: [sdf] CDB: 
[156565.330846] ATA command pass through(12)/Blank: a1 06 20 00 00 00 00 00 00 e5 00 00
[156565.804718] sd 9:0:0:0: [sdf] Unhandled sense code
[156565.804725] sd 9:0:0:0: [sdf]  
[156565.804729] Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[156565.804732] sd 9:0:0:0: [sdf]  
[156565.804734] Sense Key : Hardware Error [current] [descriptor]
[156565.804739] Descriptor sense data with sense descriptors (in hex):
[156565.804741]         72 04 00 00 00 00 00 0e 09 0c 00 00 00 00 00 00 
[156565.804764]         00 4f 00 c2 00 50 
[156565.804770] sd 9:0:0:0: [sdf]  
[156565.804772] Add. Sense: No additional sense information
[156565.804774] sd 9:0:0:0: [sdf] CDB: 
[156565.804776] ATA command pass through(12)/Blank: a1 06 20 da 00 00 4f c2 00 b0 00 00
[156565.886164] sd 8:0:0:0: [sde] Unhandled sense code
[156565.886183] sd 8:0:0:0: [sde]  
[156565.886184] Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[156565.886186] sd 8:0:0:0: [sde]  
[156565.886187] Sense Key : Hardware Error [current] [descriptor]
[156565.886189] Descriptor sense data with sense descriptors (in hex):
[156565.886190]         72 04 00 00 00 00 00 0e 09 0c 00 00 00 ff 00 00 
[156565.886195]         00 00 00 00 00 50 
[156565.886198] sd 8:0:0:0: [sde]  
[156565.886199] Add. Sense: No additional sense information
[156565.886201] sd 8:0:0:0: [sde] CDB: 
[156565.886202] ATA command pass through(12)/Blank: a1 06 20 00 00 00 00 00 00 e5 00 00
[156566.355217] sd 8:0:0:0: [sde] Unhandled sense code
[156566.355235] sd 8:0:0:0: [sde]  
[156566.355238] Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[156566.355240] sd 8:0:0:0: [sde]  
[156566.355242] Sense Key : Hardware Error [current] [descriptor]
[156566.355246] Descriptor sense data with sense descriptors (in hex):
[156566.355248]         72 04 00 00 00 00 00 0e 09 0c 00 00 00 00 00 00 
[156566.355257]         00 4f 00 c2 00 50 
[156566.355262] sd 8:0:0:0: [sde]  
[156566.355265] Add. Sense: No additional sense information
[156566.355267] sd 8:0:0:0: [sde] CDB: 
[156566.355269] ATA command pass through(12)/Blank: a1 06 20 da 00 00 4f c2 00 b0 00 00

Comment 31 Matthias Bruegge 2017-02-11 18:59:13 UTC
Still the same on 4.9.8-201.fc25.i686


cat /proc/sys/kernel/printk
4       4       1       7


[12997.167637] sd 7:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[12997.167646] sd 7:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[12997.167651] sd 7:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
[12997.167659] sd 7:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00
[12997.312149] sd 7:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[12997.312158] sd 7:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[12997.312164] sd 7:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
[12997.312171] sd 7:0:0:0: [sdb] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00
[12997.908906] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[12997.908915] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[12997.908920] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[12997.908928] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00
[12998.052907] sd 6:0:0:0: [sdc] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[12998.052917] sd 6:0:0:0: [sdc] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[12998.052922] sd 6:0:0:0: [sdc] tag#0 Add. Sense: No additional sense information
[12998.052930] sd 6:0:0:0: [sdc] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 da 00 00 00 00 00 4f 00 c2 00 b0 00
[root@jack ~]# dnf update

Comment 32 Alan Stern 2017-02-13 19:38:33 UTC
Re Comment #16:

Paolo, what makes you so sure this is a kernel issue?  It looks to me like the udisks2 program keeps sending the same command over and over again at regular intervals, in spite of the fact that each time it fails with a hardware error.  udisks2 should be smart enough to stop sending commands that never work right.

And why shouldn't the kernel write error messages to the log whenever a hardware error occurs?  Isn't this exactly the sort of thing the kernel is supposed to do?

In short, I think the udisks2 program needs to be fixed.  Not the kernel.

Comment 33 Justin M. Forbes 2017-04-11 14:36:00 UTC
*********** MASS BUG UPDATE **************

We apologize for the inconvenience.  There is a large number of bugs to go through and several of them have gone stale.  Due to this, we are doing a mass bug update across all of the Fedora 25 kernel bugs.

Fedora 25 has now been rebased to 4.10.9-200.fc25.  Please test this kernel update (or newer) and let us know if you issue has been resolved or if it is still present with the newer kernel.

If you have moved on to Fedora 26, and are still experiencing this issue, please change the version to Fedora 26.

If you experience different issues, please open a new bug report for those.

Comment 34 David Both 2017-04-11 15:47:23 UTC
I am still experiencing these symptoms with 4.10.8-200.fc25.x86_64 because 4.10.9 is not yet in the Fedora repo: 

[285101.563444] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[285101.563448] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[285101.563450] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[285101.563452] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[285701.508118] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[285701.508124] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[285701.508126] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[285701.508129] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[286267.045788] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[286267.045793] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[286267.045795] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[286267.045799] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[286272.047172] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[286272.047179] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[286272.047181] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[286272.047184] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[286301.624295] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[286301.624300] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[286301.624302] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[286301.624306] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[286902.036875] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[286902.036880] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[286902.036882] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[286902.036885] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[287502.087800] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[287502.087806] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[287502.087808] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[287502.087811] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[288066.622400] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[288066.622405] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[288066.622407] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[288066.622410] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[288071.623779] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[288071.623784] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[288071.623786] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[288071.623789] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 2c 00 00 00 00 00 00 00 00 00 00 00 e5 00
[288101.916960] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[288101.916965] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[288101.916967] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information
[288101.916970] sd 11:0:0:0: [sde] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[288701.818391] sd 11:0:0:0: [sde] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[288701.818396] sd 11:0:0:0: [sde] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[288701.818397] sd 11:0:0:0: [sde] tag#0 Add. Sense: No additional sense information

etc, etc. at about 10 minute intervals.
####################
I will be testing with 4.10.9-200.fc25 as soon as it is available in the repo.

Please try to resolve this as it poses issues for problem determination of many types of problems. Because there is no longer a dmesg file in /var/log, and because these messages fill up the dmesg buffer, other messages get dumped off the buffer. Many times those messages could have been used for troubleshooting and sometimes I use them for research for writing articles or just to determine how things are working. 

This has been going on for a long time and needs to be resolved ASAP. If I can be of any further help, please let me know.

Note that this problem only occurs for me when I have attached a Western Digital "My Passport" 500GB hard drive that has a non removable partition for irrelevant Winbloze backup software. 

Thank you.

Comment 35 GeekGirl1 2017-04-12 02:33:15 UTC
I am also waiting for the new kernel. In case this is important, my latest dmesg shows a possible incorrect serial number for [sdd]. No disks in my system have this serial number.

dmesg shows: SerialNumber: 5743415A4139383134313932

# smartctl -a /dev/sdd

Shows: Serial Number:    WD-WCAZA9814192

=============
Model Family:     Western Digital Caviar Green (AF)
Device Model:     WDC WD15EARS-00MVWB0
Serial Number:    WD-WCAZA9814192
LU WWN Device Id: 5 0014ee 2b0ed33e8
Firmware Version: 51.0AB51
User Capacity:    1,500,301,910,016 bytes [1.50 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ATA8-ACS (minor revision not indicated)
SATA Version is:  SATA 2.6, 3.0 Gb/s

================
dmesg


[  343.113624] usb 3-1: new high-speed USB device number 5 using xhci_hcd
[  343.282496] usb 3-1: New USB device found, idVendor=1058, idProduct=1021
[  343.282499] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  343.282500] usb 3-1: Product: Ext HDD 1021
[  343.282501] usb 3-1: Manufacturer: Western Digital
[  343.282502] usb 3-1: SerialNumber: 5743415A4139383134313932
[  343.283068] usb-storage 3-1:1.0: USB Mass Storage device detected
[  343.283983] scsi host7: usb-storage 3-1:1.0
[  344.341722] scsi 7:0:0:0: Direct-Access     WD       Ext HDD 1021     2021 PQ: 0 ANSI: 4
[  344.344249] sd 7:0:0:0: Attached scsi generic sg4 type 0
[  344.344925] sd 7:0:0:0: [sdd] 2930272256 512-byte logical blocks: (1.50 TB/1.36 TiB)
[  344.346392] sd 7:0:0:0: [sdd] Write Protect is off
[  344.346393] sd 7:0:0:0: [sdd] Mode Sense: 17 00 10 08
[  344.347873] sd 7:0:0:0: [sdd] No Caching mode page found
[  344.347876] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[  344.372556]  sdd: sdd1
[  344.378079] sd 7:0:0:0: [sdd] Attached SCSI disk
[  344.515427] sd 7:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[  344.515430] sd 7:0:0:0: [sdd] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[  344.515431] sd 7:0:0:0: [sdd] tag#0 Add. Sense: No additional sense information
[  344.515433] sd 7:0:0:0: [sdd] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[  344.631725] sd 7:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE

Comment 36 Alan Stern 2017-04-12 14:22:01 UTC
To all people waiting for a kernel update to fix this problem:

     There won't be any such update!!!

The problem is in the udisks or udisks2 program, not in the kernel.  As a result, it can't be fixed by a kernel update.

Has anybody notified the people at freedesktop.org (the authors of udisks) about this problem?  They are the ones who need to fix it.

Comment 37 Alan Stern 2017-04-12 14:25:18 UTC
Re comment #35:

The serial numbers are correct.  The value shown in the dmesg log is the serial number of the USB-SATA converter, and the value shown by smartctl is the serial number of the Western Digital drive.

Comment 38 Alan Stern 2017-05-15 19:02:14 UTC
Incidentally, if anybody who is suffering from this problem can collect a usbmon trace or a Wireshark USB trace showing what happens when the drive is first plugged in and the error occurs, please attach it to the bug report.  I would like to see it.

Comment 39 GeekGirl1 2017-05-18 01:30 UTC
Created attachment 1279851 [details]
usbmon trace requested by Alan Stern

Comment 40 GeekGirl1 2017-05-18 01:35:41 UTC
(In reply to GeekGirl1 from comment #39)
> Created attachment 1279851 [details]
> usbmon trace requested by Alan Stern

Details for the attachment: 
- I followed the instructions at https://www.kernel.org/doc/Documentation/usb/usbmon.txt

There are other devices on this bus, such as my mouse and a USB audio device.

dmesg did not report any errors until this disk was plugged into the USB port. I have another USB drive on a different bus, but dmesg is not reporting errors related to this drive.

# uname -a
Linux new-host-3 4.10.15-200.fc25.x86_64 #1 SMP Mon May 8 18:46:06 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

# ls /sys/kernel/debug/usb/usbmon

0s  0u  1s  1t  1u  2s  2t  2u  3s  3t  3u  4s  4t  4u  5s  5t  5u  6s  6t  6u

# cat /sys/kernel/debug/usb/devices

T:  Bus=03 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#=  8 Spd=480  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=1058 ProdID=1021 Rev=20.21
S:  Manufacturer=Western Digital
S:  Product=Ext HDD 1021
S:  SerialNumber=5743415A4139383134313932
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr=  2mA
I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms

# cat /sys/kernel/debug/usb/usbmon/3u > /tmp/1.mon.out
(see attachment)

dmesg at the time I plugged the disk into the USB port, then disconnecting a few minutes later:

# dmesg
[17244.101124] sd 7:0:0:0: [sdd] No Caching mode page found
[17244.101127] sd 7:0:0:0: [sdd] Assuming drive cache: write through
[17244.125223]  sdd: sdd1
[17244.129158] sd 7:0:0:0: [sdd] Attached SCSI disk
[17244.280612] sd 7:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[17244.280614] sd 7:0:0:0: [sdd] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[17244.280616] sd 7:0:0:0: [sdd] tag#0 Add. Sense: No additional sense information
[17244.280618] sd 7:0:0:0: [sdd] tag#0 CDB: ATA command pass through(16) 85 06 20 00 00 00 00 00 00 00 00 00 00 00 e5 00
[17244.396377] sd 7:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
[17244.396380] sd 7:0:0:0: [sdd] tag#0 Sense Key : Hardware Error [current] [descriptor] 
[17244.396381] sd 7:0:0:0: [sdd] tag#0 Add. Sense: No additional sense information
[17244.396383] sd 7:0:0:0: [sdd] tag#0 CDB: ATA command pass through(12)/Blank a1 06 20 da 00 00 4f c2 00 b0 00 00
[17287.499324] usb 3-1: USB disconnect, device number 9

I monitored the file during the connection time in a separate terminal window as:
# tail -f /tmp/1.mon.out

Comment 41 Alan Stern 2017-05-24 16:14 UTC
Created attachment 1282003 [details]
Test patch to prevent usb-storage from reporting No Sense as a Hardware Error

I may have spoken too soon in comment #36.

Attached is a patch which may or may not fix the problem.  (It also may or may not cause a regression for people with certain old kinds of hardware.)  What is does is prevent usb-storage from reporting that a hardware error occurred when a device returns No Sense for a failed operation.

Can somebody try it out and see what difference it makes?

Comment 42 mmitar 2017-06-18 08:07:16 UTC
It seems this is related to: https://www.smartmontools.org/ticket/548

And: https://www.smartmontools.org/changeset/4118

Comment 43 mmitar 2017-06-18 08:14:22 UTC
I am getting this when running smartctl and not udisks.

Comment 44 Alan Stern 2017-09-18 20:29:59 UTC
I agree that the smartmontools ticket is related.  This is caused by code in the kernel.

Has anybody been able to test the patch attached to comment #41?

Comment 45 pa 2017-12-07 15:07:55 UTC
can this be related to https://bugs.launchpad.net/ubuntu/+bug/1733068 ?
I also experience a flooded dmesg with the driver sense error on that system

Comment 46 Alan Stern 2017-12-07 15:41:31 UTC
The two bugs are not related.

It's impossible to say whether your drive sense errors are related to this bug because you didn't include a copy of them in either bug report.

Comment 47 pa 2017-12-07 15:46:59 UTC
They are the same as what is in message #6.
But i'm more concerned about the underlying kernel support in 4.x

Is it possible that some change in the SATA subsystem is now keeping drives awake?


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