Bug 211620

Summary: Cannot boot on zfs with nvme in system
Product: Base System Reporter: braddeicide
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Some People CC: imp
Priority: ---    
Version: 10.3-STABLE   
Hardware: Any   
OS: Any   

Description braddeicide 2016-08-06 09:34:41 UTC
As soon as I plug an nvme into my system I can't boot on zfs root (ZFS enabled bootstrap loader).  I can load from DVD, and I've since reinstalled onto a temporary UFS root system and everything works fine.

The system freezes during the BTX loader screen, the drive is given a BIOS drive letter, then the spinner stops before the "Bios 625kB/3654644kB available memory" screen.

Some grepping brings me to this loop
https://svnweb.freebsd.org/base/release/10.3.0/sys/boot/i386/loader/main.c?revision=297553&view=markup#l172

Zfs appears to have its own dv_init here: https://svnweb.freebsd.org/base/release/10.3.0/sys/boot/zfs/zfs.c?revision=297553&view=markup#l385

From this point I hope someone might have a better idea than printf debugging :)

The nvme is a Samsung 950 pro, it's in a pcie m2 card. I can dig out exact model of mount if required.

#nvmecontrol devlist
 nvme0: Samsung SSD 950 PRO 512GB
    nvme0ns1 (488386MB)

# diskinfo -v /dev/nvd0
/dev/nvd0
        512             # sectorsize
        512110190592    # mediasize in bytes (477G)
        1000215216      # mediasize in sectors
        512             # stripesize
        0               # stripeoffset
        S2GMNCAGA01093W # Disk ident.

# pciconf -lv | grep nvme -A3
nvme0@pci0:3:0:0:       class=0x010802 card=0xa801144d chip=0xa802144d rev=0x01 hdr=0x00
    vendor     = 'Samsung Electronics Co Ltd'
    class      = mass storage
    subclass   = NVM

re severity, I came across someone else with exact same problem on forums.
Comment 1 Warner Losh freebsd_committer freebsd_triage 2021-07-09 18:32:34 UTC
I have been doing this since around the time stable/12 was cut, so I'm closing this bug. Should this still be an issue with a supported release, please do let me know.