[Bug 290249] PRP_OFFET_INVALID on nvme writes

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 15 Oct 2025 03:42:20 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290249

            Bug ID: 290249
           Summary: PRP_OFFET_INVALID on nvme writes
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: riscv
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: mengzhuo@iscas.ac.cn

log of core
```
root@generic:~ # http_proxy=http://10.0.0.1:8123 fetch
https://github.com/freebsd/freebsd-ports/archive/refs/heads/2025Q4.zip
fetch: https://github.com/freebsd/freebsd-ports/archive/refs/heads/2025Q4.zip:
size of remote file is not known
2025Q4.zip                                            8208 kB 8125 kBpsnvme0:
WRITE (01) sqid:4 cid:111 nsid:1 lba:2934720 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2cc7c0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
2025Q4.zip                                              16 MB 8676 kBpsnvme0:
WRITE (01) sqid:4 cid:111 nsid:1 lba:2953152 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2d0fc0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
2025Q4.zip                                              49 MB 8556 kBpsnvme0:
WRITE (01) sqid:4 cid:111 nsid:1 lba:3020736 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2e17c0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
nvme0: WRITE (01) sqid:4 cid:111 nsid:1 lba:3022784 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2e1fc0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
2025Q4.zip                                              65 MB 7962 kBpsnvme0:
WRITE (01) sqid:4 cid:111 nsid:1 lba:3057088 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2ea5c0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
nvme0: WRITE (01) sqid:4 cid:111 nsid:1 lba:3060160 len:512
nvme0: PRP_OFFET_INVALID (00/13) crd:0 m:0 dnr:0 p:1 sqid:4 cid:111 cdw0:0
(nda0:nvme0:0:0:1): WRITE (01). NCB: opc=1 fuse=0 nsid=1 prp1=0 prp2=0
cdw=2eb1c0 0 1ff 0 0 0
(nda0:nvme0:0:0:1): CAM status: NVME Status Error
(nda0:nvme0:0:0:1): NVMe status: PRP_OFFET_INVALID (00/13)
(nda0:nvme0:0:0:1): Error 5, Retries exhausted
g_vfs_done(): ufs/rootfs converting all errors to ENXIO
g_vfs_done():ufs/rootfs[WRITE(offset=1501265920, length=1048576)]error = 6
supressing further ENXIO
panic: UFS: root fs would be forcibly unmounted
cpuid = 0
time = 1760167923
KDB: stack backtrace:
#0 0xffffffc0003738a8 at kdb_backtrace+0x4a
#1 0xffffffc00032eee2 at vpanic+0x16e
#2 0xffffffc00032ed70 at panic+0x26
#3 0xffffffc000579df2 at ffs_fsfail_cleanup+0x128
#4 0xffffffc00055edf4 at softdep_disk_write_complete+0x4a
#5 0xffffffc0003dc0e0 at bufdone+0x216
#6 0xffffffc0003e8c64 at cluster_callback+0x6c
#7 0xffffffc0003dbf36 at bufdone+0x6c
#8 0xffffffc00027f1ac at g_vfs_done+0x292
#9 0xffffffc0003dbbb8 at biodone+0xb0
#10 0xffffffc00027b2ea at g_io_deliver+0x2e4
#11 0xffffffc00027e83a at g_std_done+0x58
#12 0xffffffc0003dbbb8 at biodone+0xb0
#13 0xffffffc00027b2ea at g_io_deliver+0x2e4
#14 0xffffffc00027e83a at g_std_done+0x58
#15 0xffffffc0003dbbb8 at biodone+0xb0
#16 0xffffffc00027b2ea at g_io_deliver+0x2e4
#17 0xffffffc00027863c at g_disk_done+0x110
Uptime: 10m7s
Dumping 365 out of 8177 MB:..2%..11%..21%..31%..41%..51%
Dump aborted
Automatic reboot in 15 seconds - press a key on the console to abort
```

NVME Info
```
Device 0: Vendor: 0x126f Rev: W1115A Prod: KR202508250000000146
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
```
NVME detail
```
nvme  detail
Blk device 0: Optional Admin Command Support:
        Namespace Management/Attachment: no
        Firmware Commit/Image download: yes
        Format NVM: yes
        Security Send/Receive: no
Blk device 0: Optional NVM Command Support:
        Reservation: yes
        Save/Select field in the Set/Get features: yes
        Write Zeroes: yes
        Dataset Management: yes
        Write Uncorrectable: yes
Blk device 0: Format NVM Attributes:
        Support Cryptographic Erase: yes
        Support erase a particular namespace: Yes
        Support format a particular namespace: Yes
Blk device 0: LBA Format Support:
Blk device 0: End-to-End DataProtect Capabilities:
        As last eight bytes: No
        As first eight bytes: No
        Support Type3: No
        Support Type2: No
        Support Type1: No
Blk device 0: Metadata capabilities:
        As part of a separate buffer: No
        As part of an extended data LBA: No
```

I've tested the NVME on other OS, write/read hole disk is fine

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