From nobody Fri Sep 09 19:12:38 2022 X-Original-To: freebsd-ppc@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 4MPQc80rG0z4c745 for ; Fri, 9 Sep 2022 19:12:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MPQc80HCmz3M6l; Fri, 9 Sep 2022 19:12:40 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662750760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UbNTeVHHH7ZJTlvNJZfRNnm57iOLXR/CVM8UhFmt/xM=; b=x+9bPIzsY6V4xEYkvblVliOs3faNRF/p9m+b+MnyRMCKv0Sv7VNQHS44bt+2ixN57jz+sO wmdR3hiFm0zeiB2U3bRNlgUsbhg/uLhbtuYFmRLrmt5oFtmnkP8Chk3GCdxO2q2EA2AEZO X/98fHrU5YDl5V2uic7FI+nqunlBb+pAbO39/Vr0HhSD24APw7Dt+NWna0EAoD7ioMdX8I ehrbzDUkazpU4iO9g0ubxl4KQHZF1MC3xBx88tYQGasYuzisuIico5jq3bUUzKhmZOsiPC qFP8gGT8uHLTl/PQb65/5h1F1zYldmaZk0G3Dpv3PRpErAlPLNvV9mMxlomWaw== Received: from ralga-linux (dsl-74-83-251-217.fuse.net [74.83.251.217]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MPQc75SLcz1G3R; Fri, 9 Sep 2022 19:12:39 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Fri, 9 Sep 2022 15:12:38 -0400 From: Justin Hibbits To: Julio Merino Cc: "freebsd-ppc@freebsd.org" Subject: Re: PowerMac G5 crashes with "instruction storage interrupt" on recent 13 Message-ID: <20220909151238.5da8b63a@ralga-linux> In-Reply-To: References: <20220909120857.61f65069@ralga-linux> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.34; powerpc64le-unknown-linux-gnu) List-Id: Porting FreeBSD to the PowerPC List-Archive: https://lists.freebsd.org/archives/freebsd-ppc List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ppc@freebsd.org X-BeenThere: freebsd-ppc@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1662750760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UbNTeVHHH7ZJTlvNJZfRNnm57iOLXR/CVM8UhFmt/xM=; b=UrXg67v/iZY9gWIc8eaGAhBmeNu9TsQVH8ttjZO/C3kRTzFQG6wQ8f0C//ViwBL0Kp9iv1 VTsY/aK/wgzROF2gbcavOD9fnKUf659wmA76jK+k1H/58jURaQhuJllo6DQLJ3TZ23Y882 aCy6Q5bAzo62ITsMs2bsuP54RNVNz33XZsn0M55xE1v8kBhJzPi0S0MO46O3mdjB9Xrwv4 w7DFwdm9ZJWkqhPShFPzWec9YaeVLvzqdXujFKUz0qXmaO6g8aUrIc/LREZxM6LLh+Tbag 21TzAM4ahAE4Sb3jOwi7zx9FASq0XBaob6VfDaENh+M4zeHayu1JI9yAxWsWIg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1662750760; a=rsa-sha256; cv=none; b=TAba1Gspb5RkCmSIJ8aQ3z2WYe4D90ZaEBNxIamANzNG+WVLQitMY5AEPEH4UZUxoqSNjg wOJkQDcsikvUq0hozEOUZuySJ7n4/61CTdC5xmcUWGbW4Fmm98N298jmuK5PZSDfX4ghKK qZKpFBC6Q31g9GKFb2zIqhOWKLUyBc6b1UwOxtOq7/kIc5Ff8FMxYg+LHcxOewWSFOJ+C/ jMI5bkXNBHBjCGQRaRBBpJo1ZOJXKL9xkHZVZhDy58M9dIu07J/V40SYF47rGPArGVAihc eL9Fm9l+KTXdEdmLY0b5VCdQCQXIRV8klvvXSkAjI7yz2jbp+jDJ85ZOyMnAMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N That seems bizarre. There haven't been any changes to the controller thread (powermac_thermal.c) in more than 7 years. Are there any problems with sensors? I tested the change I made back in 2015 on my dual core G5, with the intent that it would ramp the fans up sooner (non-linear), and back them down with hysteresis. So when there's load that raises the temperature significantly it will ramp the fans up as quickly as it can, hitting 100% fan long before it can reach maximum temperature. - Justin On Fri, 9 Sep 2022 19:01:06 +0000 Julio Merino wrote: > Ah, thanks for the workaround. I applied it on top of 9171b8068b92 > and the kernel was able to boot successfully =E2=80=93 and it seems stabl= e so > far. >=20 > However, if I apply the hack on top of stable/13=E2=80=99s HEAD, there is > still the issue of the fans going crazy at the slightest increase in > CPU load but they do drop back down to quiet when the load subsumes. > (For example, a simple =E2=80=9Cgit log=E2=80=9D in /usr/src makes the fa= n spin up > within a couple of seconds and they stop soon after that.) Any ideas > on where this might come from? >=20 >=20 > From: Justin Hibbits > Sent: Friday, September 9, 2022 09:09 > To: Julio Merino > Cc: freebsd-ppc@freebsd.org > Subject: Re: PowerMac G5 crashes with "instruction storage interrupt" > on recent 13 >=20 > Hi Julio, >=20 > 971cb62e0b23 is the likely culprit. Alfredo has a patch at > https://reviews.freebsd.org/D36234 that you can use until the problem > is solved. The alternative is you could build everything into the > kernel instead of using modules. >=20 > The problem appears to be in either lld or the kernel linker. >=20 > - Justin >=20 > On Fri, 9 Sep 2022 16:00:33 +0000 > Julio Merino wrote: >=20 > > Armed with a lot of patience, I was able to bisect where the crashes > > are coming from. They seem to be due to these three consecutive and > > related commits (because the first one broke the build and required > > two extra fixes for powerpc=E2=80=99s GENERIC64 to build): > > > > 9171b8068b92 cpuset: Fix the KASAN and KMSAN builds > > 01f281d0ee52 Fix the build after 47a57144 > > 971cb62e0b23 cpuset: Byte swap cpuset for compat32 on big endian > > architectures > > > > Any idea on how to look into these crashes further? > > > > Thank you! > > > > > > From: Julio Merino > > Sent: Sunday, July 31, 2022 07:45 > > To: freebsd-ppc@freebsd.org > > Subject: PowerMac G5 crashes with "instruction storage interrupt" on > > recent 13 > > > > Hi all, > > > > I have a PowerMac G5 that=E2=80=99s running an old build of FreeBSD 13 > > stable (from around October of last year) that I=E2=80=99m trying to > > upgrade to recent stable/13. > > > > Booting into a new kernel brings two issues: the first is that the > > fans spin up to jet engine levels right before transferring control > > to userspace. An old patch I have locally to mitigate this (which I > > got from whichever outstanding bug exists for this in the bug > > tracker) doesn=E2=80=99t seem to work any longer. > > > > The second is that the kernel crashes (apparently) as soon as it > > tries to mount a ZFS pool during early stages of the boot process, > > but after successfully transferring control to userspace. Typing > > this from a photo of the crash so omitting details that I think > > aren=E2=80=99t going to be relevant here, like addresses, here is what I > > get: > > > > ---- > > Setting hostid: =E2=80=A6 > > ZFS filesystem version: 5 > > ZFS storage pool version: features support (500) > > > > Fatal kernel trap: > > > > Exception =3D 0x400 (instruction storage interrupt) > > =E2=80=A6 > > pid =3D 64, comm =3D zpool > > > > panic: instruction storage interrupt trap > > cpuid =3D 1 > > time =3D =E2=80=A6 > > KDB: stack backtrace: > > #0 kdb_backtrace > > #1 vpanic > > #2 panic > > #3 trap > > #4 powerpc_interrupt > > Uptime: 7s > > ---- > > > > Any thoughts about what I could look into? Any =E2=80=9Crecent=E2=80=9D= commits that > > you think may be at fault? > > > > Thanks! > > =20 >=20