Your message dated Tue, 08 Jun 2010 06:48:01 +0000
with message-id <[email protected]>
and subject line Bug#584969: fixed in libatasmart 0.17+git20100219-2
has caused the Debian Bug report #584969,
regarding libatasmart4: Reports healthy disks as failing
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
584969: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584969
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
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
diff -u -r libatasmart-0.17+git20100219.orig//atasmart.c libatasmart-0.17+git20100219/atasmart.c
--- libatasmart-0.17+git20100219.orig//atasmart.c	2010-06-06 12:07:45.000000000 -0700
+++ libatasmart-0.17+git20100219/atasmart.c	2010-06-07 15:18:29.000000000 -0700
@@ -1265,11 +1265,6 @@
         if (max_sectors > 0 && a->pretty_value > max_sectors) {
                 a->pretty_value = SK_SMART_ATTRIBUTE_UNIT_UNKNOWN;
                 d->attribute_verification_bad = TRUE;
-        } else {
-                if ((!strcmp(a->name, "reallocated-sector-count") ||
-                     !strcmp(a->name, "current-pending-sector")) &&
-                    a->pretty_value > 0)
-                        a->warn = TRUE;
         }
 }
 
@@ -2106,6 +2101,7 @@
                 *good = FALSE;
 }
 
+#if 0
 static uint64_t u64log2(uint64_t n) {
         unsigned r;
 
@@ -2120,10 +2116,13 @@
                 r++;
         }
 }
+#endif
 
 int sk_disk_smart_get_overall(SkDisk *d, SkSmartOverall *overall) {
         SkBool good;
+#if 0
         uint64_t sectors, sector_threshold;
+#endif
 
         assert(d);
         assert(overall);
@@ -2137,6 +2136,7 @@
                 return 0;
         }
 
+#if 0
         /* Second, check if the number of bad sectors is greater than
          * a certain threshold */
         if (sk_disk_smart_get_bad(d, &sectors) < 0) {
@@ -2154,6 +2154,7 @@
                         return 0;
                 }
         }
+#endif
 
         /* Third, check if any of the SMART attributes is bad */
         good = TRUE;
@@ -2165,11 +2166,13 @@
                 return 0;
         }
 
+#if 0
         /* Fourth, check if there are any bad sectors at all */
         if (sectors > 0) {
                 *overall = SK_SMART_OVERALL_BAD_SECTOR;
                 return 0;
         }
+#endif
 
         /* Fifth, check if any of the SMART attributes ever was bad */
         good = TRUE;
@@ -2380,10 +2383,8 @@
                 if (sk_disk_smart_get_bad(d, &value) < 0)
                         printf("Bad Sectors: %s\n", strerror(errno));
                 else
