[Bug 260257] CAM_IO_STATS does not track MEDIUM ERRORs

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 06 Dec 2021 18:55:17 UTC

            Bug ID: 260257
           Summary: CAM_IO_STATS does not track MEDIUM ERRORs
           Product: Base System
           Version: 13.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: asomers@FreeBSD.org

The CAM_IO_STATS kernel config option adds some sysctls to every disk device
that track the number of errors, timeouts, and pack invalidations it has had. 
However, some slip through the cracks.  I consistently see dmesg report MEDIUM
ERRORs such as the below, while the stats sysctls report nothing.  There are
clearly errors, because gmultipath reports one path as DEGRADED and ZFS reports
faults on the drive.  It seems that some error path isn't updating the stats
like it should.

(da424:mpr3:0:115:0): READ(10). CDB: 28 00 06 3c 3a 68 00 00 d7 00 
(da424:mpr3:0:115:0): CAM status: SCSI Status Error
(da424:mpr3:0:115:0): SCSI status: Check Condition
(da424:mpr3:0:115:0): SCSI sense: MEDIUM ERROR asc:11,0 (Unrecovered read
(da424:mpr3:0:115:0): Info: 0x63c3a7b
(da424:mpr3:0:115:0): Field Replaceable Unit: 134
(da424:mpr3:0:115:0): Command Specific Info: 0x81037000
(da424:mpr3:0:115:0): Actual Retry Count: 206
(da424:mpr3:0:115:0): Error 5, Unretryable error
GEOM_MULTIPATH: Error 5, da424 in mp_JB2_S57 marked FAIL
GEOM_MULTIPATH: all paths in mp_JB2_S57 were marked FAIL, restore da244

$ sysctl kern.cam.da.424.stats
kern.cam.da.424.stats.pack_invalidations: 0
kern.cam.da.424.stats.timeouts: 0
kern.cam.da.424.stats.errors: 0

You are receiving this mail because:
You are the assignee for the bug.