Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Dec 2024 03:23:11 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 283189] Sporadic NVMe DMAR faults since updating to 14.2-STABLE
Message-ID:  <bug-283189-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D283189

            Bug ID: 283189
           Summary: Sporadic NVMe DMAR faults since updating to
                    14.2-STABLE
           Product: Base System
           Version: 14.2-STABLE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: jah@FreeBSD.org

As described in
https://lists.freebsd.org/archives/freebsd-stable/2024-November/002549.html

Within a few hours of updating from 13.4-STABLE to 14.2-STABLE, I started
seeing sporadic nvme DMAR faults (followed by nvme transfer errors that see=
med
to be triggered by the IOMMU failing the DMA request).  These errors always
look like the following:

Nov 24 16:17:52 corona kernel: DMAR4: Fault Overflow
Nov 24 16:17:52 corona kernel: nvme0: WRITE sqid:15 cid:121 nsid:1
lba:1615751416 len:256
Nov 24 16:17:52 corona kernel: DMAR4: nvme0: pci7:0:0 sid 700 fault acc 1 a=
dt
0x0 reason 0x6 addr 42d000
Nov 24 16:17:52 corona kernel: nvme0: DATA TRANSFER ERROR (00/04) crd:0 m:1
dnr:1 p:1 sqid:15 cid:121 cdw0:0
Nov 24 16:17:52 corona kernel: (nda0:nvme0:0:0:1): WRITE. NCB: opc=3D1 fuse=
=3D0
nsid=3D1 prp1=3D0 prp2=3D0 cdw=3D604e68f8 0 ff 0 0 0
Nov 24 16:17:52 corona kernel: (nda0:nvme0:0:0:1): CAM status: Unknown (0x4=
20)
Nov 24 16:17:52 corona kernel: (nda0:nvme0:0:0:1): Error 5, Retries exhaust=
ed
Nov 24 16:17:52 corona ZFS[11614]: vdev I/O failure, zpool=3Dzroot
path=3D/dev/nda0p4 offset=3D824843563008 size=3D131072 error=3D5

I've seen 5 of these error sequences since the system was updated from 13 t=
o 14
two weeks ago.  Previously the same machine had been running various builds=
 of
13-stable for nearly two years (with Intel DMAR enabled the entire time)
without issue.  Other things to note:

--The failures are very sporadic, often with several days between them.
--They don't seem to be directly correlated with heavy disk I/O.  I can run
-j16 buildworld/buildkernel without issue, yet in some cases these errors h=
ave
been logged while the system was nearly idle.
--In all cases, the transfer in question is an NVMe WRITE (host->device).  =
The
transfer length reported by the nvme0 error log so far has always been 16-2=
56
bytes (so well less than the 4K nvme page size)
--In all cases the fault reason reported by the IOMMU is 6, which if I'm
reading the VT-d spec correctly means "no read access in the IOMMU paging
entry".
--In all cases the prp1/prp2 fields reported by the CAM error log are both =
0,
which seems surprising given my (very limited) knowledge of the NVMe protoc=
ol.
--So far there have been no obvious ill effects (no kernel panics, no
*apparent* data corruption, no controller failures, etc.).

The SSD generating these errors:
nda0: <Micron_7300_MTFDHBG3T8TDF 95420260 21443277CB53>

There's no other NVMe device on the system in question.  I don't suspect a
hardware failure here, as I never saw issues while running 13 but immediate=
ly
started seeing them after updating to 14.

>From a quick look at the deltas between stable/13 and stable/14, I don't see
any DMAR or NVMe changes that would seem a likely culprit for this issue.  =
It
seems the biggest change was the switch from nvd(4) to nda(4) for the disk
device, so I will probably try setting hw.nvme.use_nvd to see if going back=
 to
nvd eliminates the errors (which to me would indicate the more-sophisticated
CAM I/O scheduling brought by nda(4) is likely exposing some existing issue=
).

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-283189-227>