Re: Migrating from -current to stable/12 on RPI2B (ARMv7)
Mark Millard via freebsd-arm <[email protected]>
| Newsgroups | gmane.os.freebsd.devel.arm |
|---|---|
| Message-ID | <[email protected]> |
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: > >> On 2020-Dec-28, at 17:02, bob prohaska <[email protected]> wrote: >> >>> 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.] >>>> >>> >>> Relieved to see it's reproducible. >> . . . >> >> I tried reducing the size of things to be produced via building >> the target based on the likes of using: >> >> WITHOUT_LLVM_TARGET_AARCH64= >> WITH_LLVM_TARGET_ARM= >> WITHOUT_LLVM_TARGET_MIPS= >> WITHOUT_LLVM_TARGET_POWERPC= >> WITHOUT_LLVM_TARGET_RISCV= >> WITHOUT_LLVM_TARGET_X86= >> MALLOC_PRODUCTION= >> WITH_MALLOC_PRODUCTION= >> WITHOUT_ASSERT_DEBUG= >> WITHOUT_LLVM_ASSERTIONS= >> WITHOUT_DEBUG_FILES= >> >> (But the host 13 was unchanged.) >> >> It still failed, but at a different memory allocation, of a >> different size: >> >> r4 0x8000 32768 >> >> (gdb) bt >> #0 thr_kill () at thr_kill.S:4 >> #1 0x4227d998 in __raise (s=6) 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=<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=actp@entry=0x424df7b0, sig=<optimized out>, info=info@entry=0x424df7f0, ucp=<optimized out>) at /usr/src/lib/libthr/thread/thr_sig.c:303 >> #16 0x420213f8 in thr_sighandler (sig=0, info=0x424df7f0, _ucp=0x424df830) at /usr/src/lib/libthr/thread/thr_sig.c:246 >> #17 0xffffe190 in ?? () >> Backtrace stopped: previous frame identical to this frame (corrupt stack?) > > > Updating the host 13 made no significant difference in > behavior. > > Using: > > 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/legacy/usr/lib -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/lib/libz -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/lib/libexecinfo -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/lib/libelf -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/lib/ncurses/ncursesw -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/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-tools/lib/clang/libclang/libclang.a /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-tools/lib/clang/libllvm/libllvm.a -lz -lexecinfo -lelf -lncursesw -lpthread -legac y -lc++ -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /usr/lib/crtend.o /usr/lib/crtn.o > > it reported after the failure output (an example): > > 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 > > where looking up getrusage reports that: > > ru_maxrss the maximum resident set size utilized (in kilobytes). > > which means: 44.0625 MiByte below 2 GiBytes for the resident set. > > Adding --threads=1 made little difference: > > 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 ?= -O .else CC ?= cc .if ${MACHINE_CPUARCH} == "arm" || ${MACHINE_CPUARCH} == "mips" -CFLAGS ?= -O -pipe +CFLAGS ?= -O2 -pipe .else CFLAGS ?= -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. === Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar) _______________________________________________ [email protected] mailing list https://lists.freebsd.org/mailman/listinfo/freebsd-arm To unsubscribe, send any mail to "[email protected]"