From owner-freebsd-arm@freebsd.org Tue Dec 29 21:24:59 2020 Return-Path: Delivered-To: freebsd-arm@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EC9184CB90E for ; Tue, 29 Dec 2020 21:24:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic312-24.consmr.mail.gq1.yahoo.com (sonic312-24.consmr.mail.gq1.yahoo.com [98.137.69.205]) (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 4D56rV0QJRz3Qkd for ; Tue, 29 Dec 2020 21:24:57 +0000 (UTC) (envelope-from marklmi@yahoo.com) X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1609277095; bh=N6M8DikHaEcYsCqsH0jtHOTYEPD37dDy2UARPkZ6cIb=; h=Subject:From:Date:To:From:Subject; b=SRxHSre7QzWRTmSAGBX9gNrKhX7s6hZp/Yd3KfE/u0zbVUNMM2CZ9TFQ2D95WMzv6l3qNXCGFQBr38FbXkpC+u0VvyqN5ZEPRVYyjOg3l/GrKHsj9TpvuW5q3bJX9y38MkW1f/bNidQvdPkpUAGw1DEYlfnVFIKOHnqYijdHuXl7ArToZIHyh+/4feIuCSmyvVqigTXPmWwaCWg4gI81z/XbOK3BI84dweVZECJjPbbxArWvjlrQTVTzxtJdZ2M0iaDlVEpKrELg8/AH+4Va93yCQwFDvyw6A4lt7mAics7tqLksA3HWMKk/jAWHvxXJW8twWV3zQeoc5eWEI+yIgg== X-YMail-OSG: xyX0aU8VM1mJbGKoaTXyXKJXymwPjAA5zTOUedViIFeIwtT.V0Sj0lHCXGZrFKs R4.9smOEYBhNrU52Y_NQlSOsZrIUdg9vskSFDY7dTZ5RDNStRenVB2uWTgpwPdOJr84myBLCmBkL lP71rTz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VmMyVEc80xfVtflP_1qtyZlekBN1CqHg1tXFdYY3egfDRK6Ib39Vdnx3o EKhY6Z34BIKEvFn8AY_0o5l8M0U2LGm84l898U5QJcLxagqMwCNUiBKFzduGPGN.MNe6saTpk2pT N1mQpSDc73Ada4oZ94piqGicEWk5fd68x0ES0sRGONTuGweaverine.uTzYBo6qr1MnLd7jdlJ2e BwnY.KUljMWbqKRR4tReuv5ML6JJ22Mev_1xi3znvLaXN4AITJzFMGm8tQLtTs0L_Q4iIkcPoY.4 JXxg- Received: from sonic.gate.mail.ne1.yahoo.com by sonic312.consmr.mail.gq1.yahoo.com with HTTP; Tue, 29 Dec 2020 21:24:55 +0000 Received: by smtp409.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 142f1cbe6aacd1ece5c620fe482e11a0; Tue, 29 Dec 2020 21:24:50 +0000 (UTC) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: Migrating from -current to stable/12 on RPI2B (ARMv7) From: Mark Millard In-Reply-To: <7E0A320A-4C81-4C7B-B5D0-E6681FFA24FC@yahoo.com> Date: Tue, 29 Dec 2020 13:24:49 -0800 Cc: freebsd-arm@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <20201228044840.GA28380@www.zefox.net> <20201228185622.GB28380@www.zefox.net> <2C1E2F87-2FC3-481C-A508-C76B2D7CFF7F@yahoo.com> <619A02CC-0EBA-4B50-A3BB-C326996AE706@yahoo.com> <20201229010220.GA36311@www.zefox.net> <78A4DEC3-421F-419D-ABDE-9F3724E44C8D@yahoo.com> <7E0A320A-4C81-4C7B-B5D0-E6681FFA24FC@yahoo.com> To: bob prohaska X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Rspamd-Queue-Id: 4D56rV0QJRz3Qkd X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 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(-1.00)[-1.000]; 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]; RBL_DBL_DONT_QUERY_IPS(0.00)[98.137.69.205:from]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; MID_RHS_MATCH_FROM(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; SPAMHAUS_ZRD(0.00)[98.137.69.205:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.69.205:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.69.205:from]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[freebsd-arm] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Dec 2020 21:25:00 -0000 On 2020-Dec-29, at 02:15, Mark Millard wrote: > On 2020-Dec-29, at 00:16, Mark Millard wrote: >=20 >> On 2020-Dec-28, at 17:02, bob prohaska wrote: >>=20 >>> On Mon, Dec 28, 2020 at 04:14:51PM -0800, Mark Millard wrote: >>>> [I get the problem as well! I report a backtrace of the failure >>>> and some more.] >>>>=20 >>>=20 >>> Relieved to see it's reproducible. =20 >> . . . >>=20 >> I tried reducing the size of things to be produced via building >> the target based on the likes of using: >>=20 >> WITHOUT_LLVM_TARGET_AARCH64=3D >> WITH_LLVM_TARGET_ARM=3D >> WITHOUT_LLVM_TARGET_MIPS=3D >> WITHOUT_LLVM_TARGET_POWERPC=3D >> WITHOUT_LLVM_TARGET_RISCV=3D >> WITHOUT_LLVM_TARGET_X86=3D >> MALLOC_PRODUCTION=3D >> WITH_MALLOC_PRODUCTION=3D >> WITHOUT_ASSERT_DEBUG=3D >> WITHOUT_LLVM_ASSERTIONS=3D >> WITHOUT_DEBUG_FILES=3D >>=20 >> (But the host 13 was unchanged.) >>=20 >> It still failed, but at a different memory allocation, of a >> different size: >>=20 >> r4 0x8000 32768 >>=20 >> (gdb) bt >> #0 thr_kill () at thr_kill.S:4 >> #1 0x4227d998 in __raise (s=3D6) at /usr/src/lib/libc/gen/raise.c:52 >> #2 0x42332284 in abort () at /usr/src/lib/libc/stdlib/abort.c:67 >> #3 0x00da5e4c in report_bad_alloc_error () at = /usr/src/contrib/llvm-project/llvm/lib/Support/ErrorHandling.cpp:174 >> #4 0x00da61c8 in out_of_memory_new_handler() () at = /usr/src/contrib/llvm-project/llvm/lib/Support/ErrorHandling.cpp:187 >> #5 0x420f5d24 in operator new (size=3D) at = /usr/src/contrib/llvm-project/libcxx/src/new.cpp:73 >> #6 0x00e16878 in SetBufferSize () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/raw_ostream.h:131 >> #7 SetBuffered () at = /usr/src/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp:97 >> #8 0x00e17368 in write () at = /usr/src/contrib/llvm-project/llvm/lib/Support/raw_ostream.cpp:251 >> #9 0x00ddfe20 in operator<< () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/raw_ostream.h:192 >> #10 operator<< () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/raw_ostream.h:205 >> #11 printSymbolizedStackTrace () at = /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:154 >> #12 0x00de163c in PrintStackTrace () at = /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:575 >> #13 0x00ddf604 in RunSignalHandlers () at = /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:67 >> #14 0x00de1f3c in SignalHandler () at = /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:396 >> #15 0x42021db4 in handle_signal (actp=3Dactp@entry=3D0x424df7b0, = sig=3D, info=3Dinfo@entry=3D0x424df7f0, ucp=3D) at /usr/src/lib/libthr/thread/thr_sig.c:303 >> #16 0x420213f8 in thr_sighandler (sig=3D0, info=3D0x424df7f0, = _ucp=3D0x424df830) at /usr/src/lib/libthr/thread/thr_sig.c:246 >> #17 0xffffe190 in ?? () >> Backtrace stopped: previous frame identical to this frame (corrupt = stack?) >=20 >=20 > Updating the host 13 made no significant difference in > behavior. >=20 > Using: >=20 > time -l /usr/bin/ld --eh-frame-hdr -Bstatic -o clang /usr/lib/crt1.o = /usr/lib/crti.o /usr/lib/crtbeginT.o = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/legac= y/usr/lib = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libz = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libexecinfo = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libelf = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/ncurses/ncursesw = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libthr -L/usr/lib --gc-sections cc1_main.o cc1as_main.o = cc1gen_reproducer_main.o driver.o = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/lib/clang/libclang/libclang.a = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/lib/clang/libllvm/libllvm.a -lz -lexecinfo -lelf -lncursesw -lpthread = -legacy -lc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/crtend.o = /usr/lib/crtn.o >=20 > it reported after the failure output (an example): >=20 > time: command terminated abnormally > 26.59 real 9.40 user 12.48 sys > 2052032 maximum resident set size > 21793 average shared memory size > 218 average unshared data size > 127 average unshared stack size > 703238 page reclaims > 0 page faults > 0 swaps > 55 block input operations > 3104 block output operations > 0 messages sent > 0 messages received > 1 signals received > 41126 voluntary context switches > 447 involuntary context switches >=20 > where looking up getrusage reports that: >=20 > ru_maxrss the maximum resident set size utilized (in kilobytes). >=20 > which means: 44.0625 MiByte below 2 GiBytes for the resident set. >=20 > Adding --threads=3D1 made little difference: >=20 > time: command terminated abnormally > 28.84 real 9.28 user 12.78 sys > 2065016 maximum resident set size > 21872 average shared memory size > 219 average unshared data size > 127 average unshared stack size > 709661 page reclaims > 0 page faults > 0 swaps > 48 block input operations > 3050 block output operations > 0 messages sent > 0 messages received > 1 signals received > 36717 voluntary context switches > 114 involuntary context switches > Abort trap I found another difference between how 13 is built and stable/12 is built, so I'm trying another build. The below shows what I've changed in stable/12 , but 13 eliminated even having the conditional logic, always using -O2 -pipe : # git diff | more diff --git a/share/mk/sys.mk b/share/mk/sys.mk index 9099b63a61a0..53d1e30b1d56 100644 --- a/share/mk/sys.mk +++ b/share/mk/sys.mk @@ -167,7 +167,7 @@ CFLAGS ?=3D -O .else CC ?=3D cc .if ${MACHINE_CPUARCH} =3D=3D "arm" || ${MACHINE_CPUARCH} =3D=3D "mips" -CFLAGS ?=3D -O -pipe +CFLAGS ?=3D -O2 -pipe .else CFLAGS ?=3D -O2 -pipe .endif I'll report if the use of ld to produce clang.full still fails or not. I've left the other things attempting to lead to less memory use in place. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)