From nobody Fri Sep 09 19:01:06 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 4MPQLs0ZZfz4c62G for ; Fri, 9 Sep 2022 19:01:09 +0000 (UTC) (envelope-from jmmv@outlook.com) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12olkn2091.outbound.protection.outlook.com [40.92.22.91]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "DigiCert Cloud Services CA-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MPQLr1GSLz3LL4; Fri, 9 Sep 2022 19:01:08 +0000 (UTC) (envelope-from jmmv@outlook.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DTYhcCXpEcAhjHW6cQaO/GFSO7DCB/MBQxTvxuWe0CmW8aC+z779Rnxw3njj7sJ6FNAg6+HOdissgT0ORy4In6GVfqsc5ocgN0LwCqcYu4y2t46qhtxBjb0RjyZmerLlbyaUyiQ3dpWNtbiGAfXwxFbbPFfv/4tvRo4kkfNY6GA5e25hvQV8o4wdL9hfV0LPO5rS63d4C78qaDoVt/QsbUcNJxPT457tRWlI3asQN/fZ4vr50JYTHQ6Qer36nS10eiyIX4KHuZwwL6hMQxq3bSXJaE/iJumj7VSsJjhW52KuR1krjiz1P5WFUb0n4wrfJZsVYhXSBBvSz76sWOWupA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=3etjoNhnxqMASdRCTyNE6vUYPGw7MPeUoP1R2hXikTY=; b=PHmG9/nQ+gH8yN2ueQDs6mn0OIBWngHcxwygfKVRqMJTC8wOKJmNlUMcPOey6yvDIAJvZsxyqCvQDr4mYOceMYgpJ67J1RH0ByuetSDcQ7h9NbN3BTySoyAS5UiZeIIw4GYC4xtXbOB/LFSCEgqr9Q4SBsNyz1eKLFXK+vc3Ye7TdFXxT66aRus/SlcBddtOfzYtUSD+3RcrSB/rpb2CGmhTEkjFY9Z2YOarMX41uobHBzmZn+Tm7fqduPqrGK8NaDOHhz0zAhtIARlVb2Hk91mHX3s5rnzx2hND0h16MbrVGUWWfeuhmsZ1HjQiYt2ZMzWD/2IZcC4IaphAmW3fbw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=3etjoNhnxqMASdRCTyNE6vUYPGw7MPeUoP1R2hXikTY=; b=YxsXJ0692wJw4L1BJhhq694dOAW26Zc26TiXb8wAQ4xUiu+xyJPEK5gTeTXv49+RpvfUs1+wV4h0umLB0JWIWBr5IJdLayy5/0vtCy+hkU3Wjbx1tNi2iE0l1538ekMJiew6nSJxQ5assw+nPM+O+eQyPreypynz4R7A5qzaATQFrU8WjuTQGnLPB7muUCr5dLDjlnN36T9VKYiOF3CMJiQJ0ha0e20HqdxL0dhIkBTKSsvHiGY39UPCasCsThtnydSHdU16ipVjunYYKgqPpDOUKAfJhIKjk7F0chh95NAbPji2L3TruTwo7br999U0Y0sy2z9MPVAjw6czr/CmjQ== Received: from PH0PR20MB3704.namprd20.prod.outlook.com (2603:10b6:510:20::22) by SN7PR20MB3743.namprd20.prod.outlook.com (2603:10b6:806:108::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5588.18; Fri, 9 Sep 2022 19:01:06 +0000 Received: from PH0PR20MB3704.namprd20.prod.outlook.com ([fe80::10fd:af3b:4ba6:230a]) by PH0PR20MB3704.namprd20.prod.outlook.com ([fe80::10fd:af3b:4ba6:230a%6]) with mapi id 15.20.5566.021; Fri, 9 Sep 2022 19:01:06 +0000 From: Julio Merino To: Justin Hibbits CC: "freebsd-ppc@freebsd.org" Subject: RE: PowerMac G5 crashes with "instruction storage interrupt" on recent 13 Thread-Topic: PowerMac G5 crashes with "instruction storage interrupt" on recent 13 Thread-Index: AQHYpOsmmne4KVhe90KjAGOwAMTWSq3Xf/GIgAADJoCAAC9H3w== Date: Fri, 9 Sep 2022 19:01:06 +0000 Message-ID: References: <20220909120857.61f65069@ralga-linux> In-Reply-To: <20220909120857.61f65069@ralga-linux> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 2 x-tmn: [bqurAdwqBx+YyuFUxQaPbeqKvvkEo08/] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7e21e76f-09a1-4563-ff02-08da9295a645 x-ms-traffictypediagnostic: SN7PR20MB3743:EE_ x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: QjFPtaZ5Ee2d7q8xesppgc4KSwV/njqAuFhCsmgfF8t19+s5Wu/tFK2Z7VtVk0rjiUPUnvhebYqFUlYmTmeqRH331rElB1qrPKWgvALTH6bm3fUsKXTThi+/G4vuNnTV/gsWLmhUFqYeLVRQYtJMr62UqswUTad6mevLfkvFtPcGCfUeBgLhZbXAiBKBw78ZN4YafutB/lincjgooHKuZm98ozX1MXwVdrU0gm0wrYO+7CBFRJS3I7YVZ11OBR/ezyflNrP/Ajxtp40SL/wG/1R5z00wKtFBVbc22nT5xUlxcTg9xOVYpfpgQ46Pfa7CxBdp10PKi7cx0npAI/NnBPQEoFqll7u2OKxHOxMcZGG3yQjSCZZgvSGp6+BGKBu2ftvXtYipC3zfith7IVcWxYav4e1px9koMiL13wgVSt8l/65KKDZNc8qN5J6nRlSgpoc2Ey9k8oyeLu+vy6ZUJi+M4Kdpfn5ETWIipzWMLl5vk7JLK/ELb86OsDs3RGTJ/fPRmTj8A5pbbUvOY0nHdvMSSBwWN2dDViFm4dor8oe3PFl7cKhbh+ap2xwLOXjlkwp1zcoCm3SVW/HOLeMfdgpAE4dewrZsddSSmVhwlrDfoY7rLrHBWrc59E6erF1Si7gi5e/aZdnmPzv7fQtyQx9GyYaVW4pErQJ823aXBuStRAT8YliVsoPMfj20LNo/ x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?Windows-1252?Q?giACuimIBlANhsuipBZ541bNhxI5UY1/UCXuO8M/lcMfC5wdSgPte1sb?= =?Windows-1252?Q?Ud5YdiZr70OTr15HU8dJbCPQJLuNIAe+OTZ+df3g+Ojox2ZeLSmMPLSY?= =?Windows-1252?Q?k0847ulMUKvhRwTq/uoQOekBniq4jYoBaFKUKAFYSuXxcabsD/CVsI9w?= =?Windows-1252?Q?iRhx1ci0ViP22IvVS+jZJ8O9B/oqDhzrC7ausxCFO6LlWOAd5By/ehqt?= =?Windows-1252?Q?rWQfG5qhlX5bfJvMZY4VAgTy1N6SGHGtl2w0SMK6XWDRV88YwW3Brukr?= =?Windows-1252?Q?c5iexuVMpbqyQ4LxI7vZkm0mBv44Pj6WrIG7HikjzAjc8ozkzr/Uz9so?= =?Windows-1252?Q?3BaeDKoPvkhAcAWdeoy0/4jHknCdujTZLlYj08MtgVOMhAytw+3ywbAG?= =?Windows-1252?Q?rdYgKC0/ZLBSKVtRzwHgr+PFUEjYSeTrokAvYjlXaaTXy6i9wU+mxLPJ?= =?Windows-1252?Q?xD9rs/a/sjHtvFRxlCdX8xkws1v2J3vwwhTa6h3XJcGUW3ez3j19zWBZ?= =?Windows-1252?Q?l2f0aAicbGQ4Z0adS/mvFPjPUSrtIQhP8x5iq42WjFhrARqVak6k+fcG?= =?Windows-1252?Q?xcOqSL84jM08ryVoFF/oIwhHDEkF1KtukmmhrYUCLVmqMd/A1P/5ecEv?= =?Windows-1252?Q?z/oSxBDhNT1G777Tr3D04LSbVALv157HednmQeCZ4d0jqaDz5kNj641k?= =?Windows-1252?Q?LihK2B7rldR8v3Xr7bHKufRa12SbskUqxijlUiZSsDYZIDKp+HcAea28?= =?Windows-1252?Q?D5pTRDdXXC6Ja+NL/MbgB3omqFhcYFEBvOdiK5lX9hOPE/TLrpJNb0qU?= =?Windows-1252?Q?9Se6X/CjAJelIhYuJ9nz0FAEciJeTT0WqvTMVFiN4qdJJqQ6cxj5Fe2l?= =?Windows-1252?Q?8FK6++k35auq/R6RndpC6NSb18Jdo8+s3jOQ75QdH/jeywg7kpY1Huaq?= =?Windows-1252?Q?RtnE+WtlDAL5asfUXWQo6fY2Avu2zSpD03/saqdlt/u62dMaxBN48E0k?= =?Windows-1252?Q?arwUoHAGJbSkc4svSaFH3swlUIpZ8z64r1zHL66lkXjSAOCcr+xgxovJ?= =?Windows-1252?Q?iJ+VYQmw4FsjhHuPBoMnKogawQQ9UXtLuwJ6CSkFZoWWu8Wss0FtTMvP?= =?Windows-1252?Q?OJzx3BzyRSj94HyghgZM+j7Gv/COt3asGQKtOalJ6ToYoY9XtOam1Qkv?= =?Windows-1252?Q?TTAL+v1RF7naJ4XZWb4bHSu3pM9LiKC2YtzqLHPMTLdStAHR/NnsSwDq?= =?Windows-1252?Q?inIxl/xDWxwnZbQqD5cqodjq0PLJX2KnvpoFiJqs/HlNm+XYt1Ub3Lit?= =?Windows-1252?Q?BEiaY+eUj89aJFZWybIan/gzFabb/8mU3HtGg8fMF87v07k8IP/hSggN?= =?Windows-1252?Q?xp7HO7pGITNttQ=3D=3D?= Content-Type: multipart/alternative; boundary="_000_PH0PR20MB37043177835C8DD8B024A173C0439PH0PR20MB3704namp_" 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 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PH0PR20MB3704.namprd20.prod.outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 7e21e76f-09a1-4563-ff02-08da9295a645 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Sep 2022 19:01:06.3109 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR20MB3743 X-Rspamd-Queue-Id: 4MPQLr1GSLz3LL4 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=outlook.com header.s=selector1 header.b=YxsXJ069; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=none; spf=pass (mx1.freebsd.org: domain of jmmv@outlook.com designates 40.92.22.91 as permitted sender) smtp.mailfrom=jmmv@outlook.com X-Spamd-Result: default: False [-4.14 / 15.00]; ARC_ALLOW(-1.00)[microsoft.com:s=arcselector9901:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.95)[-0.945]; FORGED_SENDER(0.30)[julio@meroh.net,jmmv@outlook.com]; R_DKIM_ALLOW(-0.20)[outlook.com:s=selector1]; R_SPF_ALLOW(-0.20)[+ip4:40.92.0.0/15]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; DMARC_NA(0.00)[meroh.net]; FREEFALL_USER(0.00)[jmmv]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[40.92.22.91:from]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TO_DN_EQ_ADDR_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[julio@meroh.net,jmmv@outlook.com]; MLMMJ_DEST(0.00)[freebsd-ppc@freebsd.org]; DKIM_TRACE(0.00)[outlook.com:+]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; DWL_DNSWL_NONE(0.00)[outlook.com:dkim]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:8075, ipnet:40.80.0.0/12, country:US]; FREEMAIL_ENVFROM(0.00)[outlook.com]; RWL_MAILSPIKE_POSSIBLE(0.00)[40.92.22.91:from] X-ThisMailContainsUnwantedMimeParts: N --_000_PH0PR20MB37043177835C8DD8B024A173C0439PH0PR20MB3704namp_ Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Ah, thanks for the workaround. I applied it on top of 9171b8068b92 and the = kernel was able to boot successfully =96 and it seems stable so far. However, if I apply the hack on top of stable/13=92s HEAD, there is still t= he 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 sim= ple =93git log=94 in /usr/src makes the fan spin up within a couple of seco= nds and they stop soon after that.) Any ideas on where this might come from= ? 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 re= cent 13 Hi Julio, 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. The problem appears to be in either lld or the kernel linker. - Justin On Fri, 9 Sep 2022 16:00:33 +0000 Julio Merino wrote: > 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=92s 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=92s running an old build of FreeBSD 13 stable > (from around October of last year) that I=92m 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=92t 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=92t > going to be relevant here, like addresses, here is what I get: > > ---- > Setting hostid: =85 > ZFS filesystem version: 5 > ZFS storage pool version: features support (500) > > Fatal kernel trap: > > Exception =3D 0x400 (instruction storage interrupt) > =85 > pid =3D 64, comm =3D zpool > > panic: instruction storage interrupt trap > cpuid =3D 1 > time =3D =85 > 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 =93recent=94 commits that > you think may be at fault? > > Thanks! > --_000_PH0PR20MB37043177835C8DD8B024A173C0439PH0PR20MB3704namp_ Content-Type: text/html; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable

