Article View: muc.lists.freebsd.bugs
Article #850[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
From: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:32
Date: Mon, 30 Nov 2026 02:32
106 lines
6104 bytes
6104 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278
Bug ID: 301278
Summary: nvme(4): periodic CSTS read in nvme_qpair_timeout()
from CPUs of both sockets triggers fatal PCIe error
(APEI) on Dell R740xd with NVMe behind a PEX 9733
switch
Product: Base System
Version: 14.5-RELEASE
Hardware: amd64
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: kern
Assignee: bugs@FreeBSD.org
Reporter: jirikubrt@gmail.com
Attachment #277968 text/plain
mime type:
Created attachment 277968
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277968&action=edit
Reproduction program
A Dell PowerEdge R740xd with four NVMe drives behind a PCIe switch panics
under disk load on FreeBSD 14 and 15:
panic: APEI Fatal Hardware Error!
The same machine did not show this on FreeBSD 13.x.
We believe the root cause is a hardware/firmware defect, not a FreeBSD bug:
the same failure can be triggered from Linux 7.0. We are reporting it here
because a change in nvme(4) since 14 hits the defect in normal operation,
and a tunable would let affected systems run stock kernels.
Hardware
--------
Dell PowerEdge R740xd, BIOS 2.29.3, 2x Xeon Gold 6134 (2 NUMA domains)
Dell UCEA-200 NVMe PCIe Extender Adapter, PLX PEX 9733 switch, in a slot
of CPU 1 (domain 0)
4x Kingston DC1500M (SEDC1500M960G, SM2270), firmware S67F0103
dev.nvme.N.num_io_queues: 14
What triggers it
----------------
A fatal PCIe error is raised when the CSTS register (BAR0 + 0x1c) of one
drive is read concurrently from CPUs in different sockets.
Minimal reproduction, idle system, no I/O: two userland processes map BAR0
of one nvme controller read-only (PCIOCBARMMAP) and read offset 0x1c in a
tight loop.
cpuset -l 0 + cpuset -l 1 both in domain 0 180 s, no failure
cpuset -l 16 + cpuset -l 17 both in domain 1 180 s, no failure
cpuset -l 0 + cpuset -l 16 one per domain panic within 1 s
The same test on other devices (ix0, xhci0, the switch upstream port's own
BAR0) with one reader per domain runs for minutes without a failure. The
equivalent test on Linux 7.0 (mmap of sysfs resource0, taskset) gives the
same results, including the panic (GHES: Fatal hardware error).
Why FreeBSD 14+ hits it
-----------------------
nvme_qpair_timeout() reads CSTS on every invocation. While commands are
outstanding the callout is rescheduled every 0.5 s and runs on qpair->cpu
(callout_reset_sbt_on(..., qpair->cpu, ...) in nvme_qpair.c). With more
than one I/O queue the queues are spread over all CPUs (nvme_ctrlr.c,
qpair->cpu = c + (device_get_unit(ctrlr->dev)+n/2) % n), so on a
two-socket machine the CSTS reads come from both sockets and overlap under
load.
Evidence, with a locally patched 14.5 kernel that adds a sysctl to skip
the CSTS read in nvme_qpair_timeout():
CSTS read skipped: 60 min of heavy parallel read load on all four
drives, no failure
CSTS read enabled: panic 5 s after the load starts
Request
-------
1. A loader tunable / sysctl to disable the periodic CSTS read in
nvme_qpair_timeout() (or to restrict it to one CPU per controller,
e.g. a CPU in the controller's own domain).
2. Advice on whether skipping that read is safe apart from slower
detection of a failed or removed controller.
Workarounds we are aware of
---------------------------
hw.nvme.num_io_queues=1 pins the single queue to a CPU in the controller's
domain, so all reads come from one socket. Not yet verified under long
load. Using 2 or 4 queues is not sufficient, because the queues still land
on both sockets.
We can test patches on this machine and provide the reproduction program,
dmesg, pciconf -lvbc and the iDRAC SEL.
--
You are receiving this mail because:
You are the assignee for the bug.
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-admin@muc.de
Technical Details
Message-ID:
<bug-301278-227@https.bugs.freebsd.org/bugzilla/>Path:
mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mailShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!usenet.goja.nl.eu.org!3.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail From: bugzilla-noreply@freebsd.org Newsgroups: muc.lists.freebsd.bugs Subject: [Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on Dell R740xd with NVMe behind a PEX 9733 switch Date: Mon, 30 Nov 2026 02:32:07 +0000 Organization: Newsgate at muc.de e.V. Approved: news-admin@muc.de Distribution: world Message-ID: <bug-301278-227@https.bugs.freebsd.org/bugzilla/> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: news.muc.de; posting-host="news.muc.de:193.149.48.2"; logging-data="46370"; mail-complaints-to="news-admin@muc.de" X-Original-To: bugs@mlmmj.nyi.freebsd.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1796005927; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1J//WVOW7c9/h/xuCZFR1mY9g7O9pWJ2vnynUw/Mcfw=; b=LApqQNxChCNBq2h/a/QroSu6x1DXnlhRTJwSAH06A36sqzT9GQ618PazZzO6kkskF242GZ IcLDBNhOW6hOpK67i5/jKG+RqILGV9L4cNOnkEG4dQgP1WNDxeuII/rEtJuEUwZNl3e+kY 1S69/bEJMp4yjL3H6o3d3Wzyi1K3C4R06TDFxRlYhx7fZdUdF+sX3R2UbRc78H7dFrkvJh tPOvDjtBP0F4TlxFXR8tq5P84lO0xypfsxnOqOwqREYcYl5+KfB1Yq3rxo48kp5uvjMi7d 3v46A74OAVsUMkFcENTKcexs8Y1Zg+a8fjGROSItP7D/dc48q/dzKI0gpWxQvg== X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f Auto-Submitted: auto-generated Precedence: list X-Newsgate-Id: f02c70b8849f+ X-No-Archive: Yes