From owner-freebsd-current@freebsd.org Tue Dec 8 15:41:55 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 4203A4A3B21 for ; Tue, 8 Dec 2020 15:41:55 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (phouka1.phouka.net [107.170.196.116]) (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 (2048 bits) client-digest SHA256) (Client CN "phouka.net", Issuer "Go Daddy Secure Certificate Authority - G2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Cr4DL29fZz4Vp8 for ; Tue, 8 Dec 2020 15:41:54 +0000 (UTC) (envelope-from warlock@phouka1.phouka.net) Received: from phouka1.phouka.net (localhost [127.0.0.1]) by phouka1.phouka.net (8.16.1/8.16.1) with ESMTPS id 0B8FeV04042431 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 8 Dec 2020 07:40:31 -0800 (PST) (envelope-from warlock@phouka1.phouka.net) Received: (from warlock@localhost) by phouka1.phouka.net (8.16.1/8.16.1/Submit) id 0B8FeUDL042430; Tue, 8 Dec 2020 07:40:30 -0800 (PST) (envelope-from warlock) Date: Tue, 8 Dec 2020 07:40:30 -0800 From: John Kennedy To: Alban Hertroys Cc: freebsd-current@freebsd.org Subject: Re: KLD zfs.ko: depends on kernel - not available or version mismatch Message-ID: References: <42AC7323-5AD6-401D-9A7D-F1D962EE5717@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42AC7323-5AD6-401D-9A7D-F1D962EE5717@gmail.com> X-Rspamd-Queue-Id: 4Cr4DL29fZz4Vp8 X-Spamd-Bar: - X-Spamd-Result: default: False [-1.76 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[phouka.net]; RBL_DBL_DONT_QUERY_IPS(0.00)[107.170.196.116:from]; AUTH_NA(1.00)[]; SPAMHAUS_ZRD(0.00)[107.170.196.116:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.96)[-0.960]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[warlock@phouka.net,warlock@phouka1.phouka.net]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:14061, ipnet:107.170.192.0/18, country:US]; FROM_NEQ_ENVFROM(0.00)[warlock@phouka.net,warlock@phouka1.phouka.net]; MAILMAN_DEST(0.00)[freebsd-current] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 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 Dec 2020 15:41:55 -0000 On Tue, Dec 08, 2020 at 08:56:25AM +0100, Alban Hertroys wrote: > This seems to have gotten lost in the moderate queue, but after a week I am no closer to a solution, so here???s a resend: > > I???ve been trying to get a fresh world running (for the eventual purpose of running amdgpu against my recent graphics adapter), but I run into trouble with core loadable kernel modules, such as zfs.ko from the subject. It also happens with other modules that I tried randomly, for example, geom_mirror.ko. > > I updated to the latest current using svn up in /usr/src, then: > make clean > make buildworld kernel -j12 > shutdown -r now > > boot to single user mode > > kldload zfs I'm not sure you've provided enough information for a one-shot armchair diagnosis, but some things seem factually wrong. For example, my normal rebuild procedure is: cd /usr/src && make buildworld && make buildkernel make installkernel shutdown -r now cd /usr/src && mergemaster -pi make installworld mergemaster -Fi make -DBATCH_DELETE_OLD_FILES delete-old shutdown -r now cd /usr/src && make -DBATCH_DELETE_OLD_FILES delete-old-libs (I'm on a desktop system here. You haven't described your setup.) You didn't say that you've installed the new kernel, which at least starts you down the road towards a driver/kernel mismatch. You presumably have a non-ZFS boot+root. Did you mess around with the ZFS from ports (ZoL -> ZoF) at some point so you're not using the kernel's ZFS drivers? What ZFS entries do you have in /etc/loader.conf, /etc/rc.conf, and some of the varients that may get dragged in? (see rc.conf(5) for possibilities) At the bottom of your email, you say / is UFS and /usr is ZFS, but I guess we have the extra fun of wondering what is under /usr on your /? If you have a pre-ZFS /usr that is populated by something now presumably very old (because all the new, current stuff went onto ZFS /usr, now unavailable). > Which results in dmesg messages: > > KLD zfs.ko: depends on kernel - not available or version mismatch > linker_load_file: /boot/kernel/zfs.ko - unsupported file type > KLD zfs.ko: depends on kernel - not available or version mismatch > linker_load_file: /boot/kernel/zfs.ko - unsupported file type > KLD zfs.ko: depends on kernel - not available or version mismatch > linker_load_file: /boot/kernel/zfs.ko - unsupported file type > KLD zfs.ko: depends on kernel - not available or version mismatch > linker_load_file: /boot/kernel/zfs.ko - unsupported file type Be sure to check out /var/log/messages for extra issues. For example, with the bug I mentioned below, I couldn't load my nvidia driver and that manifested as one driver having issues because it depended on another, which had the root of the problem. > I can load the zfs kernel module from kernel.old just fine: > > ZFS filesystem version: 5 > ZFS storage pool version: features support (5000) I kicked my more bleeding-edge system over from 12.2-rel (r366954) up into 13.0-current (r367044, 1300123) on 2020/10/26. OpenZFS kicked in 2020/8/24? I think the CFT was ~2018/8/21, not sure when we had the OpenZFS ports. Current bumps the ABI version pretty frequently so I'd think you'd have tripped across versioning issues a long time ago if you had some drivers not being rebuilt. > This happens with any kernel module I???ve tried, such as geom_mirror and amdgpu (from ports/graphics/drm-current-kmod - the latter causes a kernel panic with kernel.old BTW). > > I???ve gone back as far as Oct 7 (before changes to kern/elf_load_obj.c off the top of my head), looked at mailing list archives and forums etc, all to no avail. > > I have / on UFS+J and /usr on ZFS and nothing in /etc/src.conf. I had /etc/malloc.conf with the recommended symlink from UPDATING, but the same happens with that moved out of the way. Nothing seems to help. > > Do I need to go back further to get into a usable state or is there something else I should be doing? With very few exceptions (bug 250897, 2020/11/6), I've found 13-current bootable since 10/26 (up through my current system, 13.0 r368388 (2020/12/6). You obviously need to make sure that an extra drivers you add in are compiled against the kernel, but ZFS is typically one of those.