From nobody Fri Sep 1 15:14:02 2023 X-Original-To: current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RchQ83nttz4rRr9 for ; Fri, 1 Sep 2023 15:14:08 +0000 (UTC) (envelope-from herbert@gojira.at) Received: from mail.bsd4all.net (mail.bsd4all.net [IPv6:2a01:4f8:13b:240c::25]) (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 ECDSA (P-384) client-digest SHA384) (Client CN "mail.bsd4all.net", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RchQ53dBWz4fkq for ; Fri, 1 Sep 2023 15:14:05 +0000 (UTC) (envelope-from herbert@gojira.at) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gojira.at header.s=mail202005 header.b=VSoTpVsc; spf=pass (mx1.freebsd.org: domain of herbert@gojira.at designates 2a01:4f8:13b:240c::25 as permitted sender) smtp.mailfrom=herbert@gojira.at; dmarc=none Date: Fri, 01 Sep 2023 17:14:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=gojira.at; s=mail202005; t=1693581242; bh=8zMoAjbDAu3C2VDxKy525AKyGOoFH8OrJOYd8tNRaHM=; h=Date:Message-ID:From:To:Subject:MIME-Version:Content-Type; b=VSoTpVsc1I9uqJnMSAKyxfaHWOwxB+f+d7WnY1LlnTC84tYkOQSmqcJx4yI1oqZAT XCXjFQNU32icVkn5v204zNSklS8zX3NlRywbLM/EZMgNcFsq+fN7c9rebbGdHGo6dL 6HDdPuc2jtqrzpl7/A6mM/yPwqF/i9Jt8H3JfYmINdgBjc641cgsEuNeRxQmsRvZ6b aQmL1lQSEDUP+T7L+bJxfZEyy1TLGLrmwJ9zfbU/WQ9FB++UGEZmq2SUDViIyKqzHx E0HzADClQtGcolfY8446u2vFkwHnmDh66cIfq2sBKvLtZR968YJE8yPiYJvuq5iSnz WvuOpt6x2NgcA== Message-ID: <87cyz2x6x1.wl-herbert@gojira.at> From: "Herbert J. Skuhra" To: current@freebsd.org Subject: Re: FreeBSD-15 kernel panic when the amdtemp device is in the kernel In-Reply-To: <20230901160441.038539cd@ernst.home> References: <20230901130314.460f91bf@ernst.home> <87edjixf6v.wl-herbert@gojira.at> <20230901160441.038539cd@ernst.home> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/30.0 Mule/6.0 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spamd-Bar: -- X-Spamd-Result: default: False [-2.38 / 15.00]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-0.99)[-0.994]; NEURAL_HAM_MEDIUM(-0.97)[-0.970]; NEURAL_HAM_SHORT(-0.92)[-0.916]; R_SPF_ALLOW(-0.20)[+ip6:2a01:4f8:13b:240c::25]; R_DKIM_ALLOW(-0.20)[gojira.at:s=mail202005]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[current@freebsd.org]; ARC_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; DKIM_TRACE(0.00)[gojira.at:+]; RCPT_COUNT_ONE(0.00)[1]; DMARC_NA(0.00)[gojira.at]; FROM_HAS_DN(0.00)[]; MIME_TRACE(0.00)[0:+]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_NONE(0.00)[]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/32, country:DE] X-Rspamd-Queue-Id: 4RchQ53dBWz4fkq On Fri, 01 Sep 2023 16:04:41 +0200, Gary Jennejohn wrote: > > On Fri, 01 Sep 2023 14:15:20 +0200 > "Herbert J. Skuhra" wrote: > > > On Fri, 01 Sep 2023 13:03:14 +0200, Gary Jennejohn wrote: > > > > > > I have a laptop wioth a AMD Ryzen 5 and a tower with a AMD Ryzen 7 3700X. > > > > > > These are respectively Zen 1 and Zen 2 CPUs. > > > > > > I built a kernel on both computers using the FreeBSD-15 source tree. > > > > > > If I include the amdtemp device in my kernel file BOTH computers end up > > > with a kernel panic while trying to attach the amdtemp device. > > > > > > If I remove amdtemp both computers boot without any issues. > > > > > > I suspect that this commit is the cause: > > > > > > commit 323a94afb6236bcec3a07721566aec6f2ea2b209 > > > Author: Akio Morita > > > Date: Tue Aug 1 22:32:12 2023 +0200 > > > > > > amdsmn(4), amdtemp(4): add support for Zen 4 > > > > > > Zen 4 support, tested on Ryzen 9 7900 > > > > > > Reviewed by: imp (previous version), mhorne > > > Approved by: mhorne > > > Obtained from: http://jyurai.ddo.jp/~amorita/diary/?date=20221102#p01 > > > Differential Revision: https://reviews.freebsd.org/D41049 > > > > Thanks for sharing your findings. > > > > Now I probably know why my old kernel from stable/13 no longer booted > > after updating to stable/14. I've create a new kernel config and > > forgot to add "device amdtemp" & "device amdsmn" and forgot about the > > issue. After removing only "device amdtemp" from my old kernel config > > it boots again. > > > > Unfortunately reverting this commit (git revert -n 323a94afb623) > > doesn't resolve this issue. Old kernel does not boot if "device > > amdtemp" is enabled. Probably wrong commit or I am doing somethig > > wrong!? > > > > Strange. My FreeBSD-14 kernel boots with device amdtemp (which automatically > results in amdsmn being included). It's FreeBSD-15 which fails for me. 1. 'kload amdtemp' works: 12 1 0xffffffff81e7c000 3160 amdtemp.ko 13 1 0xffffffff81e80000 2138 amdsmn.ko amdsmn0: on hostb0 amdtemp0: on hostb0 2. GENERIC boots fine. The following kernel does not: include GENERIC ident TEST device amdtemp 3. Unfortunately this is a remote server without a serial console. I don't get a crashdump and I can't find anything in /var/log/messages. 4. I have no good revision for stable/14 and main. On main I always use GENERIC-NODEBUG. :-( -- Herbert