From: bugzilla-daemon@bugzilla.kernel.org
To: linux-scsi@vger.kernel.org
Subject: [Bug 153241] Kernel (unconditionally?) repeatedly attempts to issue SMART commands via ATA pass-through
Date: Thu, 22 Sep 2016 00:44:54 +0000 [thread overview]
Message-ID: <bug-153241-11613-2F1iSmyIYR@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-153241-11613@https.bugzilla.kernel.org/>
https://bugzilla.kernel.org/show_bug.cgi?id=153241
Arno Moeller <arno@d-tor.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |arno@d-tor.org
--- Comment #1 from Arno Moeller <arno@d-tor.org> ---
I'm seeing this too on an USB-Disk (/dev/sdj) every 10 minutes:
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 UNKNOWN(0x2003) Result:
hostbyte=0x07 driverbyte=0x08
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 Sense Key : 0x4
[current] [descriptor]
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 ASC=0x0 ASCQ=0x0
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 CDB: opcode=0x85 85 06
20 00 00 00 00 00 00 00 00 00 00 00 e5 00
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 UNKNOWN(0x2003) Result:
hostbyte=0x07 driverbyte=0x08
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 Sense Key : 0x4
[current] [descriptor]
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 ASC=0x0 ASCQ=0x0
Sep 22 01:47:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 CDB: opcode=0xa1 a1 06
20 da 00 00 4f c2 00 b0 00 00
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 UNKNOWN(0x2003) Result:
hostbyte=0x07 driverbyte=0x08
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 Sense Key : 0x4
[current] [descriptor]
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 ASC=0x0 ASCQ=0x0
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 CDB: opcode=0x85 85 06
20 00 00 00 00 00 00 00 00 00 00 00 e5 00
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 UNKNOWN(0x2003) Result:
hostbyte=0x07 driverbyte=0x08
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 Sense Key : 0x4
[current] [descriptor]
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 ASC=0x0 ASCQ=0x0
Sep 22 01:57:05 hadante kernel: sd 7:0:0:0: [sdj] tag#0 CDB: opcode=0xa1 a1 06
20 da 00 00 4f c2 00 b0 00 00
[...]
I *think* this is caused by udisks2 v2.1.7 (source:
https://udisks.freedesktop.org/releases/).
It's doing this in src/udiskslinuxdrive.c (line 1212ff.):
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);
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 udisksd gives:
[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)
^^^^ this is the culprit???
[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)
It's really annoying and spamming the kernel log. At first I thought the drive
is defective, because google told me that Sense Key 0x4 is a Hardware Error
(http://www.t10.org/lists/2sensekey.htm), but since the drive is working fine,
I dug deeper...
Further information:
# 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
...
# uname -a
Linux hadante 4.7.2-1-ARCH #1 SMP PREEMPT Sat Aug 20 23:02:56 CEST 2016 x86_64
GNU/Linux
kernel config:
https://git.archlinux.org/svntogit/packages.git/tree/trunk/config?h=packages/linux
--
You are receiving this mail because:
You are the assignee for the bug.
prev parent reply other threads:[~2016-09-22 0:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 19:59 [Bug 153241] New: Kernel (unconditionally?) repeatedly attempts to issue SMART commands via ATA pass-through bugzilla-daemon
2016-09-22 0:44 ` bugzilla-daemon [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=bug-153241-11613-2F1iSmyIYR@https.bugzilla.kernel.org/ \
--to=bugzilla-daemon@bugzilla.kernel.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).