From owner-freebsd-fs@FreeBSD.ORG Thu Nov 24 21:55:23 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C8DA106564A for ; Thu, 24 Nov 2011 21:55:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 4F28C8FC13 for ; Thu, 24 Nov 2011 21:55:21 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA08248; Thu, 24 Nov 2011 23:55:18 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1RThGI-000AIw-ER; Thu, 24 Nov 2011 23:55:18 +0200 Message-ID: <4ECEBD44.6090900@FreeBSD.org> Date: Thu, 24 Nov 2011 23:55:16 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:8.0) Gecko/20111108 Thunderbird/8.0 MIME-Version: 1.0 To: Florian Wagner 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> In-Reply-To: <4ECAC272.5080500@FreeBSD.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: Extending zfsboot.c to allow selecting filesystem from boot.config X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2011 21:55:23 -0000 on 23/11/2011 00:25 Andriy Gapon said the following: > Unfortunately the logs that you captured do not reveal a source of the problem. > I think that it would make sense to set a breakpoint at the zfs_mount function > ('b zfs_mount'). When the program stops at a break point, you can then 'step' > through the code. Then examine all arguments upon function calls and local > variables at the interesting places. For variables that are pointers please > print their dereferenced value (like 'p *x'). This could be time consuming. > > Some more straightforward things to (re-)test. > First, are you absolutely sure that the problem never happens without the patch? > Could you please retest that? Please do not touch anything under /boot, just > recompile zfsboottest with the patch reverted and run it a few time. > Then, could you please test the patch with the code from head? Again, no need > to change you real boot blocks, just checkout sys/boot from head, patch it, > recompile zfsboottest and test it. 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 -- Andriy Gapon