Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Oct 2020 22:14:04 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 250377] loader fails to detect zpool & reports ZFS: i/o error - all block copies unavailable since 12.0-12.2
Message-ID:  <bug-250377-227@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D250377

            Bug ID: 250377
           Summary: loader fails to detect zpool & reports ZFS: i/o error
                    - all block copies unavailable since 12.0-12.2
           Product: Base System
           Version: 12.1-RELEASE
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: dch@freebsd.org

FreeBSD 12.x amd64 (efi) loaders seems to behave differently than 11.x
under xhyve OSX based hypervisor, where 11.x used to work.

Using xhyve[1], 12.x amd64 all fails *after successful install* on reboot a=
t:

/boot/kernel/kernel text=3D0x16bdcc4 data=3D0x140 data=3D0x75fe80 ZFS: i/o =
error -
all block copies unavailable

elf64_loadimage: read failed
can't load file '/boot/kernel/kernel': input/output error

Checking the resulting disk image by mounting on FreeBSD via mdconfig & zpo=
ol
scrub etc seems to be fine. Remounting it from the install CD is also fine.

I have used xhyve on OSX to distribute FreeBSD VMs to developers for a few
years now, and it's worked just fine on 10.x and 11.x for a simple reliable
boot, including 11.4R.

I re-tested these with 12.0,12.1 and now 12.2 RC2 and they all fail with the
same error, but only after install completed successfully, which I don't yet
understand.

Finally, updating kernel from a working 11.4R -> 12.1R breaks with the same
error on first reboot. Suggesting the newer loader itself is the issue.

This seems a bit of an odd situation.

What might be different between the install phase, and resulting loader
detection after install?

The error appears to be unaffected by block size, and is present since 12.0=
 at
least.

Rolling back xhyve patches to the original ~2017-2018 version also shows no
variation, so this appears to be something different in FreeBSD 12.x and not
the hypervisor itself.

[1]: https://github.com/machyve/xhyve "bhyve for OSX"
[2]: https://github.com/machyve/xhyve/issues/111=20

The same image, whether produced from release ISOs on FreeBSD or on xhyve,
fails when launched from xhyve.

how to reproduce (requires a mac with homebrew at least for the final step)

- create a 5G sparse disk image
- start FreeBSD and do install iso dance
- move the dis image after install to OSX
- test via following invocation of xhyve

#!/bin/sh
UUID=3D"-U deaddead-dead-dead-dead-deaddeaddead"

CD=3D"/downloads/images/FreeBSD-12.1-RELEASE-amd64-disc1.iso"
IMG=3D"xhyve-12.1R.img"
USERBOOT=3D"$(brew --prefix xhyve)/share/xhyve/test/userboot.so"
BOOTVOLUME=3D$CD

KERNELENV=3D""

MEM=3D"-m 8G"
SMP=3D"-c 2"
PCI_DEV=3D"-s 0:0,hostbridge -s 31,lpc"
NET=3D"-s 2:0,virtio-net"
IMG_CD=3D"-s 3:0,ahci-cd,$CD"
IMG_HDD=3D"-s 4:0,virtio-blk,$IMG"
LPC_DEV=3D"-l com1,stdio"
ACPI=3D"-A"

sudo xhyve $ACPI $MEM $SMP \
    $PCI_DEV $LPC_DEV \
    $NET \
    $IMG_CD $IMG_HDD \
    $UUID -f fbsd,$USERBOOT,$BOOTVOLUME,"$KERNELENV"

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-250377-227>