From owner-freebsd-arm@freebsd.org Tue Dec 29 00:14: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 1280B4C6206 for ; Tue, 29 Dec 2020 00:14:59 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic306-21.consmr.mail.gq1.yahoo.com (sonic306-21.consmr.mail.gq1.yahoo.com [98.137.68.84]) (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 4D4Zg53Ww7z4vh4 for ; Tue, 29 Dec 2020 00:14: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=1609200894; bh=GLb2i3B0wbGUPhJJ7LkXiH2BM7fMZWoIOWYarPpg7lZ=; h=Subject:From:Date:To:From:Subject; b=YQy6cMXuudTgjuQjdCVsHl0mPTQ/wPKDgNeFofaYQyZGPXqlK8ImbhWzzXmRdogli+kpEEZisbNxoL4DRaMn9IKGcLwTH0O0WDLmSZIbDQMswQXybIKZaFTvf4mAuiwStAvum4/dFycM1FJ9FRQZgRuwfXzCnVo9l33X40i77rrnbohgqy+tA4hgPZItRaJkl0JdRzMmQYweZnG2rzhJYWYjU5wJm6C+Pz2/sDwDvg4yX74nqsvGJERKLngCyv3VAib5I5+mCG93+YSg2AvAPgCo5ooggGYGS51ex91H44Uu4qvjAu6jE2pZyam5A9C3F7TsTBvrigITTWwSfxHRmg== X-YMail-OSG: NJuhDyIVM1mpF8NX4MATsT16hIAXrrGvQ0dxTgOmEtUsLzxu8SFL1GN6m6SARMd K8mx84gBKtbNzn0UGEZ_0qVl9_2uxgPyuhh7mUal0rTCitz5GwaBebOXIs3HzpqeAF9ZwpKlhkE6 NItzZg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ThfqisQ1qo7h06xY0D2IkBhzui7CP09ZfJzsIoZZCqjyS8nyTHN1 UKtilZng17WUuGYXsB39CCq.Uf_qoz2tpjSi0Wx8fMRI9BFjrpBDv_v0t3KLkgPpFtn3fPHAMnhV vuJv2oHtkTcN3isiSTEzw4RWBrqJs.rim2P8XQaD_aDfIIT3t0CZJKUfg6h_8Ls06D0XgYRL.X4m 326fh3LqbtEOh1bdG4ZEvaEaLsU7sW9xnEfFHDywQXwqV4AszKaGtIleiXHdWXIuF0dpzOQqAkW7 k3qnwgBJ5.xtb0IrKI1ZJDOnc3JC9aw-- Received: from sonic.gate.mail.ne1.yahoo.com by sonic306.consmr.mail.gq1.yahoo.com with HTTP; Tue, 29 Dec 2020 00:14:54 +0000 Received: by smtp405.mail.gq1.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID bc845a779b50d5422b10a6e83af0dab5; Tue, 29 Dec 2020 00:14:52 +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: Date: Mon, 28 Dec 2020 16:14:51 -0800 Cc: freebsd-arm 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> To: bob prohaska X-Mailer: Apple Mail (2.3654.40.0.2.32) X-Rspamd-Queue-Id: 4D4Zg53Ww7z4vh4 X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.50 / 15.00]; FREEMAIL_FROM(0.00)[yahoo.com]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; TO_DN_ALL(0.00)[]; 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.68.84: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.68.84:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[98.137.68.84:from]; RWL_MAILSPIKE_POSSIBLE(0.00)[98.137.68.84: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 00:14:59 -0000 [I get the problem as well! I report a backtrace of the failure and some more.] On 2020-Dec-28, at 14:04, Mark Millard wrote: > On 2020-Dec-28, at 13:19, Mark Millard wrote: >=20 >> On 2020-Dec-28, at 12:55, Mark Millard wrote: >>>=20 >>>=20 >>> On 2020-Dec-28, at 12:07, Mark Millard wrote: >>>=20 >>>=20 >>>> On 2020-Dec-28, at 10:56, bob prohaska = wrote: >>>>=20 >>>>> On Sun, Dec 27, 2020 at 10:10:18PM -0800, Mark Millard wrote: >>>>>>=20 >>>>>>=20 >>>>>> On 2020-Dec-27, at 20:48, bob prohaska = wrote: >>>>>>=20 >>>>>>> . . . >>>>>>=20 >>>>> I didn't know about LDFLAGS, but a re-try with=20 >>>>> -j1 and LDFLAGS.lld+=3D -Wl,--threads=3D1 >>>>> (apparently the syntax changed) in /etc/make.conf=20 >>>>> promptly reproduced the error.=20 >>>>=20 >>>> Hmm. It been a while since I did a native build instead of a >>>> cross build. The cross build context has RAM and does not >>>> use the assignment so I'd not noticed. >>>>=20 >>>> Thanks for the report! >>>=20 >>> lld for LLVM 10 always had --no-threads as I now understand >>> and stable/12 still has/uses/needs LLVM 10.0.1 (with >>> updates). >>>=20 >>> That means that lld from LLVM 11 was in use (FreeBSD >>> 13's system ld). The build was probably trying to build >>> some LLVM 10.0.1 final+ materials for bootstrap style >>> build use in later build stages (older FreeBSD targeting). >>> It likely had not gotten to the stage of building freebsd >>> stable/12 material itself. >>>=20 >>> Attempting to build devel/llvm10 might well have the same >>> issue without having to involve an extra FreeBSD source >>> tree or build. >>=20 >> There is another gotcha-issue with the change from --no-threads >> to --threads=3D1 based on neither working for both 10.0.x and >> 11.0.y: which ever one is listed in /etc/make.conf (say) will be >> wrong for other one of: >>=20 >> A) building the bootstrap toolchain >> B) using the bootstrap toolchain >>=20 >> The LDFLAGS.lld definition would need to be conditional on the >> distinction in order to be correct inside each type of context. >=20 > I've started an experiment going another direction: an armv7 > context with lots of RAM (and faster processing) with a > 13 attempting to build a stable/12 . It is via a chroot into > an armv7 13 world on a 8 GiByte, 4-core Cortex-A57 based > OverDrive 1000 running aarch64 13. Each process should still > be limited to what 32-bit systems allow but overall the > system is not that limited. I used -j4 . >=20 > If such still got the error, then there would likely be > implications about the error and it would be unlikely > that it would work on the RPi2 v1.1 . (But I expect that > it will not get the error.) >=20 > Root owns file system involved and is doing the build. >=20 > It did report: >=20 > make[1]: "/usr/fbsd/stable-12-src/Makefile.inc1" line 344: = SYSTEM_COMPILER: libclang will be built for bootstrapping a = cross-compiler. > make[1]: "/usr/fbsd/stable-12-src/Makefile.inc1" line 349: = SYSTEM_LINKER: libclang will be built for bootstrapping a cross-linker. >=20 > I already had a stable-12-src branch from git experiments > but the matching worktree was missing despite being still > registered. So the worktree recreation was: >=20 > # git worktree add -f ../stable-12-src stable-12-src > Preparing worktree (checking out 'stable-12-src') > Updating files: 100% (81363/81363), done. > HEAD is now at f4d0bc6aa6b9 MFC r354991-r354992 (by lwhsu) For armv7 13's context being based on: WITH_ASSERT_DEBUG=3D WITH_LLVM_ASSERTIONS=3D WITHOUT_MALLOC_PRODUCTION=3D WITH_DEBUG_FILES=3D -mcpu=3Dcortex-a7 -g in use despite -O2 or such optimizations. (The WITHOUT_MALLOC_PRODUCTION is because of a typo in the attempt to have set WITH_MALLOC_PRODUCTION.) I was not using --threads=3D1 since it would fail for later build stages. The being-built context was based on: WITH_ASSERT_DEBUG=3D WITHOUT_LLVM_ASSERTIONS=3D WITH_MALLOC_PRODUCTION=3D WITH_DEBUG_FILES=3D -mcpu=3Dcortex-a7 -g in use despite -O2 or such optimizations. I got what follows. (But note that the ARM64TODO: fill_fpregs32c++ is likely from the handling of the process crash already in process and is not contributing to the problem starting.) . . . --- all_subdir_usr.bin/clang/clang --- [Creating objdir = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang...] Building = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/cc1_main.o Building = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/cc1as_main.o Building = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/cc1gen_reproducer_main.o Building = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/driver.o Building = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/clang.full --- clang.full --- LLVM ERROR: out of memory PLEASE submit a bug report to https://bugs.freebsd.org/submit/ and = include the crash backtrace. Stack dump: 0. Program arguments: /usr/bin/ld --eh-frame-hdr -Bstatic -o = clang.full /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 #0 0x00de160c llvm::sys::PrintStackTrace(llvm::raw_ostream&) = /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:572:7 #1 0x00ddf604 llvm::sys::RunSignalHandlers() = /usr/src/contrib/llvm-project/llvm/lib/Support/Signals.cpp:0:5 #2 0x00de1f3c SignalHandler(int) = /usr/src/contrib/llvm-project/llvm/lib/Support/Unix/Signals.inc:406:1 #3 0x42021db4 handle_signal /usr/src/lib/libthr/thread/thr_sig.c:0:3 ARM64TODO: fill_fpregs32c++: error: unable to execute command: Abort = trap (core dumped) c++: error: linker command failed due to signal (use -v to see = invocation) *** [clang.full] Error code 254 make[4]: stopped in /usr/fbsd/stable-12-src/usr.bin/clang/clang .ERROR_TARGET=3D'clang.full' = .ERROR_META_FILE=3D'/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/a= rm.armv7/tmp/obj-tools/usr.bin/clang/clang/clang.full.meta' .MAKE.LEVEL=3D'4' MAKEFILE=3D'' .MAKE.MODE=3D'meta missing-filemon=3Dyes missing-meta=3Dyes silent=3Dyes = verbose' _ERROR_CMD=3D'c++ -O -pipe -fno-common -mlong-calls = -I/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/clang/libclang = -I/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/clang/libllvm = -I/usr/fbsd/stable-12-src/contrib/llvm-project/clang/include = -I/usr/fbsd/stable-12-src/lib/clang/include = -I/usr/fbsd/stable-12-src/contrib/llvm-project/llvm/include = -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS = -DHAVE_VCS_VERSION_INC -DNDEBUG = -DLLVM_DEFAULT_TARGET_TRIPLE=3D\"armv7-unknown-freebsd12.2-gnueabihf\" = -DLLVM_HOST_TRIPLE=3D\"armv7-unknown-freebsd12.2\" = -DDEFAULT_SYSROOT=3D\"/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src= /arm.armv7/tmp\" -DLLVM_TARGET_ENABLE_ARM = -DLLVM_NATIVE_ASMPARSER=3DLLVMInitializeARMAsmParser = -DLLVM_NATIVE_ASMPRINTER=3DLLVMInitializeARMAsmPrinter = -DLLVM_NATIVE_DISASSEMBLER=3DLLVMInitializeARMDisassembler = -DLLVM_NATIVE_TARGET=3DLLVMInitializeARMTarget = -DLLVM_NATIVE_TARGETINFO=3DLLVMInitializeARMTargetInfo = -DLLVM_NATIVE_TARGETMC=3DLLVMInitializeARMTargetMC -ffunction-sections = -fdata-sections -gline-tables-only -Wno-format-zero-length = -mcpu=3Dcortex-a7 -Qunused-arguments = -I/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/legac= y/usr/include -fno-exceptions -fno-rtti -std=3Dc++14 -mcpu=3Dcortex-a7 = -stdlib=3Dlibc++ -Wno-c++11-extensions -Wl,--gc-sections -static = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/legac= y/usr/lib -o clang.full 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 = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libz -lz = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libexecinfo -lexecinfo = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libelf -lelf = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/ncurses/ncursesw -lncursesw = -L/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-t= ools/lib/libthr -lpthread -legacy;' .CURDIR=3D'/usr/fbsd/stable-12-src/usr.bin/clang/clang' .MAKE=3D'make' = .OBJDIR=3D'/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/= tmp/obj-tools/usr.bin/clang/clang' .TARGETS=3D'all' DESTDIR=3D'' LD_LIBRARY_PATH=3D'' MACHINE=3D'arm' MACHINE_ARCH=3D'armv7' MAKEOBJDIRPREFIX=3D'' MAKESYSPATH=3D'/usr/fbsd/stable-12-src/share/mk' MAKE_VERSION=3D'20201117' = PATH=3D'/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp= /legacy/usr/sbin:/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.= armv7/tmp/legacy/usr/bin:/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-= src/arm.armv7/tmp/legacy/bin:/sbin:/bin:/usr/sbin:/usr/bin' SRCTOP=3D'/usr/fbsd/stable-12-src' = OBJTOP=3D'/usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/t= mp/obj-tools' .MAKE.MAKEFILES=3D'/usr/fbsd/stable-12-src/share/mk/sys.mk = /usr/fbsd/stable-12-src/share/mk/local.sys.env.mk = /usr/fbsd/stable-12-src/share/mk/src.sys.env.mk = /root/src.configs/src.conf.armv7-clang-bootstrap.armv7-host = /usr/fbsd/stable-12-src/share/mk/bsd.mkopt.mk = /usr/fbsd/stable-12-src/share/mk/src.sys.obj.mk = /usr/fbsd/stable-12-src/share/mk/auto.obj.mk = /usr/fbsd/stable-12-src/share/mk/bsd.suffixes.mk = /root/src.configs/make.conf = /usr/fbsd/stable-12-src/share/mk/local.sys.mk = /usr/fbsd/stable-12-src/share/mk/src.sys.mk /dev/null = /usr/fbsd/stable-12-src/usr.bin/clang/clang/Makefile = /usr/fbsd/stable-12-src/share/mk/src.opts.mk = /usr/fbsd/stable-12-src/share/mk/bsd.own.mk = /usr/fbsd/stable-12-src/share/mk/bsd.opts.mk = /usr/fbsd/stable-12-src/share/mk/bsd.cpu.mk = /usr/fbsd/stable-12-src/share/mk/bsd.compiler.mk = /usr/fbsd/stable-12-src/share/mk/bsd.linker.mk = /usr/fbsd/stable-12-src/usr.bin/clang/clang.prog.mk = /usr/fbsd/stable-12-src/lib/clang/clang.pre.mk = /usr/fbsd/stable-12-src/lib/clang/llvm.pre.mk = /usr/fbsd/stable-12-src/lib/clang/clang.build.mk = /usr/fbsd/stable-12-src/lib/clang/llvm.build.mk = /usr/fbsd/stable-12-src/tools/build/mk/bsd.prog.mk = /usr/fbsd/stable-12-src/share/mk/bsd.prog.mk = /usr/fbsd/stable-12-src/share/mk/bsd.init.mk = /usr/fbsd/stable-12-src/share/mk/local.init.mk = /usr/fbsd/stable-12-src/share/mk/src.init.mk = /usr/fbsd/stable-12-src/usr.bin/clang/clang/../Makefile.inc = /usr/fbsd/stable-12-src/usr.bin/clang/clang/../../Makefile.inc = /usr/fbsd/stable-12-src/share/mk/bsd.libnames.mk = /usr/fbsd/stable-12-src/share/mk/src.libnames.mk = /usr/fbsd/stable-12-src/share/mk/bsd.nls.mk = /usr/fbsd/stable-12-src/share/mk/bsd.confs.mk = /usr/fbsd/stable-12-src/share/mk/bsd.files.mk = /usr/fbsd/stable-12-src/share/mk/bsd.dirs.mk = /usr/fbsd/stable-12-src/share/mk/bsd.incs.mk = /usr/fbsd/stable-12-src/share/mk/bsd.links.mk = /usr/fbsd/stable-12-src/share/mk/bsd.dep.mk = /usr/fbsd/stable-12-src/share/mk/bsd.clang-analyze.mk = /usr/fbsd/stable-12-src/share/mk/bsd.obj.mk = /usr/fbsd/stable-12-src/share/mk/bsd.subdir.mk = /usr/fbsd/stable-12-src/share/mk/bsd.sys.mk = /usr/fbsd/stable-12-src/tools/build/mk/Makefile.boot' .PATH=3D'. /usr/fbsd/stable-12-src/usr.bin/clang/clang = /usr/fbsd/stable-12-src/contrib/llvm-project/clang/tools/driver' 1 error # gdb /usr/bin/ld.lld = /usr/obj/rpi2_clang/arm.armv7/usr/fbsd/stable-12-src/arm.armv7/tmp/obj-too= ls/usr.bin/clang/clang/ld.lld.core GNU gdb (GDB) 10.1 [GDB v10.1 for FreeBSD] Copyright (C) 2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later = . . . Reading symbols from /usr/bin/ld.lld... Reading symbols from /usr/lib/debug//usr/bin/ld.lld.debug... [New LWP 100183] Core was generated by `/usr/bin/ld --eh-frame-hdr -Bstatic -o clang.full = /usr/lib/crt1.o /usr/lib/crti.'. Program terminated with signal SIGABRT, Aborted. #0 thr_kill () at thr_kill.S:4 4 thr_kill.S: No such file or directory. (gdb) info threads Id Target Id Frame=20 * 1 LWP 100183 thr_kill () at thr_kill.S:4(gdb) info threads Id Target Id Frame=20 * 1 LWP 100183 thr_kill () at thr_kill.S:4 (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 0x423322c8 in abort () at /usr/src/lib/libc/stdlib/abort.c:79 #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 0x004d995c in Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/AllocatorBase.h:85= #7 StartNewSlab () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Allocator.h:336 #8 Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Allocator.h:188 #9 0x00543388 in Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Allocator.h:202 #10 Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/AllocatorBase.h:46= #11 Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/AllocatorBase.h:69= #12 Allocate () at = /usr/src/contrib/llvm-project/llvm/include/llvm/Support/Allocator.h:427 #13 make *, = lld::elf::StringRefZ &, llvm::ELF::(anonymous enum at = /usr/src/contrib/llvm-project/llvm/include/llvm/BinaryFormat/ELF.h:1044:1)= , const unsigned char &, unsigned char &, const = llvm::support::detail::packed_endian_specific_integral &, const = llvm::support::detail::packed_endian_specific_integral &, lld::elf::InputSectionBase *&> () at = /usr/src/contrib/llvm-project/lld/include/lld/Common/Memory.h:62 #14 initializeSymbols () at = /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:1107 #15 0x0053a008 in parse () at = /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:401 #16 doParseFile > () = at /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:208 #17 parseFile () at = /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:215 #18 0x0053b684 in fetch () at = /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:1212 #19 0x005fdce8 in addSymbol () at = /usr/src/contrib/llvm-project/lld/ELF/SymbolTable.cpp:98 #20 0x0053b4b4 in parse () at = /usr/src/contrib/llvm-project/lld/ELF/InputFiles.cpp:1184 #21 0x005143bc in link > () at /usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:1916 #22 0x0050c864 in main () at = /usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:539 #23 0x0050b078 in link () at = /usr/src/contrib/llvm-project/lld/ELF/Driver.cpp:114 #24 0x006be290 in main () at = /usr/src/contrib/llvm-project/lld/tools/lld/lld.cpp:146 The size of the slab being allocated and the allocation initiation are from #7 above: /// Allocate a new slab and move the bump pointers over into the new /// slab, modifying CurPtr and End. void StartNewSlab() { size_t AllocatedSlabSize =3D computeSlabSize(Slabs.size()); void *NewSlab =3D Allocator.Allocate(AllocatedSlabSize, = alignof(std::max_align_t)); . . . This code is associated with the class template: /// Allocate memory in an ever growing pool, as if by bump-pointer. /// =20 /// This isn't strictly a bump-pointer allocator as it uses backing = slabs of /// memory rather than relying on a boundless contiguous heap. However, = it has /// bump-pointer semantics in that it is a monotonically growing pool of = memory /// where every allocation is found by merely allocating the next N = bytes in /// the slab, or the next N bytes in the next slab. /// /// Note that this also has a threshold for forcing allocations above a = certain /// size into their own slab. /// /// The BumpPtrAllocatorImpl template defaults to using a = MallocAllocator /// object, which wraps malloc, to allocate memory, but it can be = changed to /// use a custom allocator. /// /// The GrowthDelay specifies after how many allocated slabs the = allocator /// increases the size of the slabs. template class BumpPtrAllocatorImpl : public AllocatorBase> { . . . The actual malloc call and the later out_of_memory_new_handler call was via #5: // Implement all new and delete operators as weak definitions // in this shared library, so that they can be overridden by programs // that define non-weak copies of the functions. _LIBCPP_WEAK void * operator new(std::size_t size) _THROW_BAD_ALLOC { if (size =3D=3D 0) size =3D 1; void* p; while ((p =3D ::malloc(size)) =3D=3D 0) { // If malloc fails and there is a new_handler, // call it to try free up memory. std::new_handler nh =3D std::get_new_handler(); if (nh) nh(); . . . malloc really did return NULL. It looks like the allocations simply got to be to big in total in process virtual memory space, not necessarily in (contiguous) RAM space. =3D=3D=3D Mark Millard marklmi at yahoo.com ( dsl-only.net went away in early 2018-Mar)