Thread View: muc.lists.freebsd.bugs
9 messages
9 total messages
Started by bugzilla-noreply
Mon, 30 Nov 2026 02:32
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:34
Date: Mon, 30 Nov 2026 02:34
16 lines
2545 bytes
2545 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #1 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 277969 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277969&action=edit dmesg.boot -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:35
Date: Mon, 30 Nov 2026 02:35
16 lines
2594 bytes
2594 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #2 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 277970 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277970&action=edit Local test patch: sysctl to skip CSTS read in qpair timeout -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:35
Date: Mon, 30 Nov 2026 02:35
16 lines
2583 bytes
2583 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #3 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 277971 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277971&action=edit pciconf -lvbc -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Mon, 30 Nov 2026 02:36
Date: Mon, 30 Nov 2026 02:36
16 lines
2565 bytes
2565 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #4 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 277972 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=277972&action=edit uname, CPU and nvme queue info -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Tue, 01 Dec 2026 17:50
Date: Tue, 01 Dec 2026 17:50
17 lines
2621 bytes
2621 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #5 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 278044 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=278044&action=edit Trigger test under FreeBSD 13.5-RELEASE-p13 (cstsread, same socket vs. both sockets) - panics as well -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Tue, 01 Dec 2026 17:50
Date: Tue, 01 Dec 2026 17:50
18 lines
2666 bytes
2666 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #6 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 278045 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=278045&action=edit Linux lspci -vvv/-xxxx after the error with hest_disable: PLX downstream port 3c:05.0 shows UncorrIntErr+, First Error Pointer 16h -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Tue, 01 Dec 2026 17:51
Date: Tue, 01 Dec 2026 17:51
18 lines
2626 bytes
2626 bytes
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301278 --- Comment #7 from Jiri Kubrt <jirikubrt@gmail.com> --- Created attachment 278046 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=278046&action=edit Repeat runs in the same boot: the error occurs once per drive, one read returns 0xffffffff -- 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
[Bug 301278] nvme(4): periodic CSTS read in nvme_qpair_timeout() from CPUs of both sockets triggers fatal PCIe error (APEI) on D...
Author: bugzilla-noreply
Date: Tue, 01 Dec 2026 17:54
Date: Tue, 01 Dec 2026 17:54
101 lines
6113 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads