From owner-freebsd-current@freebsd.org Tue Sep 8 18:55:32 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2AF2A3D3A30; Tue, 8 Sep 2020 18:55:32 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4BmDqm0LXkz4HXy; Tue, 8 Sep 2020 18:55:32 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Received: from ubik.madpilot.net (host-79-53-121-114.retail.telecomitalia.it [79.53.121.114]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: madpilot/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 746CB271FE; Tue, 8 Sep 2020 18:55:31 +0000 (UTC) (envelope-from madpilot@FreeBSD.org) Subject: Re: Boot error with OpenZFS To: Mark Johnston Cc: freebsd-current@freebsd.org, freebsd-fs@freebsd.org References: <364bc35c-3930-2ce5-a3cf-3039bf671a92@FreeBSD.org> <20200908173051.GB5058@raichu> From: Guido Falsi Message-ID: Date: Tue, 8 Sep 2020 20:55:29 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200908173051.GB5058@raichu> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Sep 2020 18:55:32 -0000 On 08/09/20 19:30, Mark Johnston wrote: > On Tue, Sep 08, 2020 at 07:24:38PM +0200, Guido Falsi wrote: >> On 08/09/20 10:01, Guido Falsi wrote: >>> Hi, >>> >>> I'm trying to update to recent head, but I can't boot my system with the >>> compiled kernel. >>> >>> The system has ZFS on root and was working with previous kernel (before >>> OpenZFS migration). >>> >>> I'm trying to boot r365437. >>> >>> I load zfs from loader with zfs_load="YES" as usual and get this error >>> message at the start of kernel output: >>> >>> link_elf_obj: symbol lockstat_enabled undefined >>> KLD file zfs.ko - could not finalize loading >>> >>> The zfs.ko file is aligned with the kernel and I did not observe errors >>> while compiling. >>> >>> I am able to make the machine using the kernel from the most recent head >>> snapshot on ftp.freebsd.org [1]. I'm also going to try with a kernel >>> with debug symbols and one with GENERIC config. >> >> A locally built GENERIC works fine, so this is my fault. I clearly have >> something wrong in my kernel config. >> >> I'll report anyway as soon as I discover what it is. > > Can you verify that adding "options KDTRACE_HOOKS" fixes the problem? I > note that the zfs.ko Makefile has -DKTRACE_HOOKS in CFLAGS, among a few > other surprising things. I am in the process of testing that. The machine is compiling. I also noticed in sys/conf/files: kern/kern_lockstat.c optional kdtrace_hooks I'll report back shortly once I've tested it. -- Guido Falsi