Date: Tue, 29 Dec 2020 13:24:49 -0800 From: Mark Millard <marklmi@yahoo.com> To: bob prohaska <fbsd@www.zefox.net> Cc: freebsd-arm@freebsd.org Subject: Re: Migrating from -current to stable/12 on RPI2B (ARMv7) Message-ID: <DB6C87A3-19DC-4979-AC17-FD1261782803@yahoo.com> In-Reply-To: <7E0A320A-4C81-4C7B-B5D0-E6681FFA24FC@yahoo.com> References: <20201228044840.GA28380@www.zefox.net> <F9CB3890-5E07-46C9-AC40-D968F8B51B1F@yahoo.com> <20201228185622.GB28380@www.zefox.net> <E1EC1332-62D8-4E51-BF4D-9812AF7EF44B@yahoo.com> <2C1E2F87-2FC3-481C-A508-C76B2D7CFF7F@yahoo.com> <619A02CC-0EBA-4B50-A3BB-C326996AE706@yahoo.com> <B6A3C3C8-4AB9-43B5-A93F-8F2B6DE5E5E9@yahoo.com> <CB0E5ECD-CDDA-46A7-812B-744AF7645A78@yahoo.com> <20201229010220.GA36311@www.zefox.net> <78A4DEC3-421F-419D-ABDE-9F3724E44C8D@yahoo.com> <7E0A320A-4C81-4C7B-B5D0-E6681FFA24FC@yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-Dec-29, at 02:15, Mark Millard <marklmi at yahoo.com> wrote: > On 2020-Dec-29, at 00:16, Mark Millard <marklmi at yahoo.com> wrote: >=20 >> On 2020-Dec-28, at 17:02, bob prohaska <fbsd@www.zefox.net> 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<optimized out>) 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<optimized out>, info=3Dinfo@entry=3D0x424df7f0, ucp=3D<optimized = out>) 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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?DB6C87A3-19DC-4979-AC17-FD1261782803>