HDD failed command: SET FEATURES error

Bug #1629512 reported by Boby
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

When my computer boots, i get a screen with following errors

[ 9.470860] ata6.00: exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
[ 9.470880] ata6.00: irq_stat 0x40000001
[ 9.470893] ata6.00: failed command: SET FEATURES
[ 9.470908] ata6.00: cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 29
[ 9.470908] res 51/04:fe:00:00:00/00:00:00:00:00/40 Emask 0x1 (device error)
[ 9.470942] ata6.00: status: { DRDY ERR }
[ 9.470954] ata6.00: error: { ABRT }
[ 9.506904] ata5.00: exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
[ 9.506944] ata5.00: irq_stat 0x40000001
[ 9.506974] ata5.00: failed command: SET FEATURES
[ 9.507008] ata5.00: cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 26
[ 9.507008] res 51/04:fe:00:00:00/00:00:00:00:00/40 Emask 0x1 (device error)
[ 9.507083] ata5.00: status: { DRDY ERR }
[ 9.507110] ata5.00: error: { ABRT }

I stays there for like a minute before continue booting.

It started after i upgrade to Ubuntu 16.04, i had no such errors with both HDD on Ubuntu 14.04

The HDDs are western digital WDC WD20EZRX-00D. Both purchased same time.
---
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC2: boby 2509 F.... pulseaudio
 /dev/snd/pcmC0D0p: boby 2509 F...m pulseaudio
 /dev/snd/controlC0: boby 2509 F.... pulseaudio
 /dev/snd/controlC1: boby 2509 F.... pulseaudio
