From nobody Fri Apr 15 17:49:53 2022 X-Original-To: freebsd-hackers@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 CA4705D1BAD for ; Fri, 15 Apr 2022 17:50:01 +0000 (UTC) (envelope-from wayne@post.wayne47.com) Received: from post.wayne47.com (post.wayne47.com [198.11.56.11]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "post.wayne47.com", Issuer "post.wayne47.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Kg3kc5H8Wz3rJg for ; Fri, 15 Apr 2022 17:50:00 +0000 (UTC) (envelope-from wayne@post.wayne47.com) Received: from post.wayne47.com (post.wayne47.com [198.11.56.11]) by post.wayne47.com (8.15.2/8.15.2) with ESMTPS id 23FHnroN087943 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 15 Apr 2022 13:49:54 -0400 (EDT) (envelope-from wayne@post.wayne47.com) Received: (from wayne@localhost) by post.wayne47.com (8.15.2/8.15.2/Submit) id 23FHnrUi087942 for freebsd-hackers@freebsd.org; Fri, 15 Apr 2022 13:49:53 -0400 (EDT) (envelope-from wayne) Date: Fri, 15 Apr 2022 13:49:53 -0400 From: Michael Wayne To: FreeBSD Hackers Subject: Can not build kernel on 1GB VM Message-ID: <20220415174953.GE13678@post.wayne47.com> Mail-Followup-To: FreeBSD Hackers List-Id: Technical discussions relating to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-hackers List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-hackers@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 4Kg3kc5H8Wz3rJg X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of wayne@post.wayne47.com designates 198.11.56.11 as permitted sender) smtp.mailfrom=wayne@post.wayne47.com X-Spamd-Result: default: False [-0.89 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.99)[-0.993]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:198.11.56.11]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; DMARC_NA(0.00)[wayne47.com]; RCPT_COUNT_ONE(0.00)[1]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-0.999]; NEURAL_SPAM_LONG(1.00)[0.998]; MLMMJ_DEST(0.00)[freebsd-hackers]; RCVD_COUNT_ONE(0.00)[1]; FORGED_SENDER(0.30)[freebsd07@wayne47.com,wayne@post.wayne47.com]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:2015, ipnet:198.11.56.0/24, country:US]; FROM_NEQ_ENVFROM(0.00)[freebsd07@wayne47.com,wayne@post.wayne47.com]; RCVD_TLS_ALL(0.00)[]; ONCE_RECEIVED(0.10)[] X-ThisMailContainsUnwantedMimeParts: N I have a VM with 1GB RAM running FreeBSD 12.1-RELEASE-p3 I'm trying to upgrade the machine to 12.3 and having swap failures. This machine runs bird to advertise BGP, ssh and not much else so the small amount of RAM is (usually) fine. For a long time, there was a 1 GB swap file which handled the occasional time when excess memory got used. Machine needs a custom kernel for BGP, the conf file consists of: include GENERIC ident ROUTING options TCP_SIGNATURE Today, while building the 12.3 kernel with: cd /usr/src sudo make toolchain sudo make buildkernel KERNCONF=ROUTING the machine ran out of swap. with a bunch of messages like: Apr 15 12:11:26 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096 Apr 15 12:11:35 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384 Apr 15 12:11:37 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288 Apr 15 12:11:46 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 240593, size: 4096 Apr 15 12:11:55 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 236224, size: 16384 Apr 15 12:11:57 g1 kernel: swap_pager: indefinite wait buffer: bufobj: 0, blkno: 245, size: 12288 Thinking it was a sawp space issue, I increased the swap to 4 GB and tried again with the same results. Boot gave the kern.maxswzone message, I ignored it as I had planned to change as soon as I completed the build. So I pulled up top in a console window and watched swap during the build. About 400 MB of RAM was free and about 3 MB of swap was used when the machine started linking the kernel: ctfmerge -L VERSION -g -o kernel.full ... While this command was running, I saw swap usage go to ~5MB (so just over 1%), then started seeing processes being killed due to out of swap space. So, how to proceed?