I periodically do: svn update make buildworld make kernel reboot ... make installworld ... reboot Did one around Feb 16 at r344213, just before boot updates. No problems. Did one on Mar 16 at r345199. First reboot (after installing the new kernel) was fine. Second reboot (after the installing world) gives BTX Halted. Booting using loader.old works fine and works around the issue. System dual boots Windows 7 and FreeBSD. I'm using a sata hard drive with UFS ... here's the gpart show: => 63 3907029105 ada0 MBR (1.8T) 63 204800 1 ntfs (100M) 204863 3982 - free - (1.9M) 208845 1551620096 2 ntfs (740G) 1551828941 1864 - free - (932K) 1551830805 491508675 3 ntfs (234G) 2043339480 7497 - free - (3.7M) 2043346977 1862270928 4 freebsd [active] (888G) 3905617905 1411263 - free - (689M) => 0 1862270928 ada0s4 BSD (888G) 0 2097152 1 freebsd-ufs (1.0G) 2097152 33554432 2 freebsd-swap (16G) 35651584 20971520 5 freebsd-ufs (10G) 56623104 41943040 6 freebsd-ufs (20G) 98566144 1763704783 7 freebsd-ufs (841G) 1862270927 1 - free - (512B) System also has a memory card reader with no cards inserted. Here's part of the dmesg regarding the drives: ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: <ST2000NM0008-2F3100 SN02> ACS-3 ATA SATA 3.x device ada0: Serial Number ZDS09QFC ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 1907729MB (3907029168 512 byte sectors) Trying to mount root from ufs:/dev/ada0s4a [rw]... da0 at umass-sim0 bus 0 scbus9 target 0 lun 0 da0: <Generic- USB3.0 CRW-CF/MD 1.00> Removable Direct Access SPC-2 SCSI device da0: 400.000MB/s transfers da0: Attempt to query device size failed: NOT READY, Medium not present da0: quirks=0x2<NO_6_BYTE> da1 at umass-sim0 bus 0 scbus9 target 0 lun 1 da1: <Generic- USB3.0 CRW-SM/xD 1.00> Removable Direct Access SPC-2 SCSI device da1: 400.000MB/s transfers da1: Attempt to query device size failed: NOT READY, Medium not present da1: quirks=0x2<NO_6_BYTE> da2 at umass-sim0 bus 0 scbus9 target 0 lun 2 da2: <Generic- USB3.0 CRW-SD 1.00> Removable Direct Access SPC-2 SCSI device da2: 400.000MB/s transfers da2: Attempt to query device size failed: NOT READY, Medium not present da2: quirks=0x2<NO_6_BYTE> da3 at umass-sim0 bus 0 scbus9 target 0 lun 3 da3: <Generic- USB3.0 CRW-MS 1.00> Removable Direct Access SPC-2 SCSI device da3: 400.000MB/s transfers da3: Attempt to query device size failed: NOT READY, Medium not present da3: quirks=0x2<NO_6_BYTE> da4 at umass-sim0 bus 0 scbus9 target 0 lun 4 da4: <Generic- USB3.0 CRW-SD/MS 1.00> Removable Direct Access SPC-2 SCSI device da4: 400.000MB/s transfers da4: Attempt to query device size failed: NOT READY, Medium not present da4: quirks=0x2<NO_6_BYTE> -- John
Created attachment 202946 [details] Patch for crash Here's what seems to be happening ... 1) bd_init calls bd_int13probe which creates entries for the various drives, including the card reader. Unfortunately bd_sectorsize is set to zero for the card reader (presumably because no media is present). 2) zfs_dev_init calls i386_zfs_probe which uses zfs_probe_dev to probe all the drives. 3) zfs_probe_dev -> open -> disk_open -> ptable_open -> ptable_iso9660read at which point things go splat due to cdb2devb attempting to divide by the sector size (which is zero). Fixed by having disk_open check for a sector size of zero.
A commit references this bug: Author: tsoome Date: Sun May 5 06:38:48 UTC 2019 New revision: 347142 URL: https://svnweb.freebsd.org/changeset/base/347142 Log: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com MFC after: 1 day Changes: head/stand/common/disk.c
A commit references this bug: Author: tsoome Date: Mon May 6 08:32:50 UTC 2019 New revision: 347179 URL: https://svnweb.freebsd.org/changeset/base/347179 Log: MFC r347142: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com Changes: _U stable/12/ stable/12/stand/common/disk.c
A commit references this bug: Author: tsoome Date: Mon May 6 08:55:23 UTC 2019 New revision: 347182 URL: https://svnweb.freebsd.org/changeset/base/347182 Log: MFC r347142: loader: validate sectorsize argument in disk_open() The bug and patch is reported against 11.2, but it is good idea to have the check in place for all versions. PR: 236585 Submitted by: john@feith.com Reported by: john@feith.com Changes: _U stable/11/ stable/11/stand/common/disk.c