From nobody Fri Feb 04 03:31:40 2022 X-Original-To: freebsd-arm@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 5699119B51F1 for ; Fri, 4 Feb 2022 03:31:53 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic307-8.consmr.mail.gq1.yahoo.com (sonic307-8.consmr.mail.gq1.yahoo.com [98.137.64.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jqh0m1N9Xz4VYB for ; Fri, 4 Feb 2022 03:31:52 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1643945504; bh=VGpX4O155J/X1fbMVuFmCzndqbWoghjBeOrY3Bd6JwI=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=bX5+oXnOUQHmYNM8zGazs5nKYoPxJd74EVhdnM058g8tjFgsr2YPP2F82ifm1qOiQ46iRcF5pw96xeUXUQV3cHMG/X98d/weOZc1eJcqUH0xExaDR99wHGMPCz/vjx3RRleOEOTI4IrqSQA060lsd2fgVBT4BdA5lerJLvWw3buK4lVZFZIKzbu/qoZwreZEHKOI+kwBKqGrafHRWqtMlE3DgKAwkanTmiNdtJEWoTsQAzp4U1zhCFUevqVKpxmhkr9zNaUQWueMx0GILeMn3F6ItbVgmribj3C+GYibwMyrqqHEd8REZlLhqNzfPC4ghLtOKYAU9MmDPDT52lnuSQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1643945504; bh=psh6nitOSJxYakGE5U93cVkXVd3pdWscwFAQYkHn0kg=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=SsVW+naZ1S8AC2GGxOzdM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Y7Sx7Hpb0MLKzecAeHskNMJEeQz5PjByfJsxy7Jjexp8gC0B3n322t6_nOxwYKF L0smTG.aaQTWeWyQcxz6aTY.3qAuIKyDhjBdk1PBhQ3IyIxlYuJghYHtgsDG_1MG497wAu1MjImR sG6tdP6EVycG0pH.2bTgNp6ZRrst0..neFAH7Gn6f5js2ndQH3gGckKraif29ewEDOUP9_uyaNFs 0AcJCbc8Q9tMxPtRv6pMnTV.3JLOdWCm_vtKieNFoxpwjx69ZBRpnUQkvq4n_GcZY3E8uv79Td7p obQGUfCCg_VVNv06kJ4hYNzXeLc1IeYtovQbD7nv1D8APwP7c3dvEjlY9W3WInigpbgB4S1XjHwV LTe1VSWZ3dHI_QAyoWwYRi32SuBddBbhkYo_9BsPL46FgYsk8W403DU2tj2b8_n1nn9aVDFUnsXk Bj5Aa4IRMgKmaN2a9gL.RcGalUCs9HSDo3AXUXQA7uizRZNsyM741ttDoNdrswWA_fKSZt7hvN0A ZTsfA0LvHfBDY5Lf9qNj_wm6aDcYtMp74Pp0a1Fmv6MHtJVXCBxPviIxC8EjDYyCZj3TAq2dyAI4 KCNAPlgOnG3nTDzSB X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic307.consmr.mail.gq1.yahoo.com with HTTP; Fri, 4 Feb 2022 03:31:44 +0000 Received: by kubenode505.mail-prod1.omega.bf1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 0683511115c27a6d6b00b9c3366547a3; Fri, 04 Feb 2022 03:31:42 +0000 (UTC) Content-Type: text/plain; charset=us-ascii List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: Troubles building world on stable/13 [problem replicated at last, not analyzed] From: Mark Millard In-Reply-To: <20220203230428.GA81336@www.zefox.net> Date: Thu, 3 Feb 2022 19:31:40 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <512F38B3-61FF-401F-87B6-58FEF2DBE74A@yahoo.com> References: <8595CFBD-DC65-4472-A0A1-8A7BE1C031D6@yahoo.com> <20220124165449.GA39982@www.zefox.net> <5FAC2B2C-7740-435E-A183-FB3EF1FCE7F9@yahoo.com> <20220202223208.GA78110@www.zefox.net> <70550346-BC53-458F-B01B-68559E5C9847@yahoo.com> <20220203015149.GA78722@www.zefox.net> <8A85F917-F4E8-4382-B777-15AF7401E616@yahoo.com> <20220203230428.GA81336@www.zefox.net> To: bob prohaska X-Mailer: Apple Mail (2.3654.120.0.1.13) X-Rspamd-Queue-Id: 4Jqh0m1N9Xz4VYB X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=bX5+oXnO; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.32 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.28 / 15.00]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; DKIM_TRACE(0.00)[yahoo.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_HAM_SHORT(-0.82)[-0.820]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.97)[-0.966]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-0.998]; MIME_GOOD(-0.10)[text/plain]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.32:from]; MLMMJ_DEST(0.00)[freebsd-arm]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.64.32:from]; RCVD_COUNT_TWO(0.00)[2] X-ThisMailContainsUnwantedMimeParts: N > On 2022-Feb-3, at 15:04, bob prohaska wrote: >=20 > On Thu, Feb 03, 2022 at 09:17:06AM -0800, Mark Millard wrote: >>=20 >> Could you make a copy of the /usr/bin/c++ involved accessible >> via: >>=20 >> http://www.zefox.net/~fbsd/rpi3/clang_trouble/20220202/ >>=20 >> (possibly compressed)? >>=20 >=20 > Done. I was not able to replicate the problem on a RPi4B with total_mem=3D991 with 2 GiBytes of swap via a copy of Bob's c++ compiler file. BUT . . . Using such a c++ copy, I was able to replicate the problem on the RPi3B with 2 GiBytes of swap. It had "fault address: 0x1" instead of 0x5 but was at the same instruction. It was the same FreeBSD media for both attempts, just moved between machines. (The RPi4B uses the msdosfs on the USB3 NVMe SSD for the RPi* firmware and U-Boot, not just the FreeBSD UEFI loader. The RPi3B uses the msdosfs on a microsd card for the RPi* firmware and U-Boot but uses the FreeBSD UEFI loader from the USB3 NVMe SSD.) The builds of FreeBSD (mine vs. Bob's) are different and the specific versions are different. In my tests, Bob's c++ is using the libraries from my build. In my environment, I've replicated the problem using Bob's c++ in 3 kinds of contexts: A) Use of that c++ under main [so: 14]. and: B) Use of that c++ in a stable/13 chroot that I built. and: C) Use of that c++ in a stable/13 chroot made via expansion of the files: http://ftp3.freebsd.org/pub/FreeBSD/snapshots/arm64/13.0-STABLE/base.txz = http://ftp3.freebsd.org/pub/FreeBSD/snapshots/arm64/13.0-STABLE/base-dbg.t= xz I used the main [so: 14] context for generating the notes below. Bob's c++ does not have symbols (is stripped) and I've no debug info for Bob's c++. So the failure for a run under lldb looks like: (lldb) run Process 1094 launched: '/root/c_tests/c++' (aarch64) Process 1094 stopped * thread #1, name =3D 'c++', stop reason =3D signal SIGSEGV: invalid = address (fault address: 0x1) frame #0: 0x0000000002df7444 c++`___lldb_unnamed_symbol39489 + 40 c++`___lldb_unnamed_symbol39489: -> 0x2df7444 <+40>: ldr x9, [x3] 0x2df7448 <+44>: cmp x9, #0x8 ; =3D0x8=20 0x2df744c <+48>: b.lo 0x2df7ac0 ; <+1700> 0x2df7450 <+52>: mov x21, x3 (lldb) bt * thread #1, name =3D 'c++', stop reason =3D signal SIGSEGV: invalid = address (fault address: 0x1) * frame #0: 0x0000000002df7444 c++`___lldb_unnamed_symbol39489 + 40 frame #1: 0x000000000317e784 c++`___lldb_unnamed_symbol47720 + 3712 (Absent debug information, the inline information is not shown. What is shown matches what Bob has reported.) For reference: (lldb) reg read General Purpose Registers: x0 =3D 0x000000004d769800 x1 =3D 0x0000000050320700 x2 =3D 0x00000000568aa8c8 x3 =3D 0x0000000000000001 x4 =3D 0x0000000000000001 x5 =3D 0x0000ffffffff9a58 x6 =3D 0x0000000000000000 x7 =3D 0x0000000000000000 x8 =3D 0x238f5fc5e23f2d85 x9 =3D 0x0000000000000002 x10 =3D 0x000000000007ffff x11 =3D 0x0000000000000000 x12 =3D 0x0000000000000001 x13 =3D 0x000000004d6f5de0 x14 =3D 0x0000000000000013 x15 =3D 0xffffff6bffffffff x16 =3D 0x0000000005116e70 =20 x17 =3D 0x0000000049a60dd0 libc.so.7`__free [inlined] = tsd_state_get at tsd.h:212:9 libc.so.7`__free [inlined] tsd_fast at tsd.h:337:15 libc.so.7`__free [inlined] free_fastpath at jemalloc_jemalloc.c:2793:6 libc.so.7`__free at jemalloc_jemalloc.c:2851:7 x18 =3D 0xffffffffffffe000 x19 =3D 0x000000004d769800 x20 =3D 0x0000000000517f9b =20 x21 =3D 0x00000000568a9da0 x22 =3D 0x0000000000000000 x23 =3D 0x00000000568a8f92 x24 =3D 0x00000000568aa8c8 x25 =3D 0x0000000000000002 x26 =3D 0x00000000568a9da0 x27 =3D 0x0000000000000001 x28 =3D 0x0000000000517f94 =20 fp =3D 0x0000ffffffffa0a0 lr =3D 0x000000000317e784 c++`___lldb_unnamed_symbol47720 + = 3712 sp =3D 0x0000ffffffff9f90 pc =3D 0x0000000002df7444 c++`___lldb_unnamed_symbol39489 + 40 cpsr =3D 0x60000200 (x17's information varied across my various experiments. So it is not obvious that __free being mentioned above implies much.) (lldb) up frame #1: 0x000000000317e784 c++`___lldb_unnamed_symbol47720 + 3712 c++`___lldb_unnamed_symbol47720: -> 0x317e784 <+3712>: cbz x23, 0x317e790 ; <+3724> 0x317e788 <+3716>: ldrb w8, [x23] 0x317e78c <+3720>: cbnz w8, 0x317e7a8 ; <+3748> 0x317e790 <+3724>: ldr x1, [sp, #0xc0] (That actually points to the line after the jump to drame #0's subroutine: the return place.) (lldb) reg read General Purpose Registers: x19 =3D 0x000000004d769800 x20 =3D 0x0000000000517f9b =20 x21 =3D 0x00000000568a9da0 x22 =3D 0x0000000000000000 x23 =3D 0x00000000568a8f92 x24 =3D 0x00000000568aa8c8 x25 =3D 0x0000000000000002 x26 =3D 0x00000000568a9da0 x27 =3D 0x0000000000000001 x28 =3D 0x0000000000517f94 =20 fp =3D 0x0000ffffffffa550 lr =3D 0x000000000317e784 c++`___lldb_unnamed_symbol47720 + = 3712 sp =3D 0x0000ffffffffa0f0 pc =3D 0x000000000317e784 c++`___lldb_unnamed_symbol47720 + = 3712 20 registers were unavailable. For some reason lr was not updated to the next level of return-place. I might see about if we can get a build of c++ on Bob's machine that has symbols not stripped and has debug information and that also shows the problem, probably not chaining the optimization selection. But I'll not deal with that in this note. =3D=3D=3D Mark Millard marklmi at yahoo.com