Date: Fri, 25 Nov 2011 22:47:22 +0100 From: Florian Wagner <florian@wagner-flo.net> To: Andriy Gapon <avg@FreeBSD.org> Cc: freebsd-fs@FreeBSD.org Subject: Re: Extending zfsboot.c to allow selecting filesystem from boot.config Message-ID: <20111125224722.6cf3a299@naclador.mos32.de> In-Reply-To: <4ECEBD44.6090900@FreeBSD.org> References: <20111015214347.09f68e4e@naclador.mos32.de> <4E9ACA9F.5090308@FreeBSD.org> <20111019082139.1661868e@auedv3.syscomp.de> <4E9EEF45.9020404@FreeBSD.org> <20111019182130.27446750@naclador.mos32.de> <4EB98E05.4070900@FreeBSD.org> <20111119211921.7ffa9953@naclador.mos32.de> <4EC8CD14.4040600@FreeBSD.org> <20111120121248.5e9773c8@naclador.mos32.de> <4EC91B36.7060107@FreeBSD.org> <20111120191018.1aa4e882@naclador.mos32.de> <4ECA2DBD.5040701@FreeBSD.org> <20111121201332.03ecadf1@naclador.mos32.de> <4ECAC272.5080500@FreeBSD.org> <4ECEBD44.6090900@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/6+hhrzn27pjrXUVnlunT9aN Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 24 Nov 2011 23:55:16 +0200 Andriy Gapon <avg@FreeBSD.org> wrote: > Or another idea is to use valgrind ... which I have actually done > myself and found the problem. > While I am working on a proper solution, please try this quick patch: > http://people.freebsd.org/~avg/zfsboot.read_mos.patch Thanks! For the record: All systems I'm working on are of amd64 architecture. My test VM as well es the fileserver I initial ran into the problem. No more memory corruptions with the patch, but booting now stops with "ZFS: zfs_alloc()/zfs_free() mismatch". If I comment out lines 145-148 in the zfsboottest.c you linked, I can successfully read files from the pool by doing ./zfsboottest <FILENAME> <LIST-OF-VDEVS>. This also works correctly when omitting up to two vdevs of my RAID-Z2 pool: # ./zfsboottest /boot/zfsloader /dev/da{0,1,2}p2 2>/dev/null | md5 336c56a04c8d6d432df999b35ce459f7 # md5 /boot/zfsloader MD5 (/boot/zfsloader) =3D 336c56a04c8d6d432df999b35ce459f7 After applying the patch from [1] (the thread references the same output I get, even if the conclusion doesn't fit) I can sometimes boot my VM. This seems to correlate with how much is written to the pool. Quickly rebooting after the system comes up works, but waiting a few minutes always results in getting the mismatch error on the reboot. After that only booting with unpatched gptzfsboot works (whereafter the patched one works again for one reboot or so). Regards Florian [1] http://lists.freebsd.org/pipermail/freebsd-current/2011-August/026338.html --Sig_/6+hhrzn27pjrXUVnlunT9aN Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iEYEARECAAYFAk7QDOsACgkQLvW/2gp2pPyynwCgjPiF67wrDwrU8PPbJ64Co0JN 9CQAmwbE6j5dBBhXbLuwttex20i70ZbA =8N2d -----END PGP SIGNATURE----- --Sig_/6+hhrzn27pjrXUVnlunT9aN--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111125224722.6cf3a299>