From nobody Sun Oct 30 17:29:14 2022 X-Original-To: freebsd-current@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 4N0jvR0c4Gz4g7mJ for ; Sun, 30 Oct 2022 17:29:23 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (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 4N0jvP5QG5z3H2y for ; Sun, 30 Oct 2022 17:29:21 +0000 (UTC) (envelope-from marklmi@yahoo.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667150959; bh=k4/KP5nnN1yxthG/j3zo2ei/9+lpR6C/bkJCEqSoDBM=; h=From:Subject:Date:To:References:From:Subject:Reply-To; b=fMpOUioiv3BmPRgjCwQiSkuaagcclFiMkq3zRrStYG392ZYKojv/Aref1HBqF1kw/cruo45BxmSUVWPhVV+yU6zR286zY0oiDp9PGYOISqCvKJjpgA6yYzSLu5uR+vdZykPQ1pp2V5eKVXAnANWWjm5tLR6pZH4vxlL7G/J527PuGLOwuWUBtYOhAqTzeU1tYdwI9ctk9mF6h/p5BIxEUXCsskH6Ui5cRSq1wRNmBECiZOXbkRcRIkYCTCevSQq8egDoSwDhdJDLMRssql5mPGMygK6TmIdAxcFF+46v3QlzD4NBcboJ7U45waTgDhobT69zdChf4aNfet01YoC12w== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1667150959; bh=cjk7Dnoio6F4GIBXq58Rq+OiwgPWEyj0gVOj54i/R+K=; h=X-Sonic-MF:From:Subject:Date:To:From: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Ts3EPbGAEBLxzMParaBf coveZ6C8kqh7Fjlm0_bSHucpJWvMEXv_uYCtdI_5ekgWVP3Hwpxm0Nh_oPb_vYfPsg8wReZMqJnJ swYgf9eIQDY9pZm2kyd1zX6KXXPi31sGVbzH9GYWfeyOSKujuilzAldGT9VIpmIo.lxRDqfXSJVB DPztuGwSdgQWXHYiWD.o_dRdrQDM3P8agWr8W_AF2QS8xj7a_BxE79K16iRlQLe361_d5hlGWzkg RwMGhwkaAHSz6SraoEjQGr8bbwJVdUTXUF__0GgTiMtQiSkWnt19LXAy2nwibkffnJRttFMxJpDE 2Q0WjLtrZlAhFlSfyyRYA9c1aYDP2E3YLXVjps5Wz7qnDqtP7B3lTU8zD_I6_hPUkfNY8OsdzDz1 i.BF71meDgY92BacEveNFvNDUepKdAwY9A1mQYdVFCwSFfCcJcnzGb5UHYnCpyZhJ_FivCegVgB7 UBEFRYFN1WMYs3ZrnGxl.QOgPiXoza9yhUelhvonro.E40XxjLtbczO0c.SkodtayhFqt X-Sonic-MF: Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Sun, 30 Oct 2022 17:29:19 +0000 Received: by hermes--production-ne1-c47ffd5f5-8txkx (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 5672d07759705c3261dfab12ce59b9b3; Sun, 30 Oct 2022 17:29:17 +0000 (UTC) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: RE: 14.0-CURRENT failed to reclaim memory error in RPi 3B build Message-Id: <84376CC9-B991-4BF3-AF5F-0AA09CB28339@yahoo.com> Date: Sun, 30 Oct 2022 10:29:14 -0700 To: Archimedes Gaviola , freebsd-current X-Mailer: Apple Mail (2.3696.120.41.1.1) References: <84376CC9-B991-4BF3-AF5F-0AA09CB28339.ref@yahoo.com> X-Rspamd-Queue-Id: 4N0jvP5QG5z3H2y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=yahoo.com header.s=s2048 header.b=fMpOUioi; dmarc=pass (policy=reject) header.from=yahoo.com; spf=pass (mx1.freebsd.org: domain of marklmi@yahoo.com designates 98.137.64.148 as permitted sender) smtp.mailfrom=marklmi@yahoo.com X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; MV_CASE(0.50)[]; DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject]; R_SPF_ALLOW(-0.20)[+ptr:yahoo.com]; R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048]; MIME_GOOD(-0.10)[text/plain]; ARC_NA(0.00)[]; DWL_DNSWL_NONE(0.00)[yahoo.com:dkim]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TAGGED_RCPT(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[yahoo.com]; RCVD_IN_DNSWL_NONE(0.00)[98.137.64.148:from]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; FREEMAIL_FROM(0.00)[yahoo.com]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US]; DKIM_TRACE(0.00)[yahoo.com:+]; FREEMAIL_TO(0.00)[gmail.com,freebsd.org]; RCPT_COUNT_TWO(0.00)[2]; MIME_TRACE(0.00)[0:+]; FROM_EQ_ENVFROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org] X-ThisMailContainsUnwantedMimeParts: N Archimedes Gaviola wrote on Date: Sun, 30 Oct 2022 13:41:52 UTC : > I am building a kernel and world in 14.0-CURRENT > = https://download.freebsd.org/ftp/snapshots/arm64/aarch64/ISO-IMAGES/14.0/F= reeBSD-14.0-CURRENT-arm64-aarch64-RPI-20221027-769b884e2e2-258837.img.xz > with Raspberry Pi 3B (ARM kernel config file and in default system > configurations) and compilation breaks due to "failed to reclaim = memory" > error as found in the dmesg. >=20 > pid 91224 (llvm-tblgen), jid 0, uid 0, was killed: failed to reclaim = memory > pid 91131 (make), jid 0, uid 0, was killed: failed to reclaim memory >=20 > Here's the set of the build commands I invoked. >=20 > root@generic# cd /usr/src ; make KERNCONF=3DARM TARGET_ARCH=3Daarch64 > buildkernel buildworld installkernel installworld distribution > DESTDIR=3D/home/freebsd/rpi3b >=20 > . . . >=20 > Any thoughts? As I don't have any idea about VM pageout. Multiple configuration things from what I use: I use a swap partition (not a swap file!) to give the system someplace to put copies of inactive memory pages (paging): # swapinfo Device 1K-blocks Used Avail Capacity /dev/gpt/Rock64swp2 3670016 0 3670016 0% where gpart show -p lists it as (a gpt context, not MBR): 534528 7340032 da0p2 freebsd-swap (3.5G) and gpart show -pl lists it as: 534528 7340032 da0p2 Rock64swp2 (3.5G) (Note: swap file usage is subject to deadlock conditions avoided by use of swap partitions.) I use a serial console & ssh session only context to avoid having sizable competition for RAM. I avoid using tmpfs because it competes for RAM use. I use the likes of ( in, say, /boot/loader/conf ): # # Delay when persistent low free RAM leads to # Out Of Memory killing of processes: vm.pageout_oom_seq=3D120 This delays potential "killed: failed to reclaim memory" kills, possibly long enough to reach a state where sufficient memory is reclaimed. I'll note that the status "killed: failed to reclaim memory" does not require that swap be used much at all. Sustained low free RAM from just one process that always stays runnable and has a sufficiently large active set of pages can be sufficient to end up with such kills. Having swap allows for inactive pages to get out of the way, which can help. I use the likes of ( in, say, /etc/ssyctl.conf ): # # Together this pair avoids swapping out the process kernel stacks. # This avoids processes for interacting with the system from being # hung-up. vm.swap_enabled=3D0 vm.swap_idle_enabled=3D0 This allows paging to the swap space but disallows moving kernel thread stacks to the swap space. Otherwise the processes used to interact with the RPi3 can become non-runnable, preventing such interactions. I have NVMe or SSD based USB media, not microsd cards nor spinning rust. (I use just bootcode.bin and timeout files on microsd media for the RPi3B. Even the rest of the RPi* firmware is on the USB media, as well as u-boot.bin .) My usage of such a configuration struture for building software (world, kernel, ports) applies to all the systems I do such with, including ones with a lot more resources, including a lot more RAM. =3D=3D=3D Mark Millard marklmi at yahoo.com