Bug 429804 - kinfocenter does not detect problem with hard disk
Summary: kinfocenter does not detect problem with hard disk
Status: RESOLVED FIXED
Alias: None
Product: plasma-disks
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Neon Linux
: VHI critical
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
: 429331 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-11-29 11:55 UTC by Patrick Silva
Modified: 2021-03-09 15:55 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22
Sentry Crash Report:


Attachments
screenshot (167.65 KB, image/png)
2020-11-29 11:55 UTC, Patrick Silva
Details
output of smartctl (32.44 KB, text/plain)
2020-12-01 10:51 UTC, Patrick Silva
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2020-11-29 11:55:46 UTC
Created attachment 133726 [details]
screenshot

SUMMARY
My hard disk is damaged, Gnome Disks detects the problem but kinfocenter
says "This device appears to be working as expected".
See the attached screenshot please.

EXPECTED RESULT
kinfocenter should detect problems with hard disks and warn about them

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.20.80
KDE Frameworks Version: 5.77.0
Qt Version: 5.15.1
Comment 1 Nate Graham 2020-11-30 22:47:15 UTC
Boooooo! Could cause total data loss.
Comment 2 Harald Sitter 2020-12-01 10:47:25 UTC
sudo smartctl --all --json /dev/sda
Comment 3 Patrick Silva 2020-12-01 10:51:18 UTC
Created attachment 133766 [details]
output of smartctl
Comment 4 Harald Sitter 2020-12-01 11:25:35 UTC
  "smart_status": {
    "passed": true

:S firmware being silly. the thing is, I'm not sure what to anchor a judgement that the disk is failing on when the firmware says it is ok. the attributes seem all within range. in the self test logs there are repeated failures but they appear largely on different blocks and 37 hours prior to the last failure the test completed without error... despite having had read failures before that. I'm not sure what to make of that. 

What information do YOU expect?

Kind dupe of #429331 but there the disk at least has a streak of failures on the same block.
Comment 5 Patrick Silva 2020-12-01 11:57:24 UTC
(In reply to Harald Sitter from comment #4)
>   "smart_status": {
>     "passed": true
> 
> :S firmware being silly. the thing is, I'm not sure what to anchor a
> judgement that the disk is failing on when the firmware says it is ok. the
> attributes seem all within range. in the self test logs there are repeated
> failures but they appear largely on different blocks and 37 hours prior to
> the last failure the test completed without error... despite having had read
> failures before that. I'm not sure what to make of that. 
> 
> What information do YOU expect?
> 
> Kind dupe of #429331 but there the disk at least has a streak of failures on
> the same block.

saying "This device appears to be working as expected" when there are
failures in a self test does not sound correct.
I expect that kinfocenter warns about any failure in any self test.
Comment 6 Patrick Silva 2020-12-10 12:58:21 UTC
new info was added in comment 5.
Comment 7 Harald Sitter 2021-02-01 15:19:25 UTC
*** Bug 429331 has been marked as a duplicate of this bug. ***
Comment 8 Harald Sitter 2021-02-01 15:24:42 UTC
I've pondered this a bit and come to conclude that we'll probably need an additional level of vagueness simply anchored to the return value of smartctl - "problems appeared now or in the past. all may be well or not. travel to the oracle of delphi for further information". Kinda sucks though, but then there's little opportunity to keep the output digestible while also being more appreciative of the firmware reporting OK while having errors logged.
Comment 9 Bug Janitor Service 2021-03-08 12:07:10 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-disks/-/merge_requests/14
Comment 10 Harald Sitter 2021-03-09 12:14:23 UTC
Git commit 3d10fed37315a7dd7bcee66797b74ece615a2217 by Harald Sitter.
Committed on 09/03/2021 at 12:14.
Pushed by sitter into branch 'master'.

report smartctl failure codes to the user

as it turns out there are a number of issues that do not result in an
actually bad SMART status and would not get reported to the user. to
keep the code lean we'll simply look at the exit code bits of smartctl
as they more or less cover all failure scenarios anyway. we'll then
translate those to pretty strings and expose them on the Device objects
for consumption in the qml KCM as "instabilities". they are set visually
apart from actual bad status through different icon and description
because it's hard to say if an instability is in fact indicative of
imminent hard-failure or merely a hiccup (e.g. power loss during a disk
operation).
FIXED-in: 5.22

M  +22   -1    autotests/smartdatatest.cpp
M  +2    -0    src/CMakeLists.txt
M  +15   -1    src/device.cpp
M  +14   -1    src/device.h
A  +60   -0    src/instabilities.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +15   -0    src/instabilities.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +34   -11   src/kcm/package/contents/main.qml
M  +3    -2    src/smartctl.cpp
M  +0    -28   src/smartctl.h
M  +12   -2    src/smartdata.cpp
M  +19   -1    src/smartdata.h
A  +4    -0    src/smartfailure.cpp     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
A  +43   -0    src/smartfailure.h     [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)]
M  +3    -2    src/smartmonitor.cpp
M  +17   -6    src/smartnotifier.cpp

https://invent.kde.org/plasma/plasma-disks/commit/3d10fed37315a7dd7bcee66797b74ece615a2217