Only enable APM on disks that advertise it

Bug #1757481 reported by dann frazier on 2018-03-21
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
hdparm (Debian)
Fix Released
Unknown
hdparm (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
dann frazier
Artful
Undecided
dann frazier
Bionic
Undecided
Unassigned

Bug Description

[Impact]
hdparm can cause certain systems to occasionally fail to boot. hdparm tries to enable APM on every (non-USB/non-firewire) disk in the system without first checking if APM is supported. This *should*
be OK, since hdparm fails gracefully in this case. However, sending APM commands to disks that don't support it can have side-effects. I received a report that this was causing bus resets on a Cavium Sabre system with the disk below that would sometimes escalate to a boot failure.

[Test Case]
Boot a system with a non-USB/non-firewire disk that does not support APM and verify that there are no kernel messages like:

SG_IO: bad/missing sense data, sb[]: 70 00 05 00 00 00 00 0a 04 53 40 fe 21 04
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 APM_level = not supported

[Regression Risk]
This change entered Debian and Ubuntu 1 month ago, and no regressions have been reported. One source of regressions might be that configuring APM on a disk that claims not to support it did have some positive side-effect that would no longer occur.

dann frazier (dannf) on 2018-03-21
Changed in hdparm (Ubuntu Bionic):
status: New → Fix Released
Changed in hdparm (Ubuntu Artful):
status: New → In Progress
Changed in hdparm (Ubuntu Xenial):
status: New → In Progress
assignee: nobody → dann frazier (dannf)
Changed in hdparm (Ubuntu Artful):
assignee: nobody → dann frazier (dannf)
Changed in hdparm (Debian):
status: Unknown → Fix Released

Hello dann, or anyone else affected,

Accepted hdparm into artful-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/hdparm/9.51+ds-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-artful to verification-done-artful. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-artful. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in hdparm (Ubuntu Artful):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-artful
Changed in hdparm (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed-xenial
Brian Murray (brian-murray) wrote :

Hello dann, or anyone else affected,

Accepted hdparm into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/hdparm/9.48+ds-1ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

dann frazier (dannf) wrote :

For both xenial and artful, I've verified on 2 systems:
 1) A (x86) Lenovo Thinkpad T410 w/ a Samsung SSD 840 EVO that does *not* support APM
 2) An arm64 HiSilicon D05 w/ a Supermicro (HGST) HUS726040ALA610 SATA3 drive that *does* support APM

For #1, I verified that the released hdparm was attempting to enable APM at boot, and that the proposed hdparm no longer does.

For #2, I verified that both the released and proposed hdparm packages attempt to enable APM at boot, and have the same APM setting (254) post-boot.

tags: added: verification-done verification-done-artful verification-done-xenial
removed: verification-needed verification-needed-artful verification-needed-xenial
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hdparm - 9.51+ds-1ubuntu0.1

---------------
hdparm (9.51+ds-1ubuntu0.1) artful; urgency=medium

  * Update d/hdparm-functions: Only enable APM on disks that advertise it.
    LP: #1757481.

 -- dann frazier <email address hidden> Wed, 21 Mar 2018 10:23:10 -0600

Changed in hdparm (Ubuntu Artful):
status: Fix Committed → Fix Released

The verification of the Stable Release Update for hdparm has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package hdparm - 9.48+ds-1ubuntu0.1

---------------
hdparm (9.48+ds-1ubuntu0.1) xenial; urgency=medium

  * Update d/hdparm-functions: Only enable APM on disks that advertise it.
    LP: #1757481.

 -- dann frazier <email address hidden> Wed, 21 Mar 2018 10:36:13 -0600

Changed in hdparm (Ubuntu Xenial):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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