CurrentDesktop: Unity
DistroRelease: Ubuntu 16.04
HibernationDevice: RESUME=UUID=6c36e74e-a467-4b4c-a6b0-edd20249754f
InstallationDate: Installed on 2016-05-31 (122 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
MachineType: System manufacturer System Product Name
NonfreeKernelModules: nvidia_uvm nvidia_modeset nvidia
Package: linux (not installed)
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-38-generic root=UUID=01f82bf5-45f1-4509-bdb3-44a51665830f ro quiet splash
ProcVersionSignature: Ubuntu 4.4.0-38.57-generic 4.4.19
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-38-generic N/A
 linux-backports-modules-4.4.0-38-generic N/A
 linux-firmware 1.157.3
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
Tags: xenial
Uname: Linux 4.4.0-38-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
_MarkForUpload: True
dmi.bios.date: 12/21/2010
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: 0802
dmi.board.asset.tag: To Be Filled By O.E.M.
dmi.board.name: SABERTOOTH X58
dmi.board.vendor: ASUSTeK Computer INC.
dmi.board.version: Rev 1.xx
dmi.chassis.asset.tag: Asset-1234567890
dmi.chassis.type: 3
dmi.chassis.vendor: Chassis Manufacture
dmi.chassis.version: Chassis Version
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvr0802:bd12/21/2010:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnSABERTOOTHX58:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
dmi.product.name: System Product Name
dmi.product.version: System Version
dmi.sys.vendor: System manufacturer

Revision history for this message
Boby (bizhat) wrote :
Revision history for this message
Boby (bizhat) wrote :

version.log attached.

Revision history for this message
Brad Figg (brad-figg) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. From a terminal window please run:

apport-collect 1629512

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Boby (bizhat) wrote : AlsaInfo.txt

apport information

tags: added: apport-collected xenial
description: updated
Revision history for this message
Boby (bizhat) wrote : CRDA.txt

apport information

Revision history for this message
Boby (bizhat) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Boby (bizhat) wrote : IwConfig.txt

apport information

Revision history for this message
Boby (bizhat) wrote : JournalErrors.txt

apport information

Revision history for this message
Boby (bizhat) wrote : Lspci.txt

apport information

Revision history for this message
Boby (bizhat) wrote : Lsusb.txt

apport information

Revision history for this message
Boby (bizhat) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Boby (bizhat) wrote : ProcEnviron.txt

apport information

Revision history for this message
Boby (bizhat) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Boby (bizhat) wrote : ProcModules.txt

apport information

Revision history for this message
Boby (bizhat) wrote : PulseList.txt

apport information

Revision history for this message
Boby (bizhat) wrote : UdevDb.txt

apport information

Revision history for this message
Boby (bizhat) wrote : WifiSyslog.txt

apport information

Boby (bizhat)
Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Would it be possible for you to test the latest upstream kernel? Refer to https://wiki.ubuntu.com/KernelMainlineBuilds . Please test the latest v4.8 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.8

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
Boby (bizhat) wrote :

I tried kernel 4.8, but i have same error as in v4.4.

I switched back to v4.4 as my graphics driver (nvidia) not working with new kernel (on login, i get logged off to login screen again and low resolution).

root@hon-pc-01:~# dpkg -l | grep linux-image | grep ii
ii linux-image-4.4.0-36-generic 4.4.0-36.55 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii linux-image-4.8.0-040800-generic 4.8.0-040800.201610022031 amd64 Linux kernel image for version 4.8.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-36-generic 4.4.0-36.55 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-extra-4.4.0-38-generic 4.4.0-38.57 amd64 Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii linux-image-generic 4.4.0.38.40 amd64 Generic Linux kernel image
root@hon-pc-01:~#

Changed in linux (Ubuntu):
status: Incomplete → Confirmed
Revision history for this message
Boby (bizhat) wrote :

I have posted the issue on ubuntu fourms.

Another user also face same issue. Both of us have Marvel controller.

https://ubuntuforums.org/showthread.php?t=2338519&p=13556996#post13556996

Host: scsi15 Channel: 00 Id: 00 Lun: 00
  Vendor: Marvell Model: 91xx Config Rev: 1.01
  Type: Processor ANSI SCSI revision: 05

Revision history for this message
Jean-Pierre van Riel (jpvr) wrote :
Download full text (3.3 KiB)

I too see this error for Seagate 'ST3500418AS' SATA drives via 88SE9123 PCIe SATA 6.0 Gb/s controller (Ubuntu 16.04.2, latest 4.8 Kernel)

```
exception Emask 0x1 SAct 0x0 SErr 0x0 action 0x0
irq_stat 0x40000001
failed command: SET FEATURES
cmd ef/05:fe:00:00:00/00:00:00:00:00/40 tag 4
status: { DRDY ERR }
error: { ABRT }
```

Note:

- `Emask 0x1` = "device reported error"
- `status: { DRDY ERR }` = device ready, but with error

If it relates to other posts on the internet, it might be benign and simply failed power management setting attempts, or the like via the Marvel controller.

To note, I have other SSD drives in the system that are connected via a different controller (SB850) and also don't support APM, but they don't exhibit this error!

`cmd ef/05:fe:00:00:00/00:00:00:00:00/40` requires understanding ATA commands to know what the above command is attempting. As per the "Enable/disable advanced power management" section of the ATA.8 standard:

- "Subcommand code `05h` allows the host to enable Advanced Power Management."
- `FEh` = Maximum performance

So this confirms:

- ATA command = ef = SET FEATURE
- ATA Feature = 05 = Advanced Power Management4
- ATA NSect = fe = 254 = Maximum performance
- remainder of string ":00:00:00/00:00:00:00:00/40" is addressing

SOMETHING during boot is trying to set APM on drives that don't support it!!!

I checked udev rules - this doesn't seem to be udev...

```
$ grep -r hdparm /lib/udev/*
/lib/udev/hdparm:. /lib/hdparm/hdparm-functions
/lib/udev/hdparm: if grep -wq nohdparm /proc/cmdline ; then
/lib/udev/hdparm:OPTIONS=$(hdparm_options $DEVNAME)
/lib/udev/hdparm: /sbin/hdparm $OPTIONS $DEVNAME 2>/dev/null
/lib/udev/rules.d/85-hdparm.rules:ACTION=="add", SUBSYSTEM=="block", KERNEL=="[sh]d[a-z]", RUN+="/lib/udev/hdparm"
```

Tracing the udev -> hdparm scritping, I found that in `/lib/hdparm/hdparm-functions`, there is `hdparm_options()` and `hdparm_try_apm()`, which might default to `hdparm_set_option -B254`
```

and

```
hdparm_try_apm()
{
    # set our default global apm policy here.
    if [ -z "$ID_PATH" ]; then
        local ID_PATH="$(udevadm info -n "$1" -q property 2>/dev/null | sed -n 's/^ID_PATH=//p')" || true
    fi
    case $ID_PATH in
        pci-*-ieee1394-*|pci-*-usb-*)
            return 1
            ;;
    esac
    return 0
}
```

But in my case, when I query udev properties for the device, I see this

```
$ udevadm info -n /dev/sdg
...
E: ID_ATA_FEATURE_SET_PM=1
E: ID_ATA_FEATURE_SET_PM_ENABLED=1
...
```

But I do not see `ID_ATA_FEATURE_SET_APM=1` so udev is, or it shouldn't be setting APM on my drive that doesn't support it...

So if it's not the normal system udev rules, I wondered if it might be something about the init on initramfs trying to enable this, given that does try to load block device drivers and probably runs udev rules in preparation for mounting root. I uncompressed initramfs, but failed to identify anything that sets the APM on drives that don't support it.

So it's still a mystery why APM is attempted when, clearly, it's obvious the drives don't support it, and also, why only the HDD drives on the marvel controller vs other SSDs (not on Marvel) that don't hav...

Read more...

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.