[Pkg-utopia-maintainers] Bug#584969: libatasmart4: Reports healthy disks as failing

Kevin Goodsell kevin-dated-1291486171.96cb89 at omegacrash.net
Mon Jun 7 23:01:18 UTC 2010


Package: libatasmart4
Version: 0.17+git20100219-1
Severity: important
Tags: upstream patch

libatasmart incorrectly interprets SMART data in a way that causes it to
report healthy hard drives as failing. There are at least two specific
problems centering on reallocated sectors.

First problem:
It assumes that the raw value is exactly equal to the number of
reallocated sectors. According to the man page from smartctl:

  The conversion from Raw value to a quantity with physical units is not
  specified by the SMART standard. In most cases, the values printed by
  smartctl are sensible. For example the temperature Attribute generally
  has its raw value equal to the temperature in Celsius. However in some
  cases vendors use unusual conventions. For example the Hitachi disk on
  my laptop reports its power-on hours in minutes, not hours. Some IBM
  disks track three temperatures rather than one, in their raw values.
  And so on.

Examples can be found of drives that report a raw value that is almost
certainly not the real number of reallocated sectors. Some solid state
drives like the Samsung MCCOE64GEMPP have a raw value of over 2 million
out of the box. The Hitachi HTS541010G9SA00 seems to have similarly
large raw values.

Second problem:
It uses arbitrarily selected thresholds for reallocated sectors to
determine that a drive is at risk, even when the SMART data clearly
indicates that the threshold selected by the manufacturer is far from
being reached.

There are two of these arbitrary thresholds. First, if the apparent
number of reallocated sectors exceeds log2 of the disk size, it reports
it as failing with "many" bad sectors. Second, if the apparent number of
reallocated sectors or pending reallocations is greater than 0, it
reports the disk as failing with bad sectors. Keep in mind that this
"number of reallocated sectors" may be no such thing.

This problem becomes particularly apparent when gnome-disk-utility
begins showing alarming pop-up warnings at every login. The issue has
been reported several times in different distributions. Here are some
examples:

https://bugzilla.redhat.com/show_bug.cgi?id=498115
https://bugzilla.redhat.com/show_bug.cgi?id=500079
https://bugzilla.redhat.com/show_bug.cgi?id=506254
https://bugs.launchpad.net/ubuntu/+source/libatasmart/+bug/438136
https://bugs.launchpad.net/ubuntu/+source/gnome-disk-utility/+bug/477280
http://bugs.freedesktop.org/show_bug.cgi?id=25772

Additionally, the upstream author seems reluctant to address this
problem, so I suggest a patch in Debian to address it in the meantime.
The author's response can be seen in the freedesktop.org bug above.

I'm attaching a proposed patch. It removes warnings in skdump for when
the raw value of reallocated-sector-count or current-pending-sector is
greater than 0, prevents the BAD_SECTOR_MANY and BAD_SECTOR overall
status flags from being used, and removes some stuff that becomes unused
with the other changes. Note that suppressing BAD_SECTOR and
BAD_SECTOR_MANY only prevents the arbitrary warnings. Actual SMART
failures are still reported.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (300, 'unstable')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-3-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libatasmart4 depends on:
ii  libc6                         2.10.2-9   Embedded GNU C Library: Shared lib
ii  libudev0                      154-1      libudev shared library

libatasmart4 recommends no packages.

libatasmart4 suggests no packages.

-- no debconf information
-------------- next part --------------
A non-text attachment was scrubbed...
Name: libatasmart-no-sector-raw-value-checks.diff
Type: text/x-diff
Size: 2674 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-utopia-maintainers/attachments/20100607/24af4134/attachment.diff>


More information about the Pkg-utopia-maintainers mailing list