From nobody Mon May 09 17:09:25 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 C58531AD1414 for ; Mon, 9 May 2022 17:09:27 +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 4Kxnhl0n46z4nwS for ; Mon, 9 May 2022 17:09:27 +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 249H9QCK042659 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Mon, 9 May 2022 13:09:26 -0400 (EDT) (envelope-from wayne@post.wayne47.com) Received: (from wayne@localhost) by post.wayne47.com (8.15.2/8.15.2/Submit) id 249H9P4t042658 for freebsd-hackers@freebsd.org; Mon, 9 May 2022 13:09:25 -0400 (EDT) (envelope-from wayne) Date: Mon, 9 May 2022 13:09:25 -0400 From: Michael Wayne To: freebsd-hackers@freebsd.org Subject: Re: Can not build kernel on 1GB VM Message-ID: <20220509170925.GQ72471@post.wayne47.com> Mail-Followup-To: freebsd-hackers@freebsd.org References: <20220415174953.GE13678@post.wayne47.com> <5db061cf-1e23-7cfb-fea-4573f379ae5d@puchar.net> 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 In-Reply-To: <5db061cf-1e23-7cfb-fea-4573f379ae5d@puchar.net> User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 4Kxnhl0n46z4nwS 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 [-2.74 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.93)[-0.927]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:198.11.56.11:c]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-hackers@freebsd.org]; TO_DN_NONE(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-0.92)[-0.918]; DMARC_NA(0.00)[wayne47.com]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-hackers]; 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 On Tue, Apr 19, 2022 at 08:52:00AM +0200, Wojciech Puchar wrote: > try > > sysctl -w vm.overcommit=1 No improvement. > On Fri, 15 Apr 2022, Michael Wayne wrote: > > > 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?