🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: muc.lists.freebsd.bugs
Article #875

[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...

#875
From: bugzilla-noreply
Date: Tue, 01 Dec 2026 17:54
101 lines
6113 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278

--- Comment #8 from Jiri Kubrt <jirikubrt@gmail.com> ---
Follow-up with new test results (1 December 2026).

1. FreeBSD 13.5 dies from the same trigger

I booted the previous boot environment, FreeBSD 13.5-RELEASE-p13 GENERIC, in
single user mode (no load, data pool not imported) and ran the attached
cstsread there:

  - two processes on CPUs 0 and 2 (domain 0), 120 s: 110M reads, no error
  - two processes on CPUs 16 and 18 (domain 1), 120 s: 104M reads, no error
  - one process on CPU 0 and one on CPU 16: panic "APEI Fatal Hardware Error!"
within 1 second

So this is not "13 works, 14 breaks the hardware". 13.5 only survived in
production because its nvme driver does not read CSTS periodically. Linux 7.0
(Ubuntu 26.04.1) dies from the same trigger too. Log attached
(freebsd-13.5-trigger-test.log).

2. What the error actually is

Under Linux booted with hest_disable the kernel survives the event (one "NMI
received for unknown reason 30"), so the AER registers can be read without a
reset. Bus numbers below are those seen by Linux; the downstream ports
3c:04.0-07.0 are pci0:60:4:0-60:7:0 under FreeBSD.

  - The root port's AER Error Source ID points to the PLX PEX 9733 downstream
port in front of the drive being read (3c:04.0, for the second event 3c:05.0).
  - That port shows DevSta FatalErr+, UESta UncorrIntErr+ (bit 22,
Uncorrectable Internal Error), First Error Pointer 16h. This is clearly visible
for the second event, which the platform firmware did not handle; for the first
one the firmware had already cleared the status.
  - One read of BAR0+0x1C returns 0xffffffff at that moment; the next one is
correct again. The drives record DevSta UnsupReq+ / CESta AdvNonFatalErr+.
  - The event happens once per drive per boot. After it, more than 200M further
concurrent reads from both sockets completed without error; a drive not yet
accessed this way produced the event once and then ran clean as well.

So this is a hardware/firmware defect of the Dell UCEA-200 NVMe extender (PEX
9733 switch), or of its interaction with these drives. With firmware-first
error handling the first event is fatal for the OS. lspci dumps attached
(lspci-after-second-event.txt, repeat-runs.txt).

3. Workaround results

hw.nvme.num_io_queues="1" on stock 14.5-RELEASE-p2 (the single queue's timer
runs on CPU 0, so CSTS is only read from domain 0):

  - 12 hours of read load (48 parallel dd on the raw devices, 2.1-2.7 GB/s per
drive): no error
  - full scrub of the 1.26 TB pool in 11 minutes, 0 errors
  - fio, 1 queue vs. 14 queues: 4k random read on the raw devices 534k vs. 481k
IOPS at 64 threads; ZFS random read/write within 4 % either way. One 60 s run
per case, so only a rough comparison, but no measurable loss from the single
queue on this machine. The 14-queue case was measured on the patched kernel
with hw.nvme.tmo_csts=0, which ran its 15 minutes of fio without a crash.

With the default 14 queues the same machine crashed twice during boot on 30
November, before any load.

4. Suggestion

The driver is doing nothing illegal, so I do not expect a fix for this hardware
here. Two things might still be worth considering, because other multi-socket
machines with NVMe drives behind such a switch may be affected and the symptom
looks like random fatal hardware errors:

  - a tunable to skip the CSTS read in the qpair timeout callout while no
request is outstanding (the attached nvme-tmo-csts.diff is only my test hack,
not a proposal for the final shape), or
  - a note in nvme(4) that hw.nvme.num_io_queues=1 works around fatal PCIe
errors of this kind.

I can test patches on this machine.

-- 
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-5JcL4mSquU@https.bugs.freebsd.org/bugzilla/>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.eu.feeder.erje.net!feeder.erje.net!news2.arglkargh.de!news.karotte.org!news.muc.de!.POSTED.news.muc.de!not-for-mail
References: <bug-301278-227@https.bugs.freebsd.org/bugzilla/>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!news.mb-net.net!open-news-network.org!2.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: Tue, 01 Dec 2026 17:54:21 +0000
Organization: Newsgate at muc.de e.V.
Approved: news-admin@muc.de
Distribution: world
Message-ID: <bug-301278-227-5JcL4mSquU@https.bugs.freebsd.org/bugzilla/>
References: <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="52787"; 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=1796147661;
	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:
	 in-reply-to:in-reply-to:references:references;
	bh=/x1vaqMZmb966x45Uk56bwu/KDGgyRgh0+68pdyWuNI=;
	b=jxfojgtg2YGGxaUTguRLIhYKQRU/gJD92vsDsBeZVekRauItWXq6snbw1gErpBcYyHAdCU
	I0NB5gyaKqVGMTT4q6uicpknLTO4uEfBCyawIXOToShO/nC6jelfJ/8WGb/Ria5rUeEFU3
	85ktE74+LxxL8rY9Zb86G3I0Gmo4t/GAAzBV9ggJ4uZ+JErQprZ5G3WRW5RaMQ2G8JkBt9
	XP011sR8G7TeNRliizPZC9lPhF/vWi7ZmSSclYkcWS2SUOxBWfbx0jEMgpuxrF6tFVQ3/E
	RGOI2EKS9UWsHqFtAmuR/A21Mox+aBeoYpkKXF4MBN+MfgTvFbCxoBGK4jE6uQ==
X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f
In-Reply-To: <bug-301278-227@https.bugs.freebsd.org/bugzilla/>
Auto-Submitted: auto-generated
Precedence: list
X-Newsgate-Id: f02c70b8849f+
X-No-Archive: Yes