From owner-freebsd-hackers@freebsd.org Sun Dec 4 02:59:12 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 354CBC663AB for ; Sun, 4 Dec 2016 02:59:12 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from mail.metricspace.net (207-172-209-83.c3-0.arl-ubr1.sbo-arl.ma.static.cable.rcn.com [207.172.209.83]) by mx1.freebsd.org (Postfix) with ESMTP id 06ACA1EAF for ; Sun, 4 Dec 2016 02:59:11 +0000 (UTC) (envelope-from eric@metricspace.net) Received: from [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f] (unknown [IPv6:2001:470:1f11:617:3210:b3ff:fe77:ca3f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 8BA941071; Sun, 4 Dec 2016 02:59:05 +0000 (UTC) Subject: Re: CFT EFI Boot Refactoring To: Ben Woods References: <675cb468-f599-a31b-a82c-c0f892136cfc@metricspace.net> From: Eric McCorkle Cc: freebsd-hackers@FreeBSD.org Message-ID: Date: Sat, 3 Dec 2016 21:59:00 -0500 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="arQd7PRswDidkEC78EiEHoTv6NEWfSimg" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Dec 2016 02:59:12 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --arQd7PRswDidkEC78EiEHoTv6NEWfSimg Content-Type: multipart/mixed; boundary="Pi0td10lcdGV92dIcHJvWDKh4mWPcrDfu"; protected-headers="v1" From: Eric McCorkle To: Ben Woods Cc: freebsd-hackers@FreeBSD.org Message-ID: Subject: Re: CFT EFI Boot Refactoring References: <675cb468-f599-a31b-a82c-c0f892136cfc@metricspace.net> In-Reply-To: --Pi0td10lcdGV92dIcHJvWDKh4mWPcrDfu Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable (Re-adding -hackers, to document the diagnosis) You're freezing at the same point as where tsoome saw it freeze. Basically, what's happening at that point in the code is it's probing all device handles, trying to attach filesystem drivers. Hanging here means that it's crashing somewhere in that process. The boot loader is going to hit every single partition and try all the filesystem drivers until one works. It will bail on the ESP, since that will have an EFI_SIMPLE_FILESYSTEM_PROTOCOL driver courtesy of the EFI firmware. Here's the diagnostic information I have so far: * My setup is a positive example (works): two disks, disk 1 has ESP and freebsd-zfs, disk 2 has a partition that's held both an msdosfs and a UFS (it was originally a swap partition that I've been creating various filesystems on to test the boot process), a zfs intent log, and a zfs l2arc cache. All ZFS stuff is part of the same pool, which holds the root fs. * Your setup is a negative example (fails). * tsoome's setup is also a negative example: "The VM has 4 disks, illumos mirror zfs on first 2, third has fbsd, 4th (for this test) has EFI system partition, and zfs and ufs partitions, zfs partition has bootfs with /boot directory." You don't have a UFS filesystem anywhere, so we can rule that out. It might be tsoome's bug, and it might just be that the bug is sporadic, which would explain why I'm not seeing it on my setup with a dosfs. The only other obvious commonality between you and tsoome that doesn't overlap my setup is multiple ZFS datasets, or ZFS data vdevs (mirrors, stripes, etc) spread across multiple disks (my setup only has a log and a cache on the ssd). Here's what I'll do. I'll create an "extra_logging" branch off of efize_new in my github repo, wherein I'll add a bunch of extra logging into the detection process. It ought to be enough to print out device paths and filesystem drivers just before it tries them. On 12/03/2016 21:06, Ben Woods wrote: > Hi Eric, >=20 > That is correct. Each drive has an EFI partition, which uses msdosfs. M= y > FreeBSD drive does not have a UFS partition, as I solely use ZFS on roo= t. >=20 > One thing to note is that in the process of testing your efize_new, I > did not touch my freebsd-boot partition, and I am not even sure if it i= s > being used by the loader. My /boot lives in my ZFS zroot partition, and= > freebsd-boot is not mounted in anyway. Could this have an impact on the= > testing? >=20 > Regards, > Ben >=20 > -- > From: Benjamin Woods > woodsb02@gmail.com >=20 > On 4 December 2016 at 06:06, Eric McCorkle > wrote: >=20 > So, you have no UFS partitions, but you do have an MSDOSFS partitio= n on > each drive? >=20 > If so, that lends support to tsoome's suspicion that it may be a bu= g > he's working on. >=20 --Pi0td10lcdGV92dIcHJvWDKh4mWPcrDfu-- --arQd7PRswDidkEC78EiEHoTv6NEWfSimg Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iF4EARYIAAYFAlhDhnQACgkQVsKIQKqABI3z/wEA4e19ke22SBFsjW9/MfQiPqjK 603q38nV9BwYw3jcHNwA/0yIXrqQvxflkqbWa38VOzHMcL+Gsu8p+Zo/IID2bcsB =GjBu -----END PGP SIGNATURE----- --arQd7PRswDidkEC78EiEHoTv6NEWfSimg--