-                        printf("%sBad Sectors: %s%s\n",
-                               value > 0 ? HIGHLIGHT : "",
-                               print_value(pretty, sizeof(pretty), value, SK_SMART_ATTRIBUTE_UNIT_SECTORS),
-                               value > 0 ? ENDHIGHLIGHT : "");
+                        printf("Bad Sectors: %s\n",
+                               print_value(pretty, sizeof(pretty), value, SK_SMART_ATTRIBUTE_UNIT_SECTORS));
 
                 if (sk_disk_smart_get_power_on(d, &power_on) < 0) {
                         printf("Powered On: %s\n", strerror(errno));

--- End Message ---
--- Begin Message ---
Source: libatasmart
Source-Version: 0.17+git20100219-2

We believe that the bug you reported is fixed in the latest version of
libatasmart, which is due to be installed in the Debian FTP archive:

libatasmart-bin_0.17+git20100219-2_amd64.deb
  to main/liba/libatasmart/libatasmart-bin_0.17+git20100219-2_amd64.deb
libatasmart-dev_0.17+git20100219-2_amd64.deb
  to main/liba/libatasmart/libatasmart-dev_0.17+git20100219-2_amd64.deb
libatasmart4_0.17+git20100219-2_amd64.deb
  to main/liba/libatasmart/libatasmart4_0.17+git20100219-2_amd64.deb
libatasmart_0.17+git20100219-2.diff.gz
  to main/liba/libatasmart/libatasmart_0.17+git20100219-2.diff.gz
libatasmart_0.17+git20100219-2.dsc
  to main/liba/libatasmart/libatasmart_0.17+git20100219-2.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Martin Pitt <[email protected]> (supplier of updated libatasmart package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Tue, 08 Jun 2010 08:40:22 +0200
Source: libatasmart
Binary: libatasmart-dev libatasmart4 libatasmart-bin
Architecture: source amd64
Version: 0.17+git20100219-2
Distribution: unstable
Urgency: low
Maintainer: Utopia Maintenance Team 
<[email protected]>
Changed-By: Martin Pitt <[email protected]>
Description: 
 libatasmart-bin - ATA S.M.A.R.T. reading and parsing library - utilities
 libatasmart-dev - ATA S.M.A.R.T. reading and parsing library - development 
files
 libatasmart4 - ATA S.M.A.R.T. reading and parsing library
Closes: 584969
Changes: 
 libatasmart (0.17+git20100219-2) unstable; urgency=low
 .
   * debian/local/apport-hook.py: Update for udisks.
   * Add 0001-Speed-up-get_overall-and-get_bad.patch: Speed up get_overall()
     and get_bad(). (fd.o #26834)
   * Add 0002-Drop-our-own-many-bad-sectors-heuristic.patch: Drop our own "many
     bad sectors" heuristic.This currently causes a lot of false positives,
     because in many cases our treshold is either overly pessimistically low,
     or the raw value is implausibly high. Just use the normalized values vs.
     treshold for now. (Closes: #584969, LP: #438136, fd.o #25772)
Checksums-Sha1: 
 f73c80b1f6491a545cd5c642664970629182b516 1463 
libatasmart_0.17+git20100219-2.dsc
 8f6fdbffc9ea303017ee456c5ba6dc10628e736e 5949 
libatasmart_0.17+git20100219-2.diff.gz
 263c4566b2f6fcf2b9dfe2e85e6c8989a3b59262 31188 
libatasmart-dev_0.17+git20100219-2_amd64.deb
 adea9a533792966972f46d479050a60a38abeafe 27338 
libatasmart4_0.17+git20100219-2_amd64.deb
 197c31be89a3869b2afe3965616e25fd078dfdd4 12402 
libatasmart-bin_0.17+git20100219-2_amd64.deb
Checksums-Sha256: 
 61761b7e20b3bc701381b6b9112399f52fe2581696bc2ead7c7618cc1c9ac29a 1463 
libatasmart_0.17+git20100219-2.dsc
 b27df8564d8dadf96bd56e42b3935caf77f19307381f06ecdd62ec402f9d42c3 5949 
libatasmart_0.17+git20100219-2.diff.gz
 0fd51cc0981d092922ef60e0ddc37b896aaca9bb7feacdadea068346d42b35cc 31188 
libatasmart-dev_0.17+git20100219-2_amd64.deb
 35ec429a4da0a1fae0bb64f386b1bacecc4f7ab2c4e6318be94ce388176c8868 27338 
libatasmart4_0.17+git20100219-2_amd64.deb
 40ca6046f42e0d2c909b7dcb67e908e623012cddc206d9d2bcc932c515d9b2e0 12402 
libatasmart-bin_0.17+git20100219-2_amd64.deb
Files: 
 66e48f8603dcf7597c54cde8e16c5639 1463 libs optional 
libatasmart_0.17+git20100219-2.dsc
 5c582132c853dad5b52765116b332627 5949 libs optional 
libatasmart_0.17+git20100219-2.diff.gz
 e917c112f5633fb32abaf9010f7af701 31188 libdevel optional 
libatasmart-dev_0.17+git20100219-2_amd64.deb
 c4542dfcdc5584c678ad567a1ec5b0c4 27338 libs optional 
libatasmart4_0.17+git20100219-2_amd64.deb
 a5dd674cb21d1a67c7dbefe9e049620f 12402 utils optional 
libatasmart-bin_0.17+git20100219-2_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkwN5nIACgkQDecnbV4Fd/LN6QCgi2lj0JnB2/9NiUWaTVIeljTf
kaMAoIEVzNlh87puY1FO8DSFqXXC3v/g
=mFmG
-----END PGP SIGNATURE-----



--- End Message ---
_______________________________________________
Pkg-utopia-maintainers mailing list
[email protected]
http://lists.alioth.debian.org/mailman/listinfo/pkg-utopia-maintainers

Reply via email to