这个错误是什么意思?

日志中一直出现以下错误:
Oct  3 09:51:36 gooseberry kernel: [15050.345601] 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
Oct  3 10:01:35 gooseberry kernel: [15649.821810] sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Oct  3 10:01:35 gooseberry kernel: [15649.821817] sd 5:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Oct  3 10:01:35 gooseberry kernel: [15649.821820] sd 5:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Oct  3 10:01:35 gooseberry kernel: [15649.821824] 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
Oct  3 10:01:36 gooseberry kernel: [15650.300873] sd 5:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_SENSE
Oct  3 10:01:36 gooseberry kernel: [15650.300879] sd 5:0:0:0: [sdb] tag#0 Sense Key : Hardware Error [current] [descriptor] 
Oct  3 10:01:36 gooseberry kernel: [15650.300881] sd 5:0:0:0: [sdb] tag#0 Add. Sense: No additional sense information
Oct  3 10:01:36 gooseberry kernel: [15650.300885] 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

$ uname -a 
Linux gooseberry 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

你能更新你的问题,包括uname -a的输出吗?sdb是一个连接的USB磁盘吗? - WinEunuuchs2Unix
你在用Ubuntu吗? - TheWanderer
从他的问题和回答历史来看,@Zacharee1 自2011年以来一直是Ubuntu用户。不过这个问题并不太好,因为他没有说明他的Ubuntu版本,也没有提到内核版本(尽管他的标签是“kernel”),而且他也没有回复我们的评论:( 不过我想我还是会继续回答 :D - WinEunuuchs2Unix
完成,已更新问题。 - Vadim Peretokin
请注意您的数据。这可能是由于坏扇区导致的USB硬盘驱动器出现读写错误。 - Gibbi
2个回答

我找到了一个关于Kernel版本4.6.3及更高版本的错误报告,这个错误首次出现在那里。它会每10分钟在/var/log/syslog中产生大量日志。这个错误最晚在Kernel版本4.7.2中被报告。显然,Ubuntu更新到了内核版本4.4.0-38后引入了这个错误。
此外,这个错误是与连接的USB驱动器一起报告的。我猜你的sdb就是其中之一。
显然,除了在syslog中产生大量日志之外,这个错误并不值得担心。
我找到的错误报告可以在以下链接中查看:https://bugzilla.redhat.com/show_bug.cgi?id=1351305

我正在使用Ubuntu 16.04,内核版本为4.4.0-38-generic。看起来确实是一个USB驱动器,所以我非常感激它不是硬件问题。 - Vadim Peretokin
我已经更新了答案,以反映出现了包含错误的内核4.4.0-38。如果你能标记问题为已解决并点赞,这将让其他人知道如果他们遇到相同的错误,这个答案是正确的。 - WinEunuuchs2Unix

很有可能是由于这个提交:

0dec8c0d67c64401d97122e4eba347ccc5850622 is the first bad commit
commit 0dec8c0d67c64401d97122e4eba347ccc5850622
Author: James Bottomley <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
Date:   Fri May 13 12:04:06 2016 -0700

    scsi_lib: correctly retry failed zero length REQ_TYPE_FS commands

    commit a621bac3044ed6f7ec5fa0326491b2d4838bfa93 upstream.

    When SCSI was written, all commands coming from the filesystem
    (REQ_TYPE_FS commands) had data.  This meant that our signal for needing
    to complete the command was the number of bytes completed being equal to
    the number of bytes in the request.  Unfortunately, with the advent of
    flush barriers, we can now get zero length REQ_TYPE_FS commands, which
    confuse this logic because they satisfy the condition every time.  This
    means they never get retried even for retryable conditions, like UNIT
    ATTENTION because we complete them early assuming they're done.  Fix
    this by special casing the early completion condition to recognise zero
    length commands with errors and let them drop through to the retry code.

根据我所了解的修复情况和出现的错误,我相信ATA透传命令中的操作码0x85“ATA命令透传(16)”和0xa1“ATA命令透传(12)/空白”现在可能(可能是错误的)正在发出,从而导致这些错误消息。

从ATA透传命令数据来看,似乎发出了SMART(自我监测、分析和报告技术)ATA命令(命令代码为0xb0),我推测可能是此硬件无法处理该命令。


我觉得你说得对。在我启动Fedora电脑上的smartd之后,我开始看到所有我的USB硬盘的日志垃圾信息。 - Navin