From nobody Fri Jul 07 16:38:10 2023 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 4QyJxH69xqz4m0R2 for ; Fri, 7 Jul 2023 16:38:27 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4QyJxG4YLgz4Ht2 for ; Fri, 7 Jul 2023 16:38:26 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b="iWIYQS/K"; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.68.31 as permitted sender) smtp.mailfrom=marklmi@yahoo.com; dmarc=pass (policy=reject) header.from=yahoo.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688747904; bh=2gSGOAKiJcjJ2kVttEKish05aNcgqwThPCeHj8HDrZU=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From:Subject:Reply-To; b=iWIYQS/KiWJy5lP2BMWTe9aveApyJEBHRRFqZO2wH7+X/JZpxThW9Wem2SLzGUTjfWSMFwAgmygkg8hl7D+VD1dUrT5vr/FPSQqI4BUSTCc7/jIWQeqRBWk4gGQdP+o4X6owLb2J5F1bTNHr8TFGLMck39+WGLpd4cDH/s2sA4RpVAiWOMEZQ5b0rxIdTntoMrQhh+JRJfXsumvjTAwX32eGLhA3afOfy5JPMMMul+g6ZghO7Sazd6/GjECVECyspbxsa0uY7KmyD4XUK8eXV1Mrl2rcI2rPYQ4rbhfR44uCUpehojM209HO1tclfulooIWD6xZqBC/Hc7dRWsLkCg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1688747904; bh=NkYzaYGYd7aH/I33/R/yO19yhS5yZ89B5cubsn4/xxy=; h=X-Sonic-MF:Subject:From:Date:To:From:Subject; b=cdh3Gn6Rs/zAGEScW1jQVouELmmSmkru55+R06qHoYCQ4mnzgK0Js12v/T6LgUaLjHGR5w0IR67qxYYtkSlQgR4POj20cVk9KSxvf9IAGUtBhP2fkwviv62Tcx30djXbknm7SrcXb6zGeogy/DSPpAWhlYNU3E5J49wJDGeMIyhkrpNj2mZ9hx+ueO47tfs1XcxebAXapThWMDD3cr4t8V9l43hXxfhaCDMVSnlyjzRi/BKC/1lPc5CoO8il9voTRXT+nhNgxKM/FO403X1IoTRHh/O6UNJQ/3T5nmKM/jwo24aSd9xpZhbRnPpC0xFHZrijdN394yKqkcc8eqrkbQ== X-YMail-OSG: O1No310VM1lDrAhFaWmqB5AqPFnldVdvkJ4x3Thzuo.0f8SuYsckbwKu90LEAdk FUwgK59x7AoaSr9L3mUw3Xn1H5ZK69vKWh93hWTXCecN4xIGUc5Gx0_vFRxmJyvLAgLE7q5zu2jM 4YOFCe6Ehnb3dD5r44g684_PKM1HtobX8Jvd8M2e4qLIsDNPSbab9nzKzQDkSex3OuxeRZR4L3Ky ymMw7_mEDcSf9tUw1oOT30AmpeBzC.ZfN2aP1XuF5C_m2QvoP.Q8HcTzQ8FjNS79470xtzltVVrm 3nxYN6V_LVnE6S.YS0yQj8dODDVKKgbWTH_GFYxO7NUeb8Cb.8ZU5QCv69l2Zvc5brRusUCxR7Dm DptHNVLih.dxiwhucb2XaWV5wUtu8E4N272ONNw_oDlNUHd256RDmtTplmno0GphVcFfH1HRRM83 HC3A.77.KYWblpWsmC.Fgy8u3YOByxwHEkeo_0Zi1G7GyRwRfnStMcMo43nehsuERMLCZKsTXKDH Xv4cHkQvkRu9NJL7ZOaSq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ER3qAU1CfIT8MDPE.uhCyuqEcAbL_fE3U8tRFErHebOQx8O3s6 Uh.EoTPNixn8k4qcdCKRY.bjgve8cJyf6O9vL791GlG44niq3TLiNhbHVh4Z.rJinBGDC2vHWXxg eMaHK8.NiBG29abunTy1x8iHcJ1YzCzUCRt7KtTusia1KhbTn0Bs7Lkn4XWZYpEnfiqCHb7gGDp0 8GAJZDkxglMK9bOJsGpFyIN31m9MAUWrJ.eTVy9JtBYsawdtlMgDJgfHWGakhJjmRTV1QpJ88dsA DkMBk4Tb12Z1qiaY3hU8y.cb8Z8IiPF_HKTen2p_s5G43wTEmO6IzE.T1PAGQAIAS0JVIP3axMjj bohlGDpf1BHCMv91.W.ucvu_zypDNy9ibVGvn5r9BFul7YutUFEj6sjYmuyA7FlctNaqVkGJM7Xl Zb3iZjjiSn.NCzk43QbMVt4WWrmvmH64xjXCImHGh.WQwbnUvqGdZeYxFP8o7Ee7h7aoWQSen9dU g8fFNl4aERCuWPcu.rUPVJac9E4zxFIme.m4_NDW2Xs0lLWXZSyWGLPWSRkRRGEJrTQJxgGqqDYq SuX1lCqQW24ORavrLr3m0K8fI9sTzsr.2uhfhL.npjoSO9Hi1memzhJnU_Hh0w1v5YDQKUAYXV5j aWyknAFUxdaAkpC4pKNOOA3fNkGvtz4tFE_6kEAYp4ZYxsWu3PbZsB5eZkGrtoSmxUbr1g31skNe 6Du3O X-Sonic-MF: X-Sonic-ID: 2b0bc61c-0893-48b9-93a5-8924163da783 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Fri, 7 Jul 2023 16:38:24 +0000 Received: by hermes--production-gq1-5748b5bccb-n889z (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 8a230ef98945b4f4550193030fcc2bec; Fri, 07 Jul 2023 16:38:21 +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 16.0 \(3731.600.7\)) Subject: Re: For snapshot builds: armv7 chroot on aarch64 has kyua test -k /usr/tests/Kyuafile sys/kern/kern_copyin hung up [in getpid?], unkillable, prevents reboot From: Mark Millard In-Reply-To: <9EE9CFF2-378B-42D0-A171-9481286805C2@yahoo.com> Date: Fri, 7 Jul 2023 09:38:10 -0700 Cc: John F Carr , Current FreeBSD , freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: <3B31195E-9CAB-4F79-90D9-9E05927235C8@yahoo.com> References: <7A41DED4-876F-4270-A980-549A4832B39A.ref@yahoo.com> <7A41DED4-876F-4270-A980-549A4832B39A@yahoo.com> <3404EA26-BFDD-4B87-830B-62CB6E91C0BD@karels.net> <240A32EC-E255-4B04-83B3-0D57308B701B@mit.edu> <106875C8-76F9-4307-A495-D41EAE8F1C8B@karels.net> <9EE9CFF2-378B-42D0-A171-9481286805C2@yahoo.com> To: Mike Karels X-Mailer: Apple Mail (2.3731.600.7) X-Spamd-Result: default: False [-2.09 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.991]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; NEURAL_SPAM_MEDIUM(0.41)[0.405]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; MIME_GOOD(-0.10)[text/plain]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.31:from]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; SUBJECT_HAS_QUESTION(0.00)[]; DKIM_TRACE(0.00)[yahoo.com:+]; RCVD_TLS_LAST(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.31:from] X-Rspamd-Queue-Id: 4QyJxG4YLgz4Ht2 X-Spamd-Bar: -- X-ThisMailContainsUnwantedMimeParts: N On Jul 7, 2023, at 07:36, Mark Millard wrote: > On Jul 7, 2023, at 06:50, Mike Karels wrote: >=20 >> On 7 Jul 2023, at 6:06, John F Carr wrote: >>=20 >>> On Jul 6, 2023, at 20:42, Mike Karels wrote: >>>>=20 >>>>=20 >>>> Thanks for isolating this. Let me know when you have the bug = number. >>>> I just tested a fix (the compat code drops the reference on the = current >>>> address space an extra time, probably freeing it). >>>>=20 >>>> Mike >>=20 >> The fix is in = https://cgit.freebsd.org/src/commit/?id=3Dbe30fd3ab2e8418a696e69f54a91a7e2= db5962de. >>=20 >>> The bug was introduced in January, 2022. It allows 32 bit binaries = to crash a 64 bit system when COMPAT_FREEBSD32 is on. Test coverage of = the buggy function (sysctl_kern_proc_vm_layout) was added at the same = time. >>>=20 >>> There should be routine runs of 32 bit test suites on 64 bit = systems. Although i386 and armv7 are tier 2 systems, the tier 1 = COMPAT_FREEBSD32 kernel code needs to be exercised. This bug was only = discovered by manually running tests in the right environment, 17 months = after automated testing could have discovered it. >>=20 >> That is not so simple currently, as the shared libraries for the >> test environment are not part of 32-bit compatibility package. >> The required bits could be extracted from the corresponding 32-bit >> build, but that isn't easy to automate. Fortunately, I think that >> very few of the tests exercise any 32-bit-specific code paths. >=20 > One way that I demonstrated this problem on an aarch64 system > that supports aarch32/armv7 in user space was via the use of > an official snapshot armv7 image. In my case I: >=20 > A) dd'd the image to USB3 media (after downloading it) > B) mounted the ufs file system on the media to a mount point I forgot to mention an important step: before chroot is used, I preload various kernel modules that are used in the Kyuafile tests --because the chroot'd activity will not cause the loads of themsleves but will use the modules if they have already been loaded. > C) used a chroot into that mount point to run the: > "kyua test -k /usr/tests/Kyuafile" >=20 > (I happened to do all that as root.) >=20 > There may be viable alternatives to dd'ing to allow an analogy to > (B) for (C) to use. I've not experimented with using a jail > instead of a chroot. >=20 > One can also install an armv7 world into a local directory tree > and then use chroot (or analogous). >=20 > How far off is an analogous sort of procedure from being reasonable > to automate? >=20 > i386, of course, also has lib32 and independently testing that is > a messier issue, including trying to use /usr/tests/Kyuafile based > testing that avoids use of chroot (or analogous). I'm not claiming > lib32 has as simple of a potential path to automated testing. >=20 > I do not know if FreeBSD has powerpc64 hardware able to use a > powerpc world directory tree analogously. Such hardware may be too > old and otherwise problematical, making it not viable to automate > testing. >=20 =3D=3D=3D Mark Millard marklmi at yahoo.com