Ah, thanks for the workaround. I applied it on top o= f 9171b8068b92 and the kernel was able to boot successfully =96 and it seem= s stable so far.

 

However, if I apply the hack on top of stable/13=92s= HEAD, there is still the issue of the fans going crazy at the slightest in= crease in CPU load but they do drop back down to quiet when the load subsum= es. (For example, a simple =93git log=94 in /usr/src makes the fan spin up within a couple of seconds and they stop= soon after that.) Any ideas on where this might come from?

 

 

From: Justin Hibbits
Sent: Friday, September 9, 2022 09:09
To: Julio Merino
Cc: freebsd-ppc@freebsd.o= rg
Subject: Re: PowerMac G5 crashes with "instruction storage inte= rrupt" on recent 13

 

Hi Julio,

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.

The problem appears to be in either lld or the kernel linker.

- Justin

On Fri, 9 Sep 2022 16:00:33 +0000
Julio Merino <julio@meroh.net> wrote:

> 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=92s 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<mailto:julio@= meroh.net>
> Sent: Sunday, July 31, 2022 07:45
> To: freebsd-ppc@freebsd.org<mailto:freebsd-ppc@freebsd.org>
> Subject: PowerMac G5 crashes with "instruction storage interrupt&= quot; on
> recent 13
>
> Hi all,
>
> I have a PowerMac G5 that=92s running an old build of FreeBSD 13 stabl= e
> (from around October of last year) that I=92m 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=92t 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<= br> > from a photo of the crash so omitting details that I think aren=92t > going to be relevant here, like addresses, here is what I get:
>
> ----
> Setting hostid: =85
> ZFS filesystem version: 5
> ZFS storage pool version: features support (500)
>
> Fatal kernel trap:
>
> Exception =3D 0x400 (instruction storage interrupt)
> =85
> pid =3D 64, comm =3D zpool
>
> panic: instruction storage interrupt trap
> cpuid =3D 1
> time =3D =85
> 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 =93recent=94 commits th= at
> you think may be at fault?
>
> Thanks!
>

 

--_000_PH0PR20MB37043177835C8DD8B024A173C0439PH0PR20MB3704namp_--