From nobody Thu Jun 11 15:51:17 2026 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 4gbnDq2P4Sz6hlNR for ; Thu, 11 Jun 2026 15:51:07 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [50.1.20.27]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "pelorus.zefox.org", Issuer "pelorus.zefox.org" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gbnDn5lKgz3rM2 for ; Thu, 11 Jun 2026 15:51:05 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of fbsd@www.zefox.net has no SPF policy when checking 50.1.20.27) smtp.mailfrom=fbsd@www.zefox.net Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.18.1/8.18.1) with ESMTPS id 65BFpHN3013765 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Thu, 11 Jun 2026 08:51:17 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.18.1/8.18.1/Submit) id 65BFpHU8013764; Thu, 11 Jun 2026 08:51:17 -0700 (PDT) (envelope-from fbsd) Date: Thu, 11 Jun 2026 08:51:17 -0700 From: bob prohaska To: Mark Millard Cc: freebsd-current@freebsd.org Subject: Re: Buildworld finishes despite swap exhaustion Message-ID: References: <040df279-5f61-4f4f-ae4a-79bd44797b53@yahoo.com> 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <040df279-5f61-4f4f-ae4a-79bd44797b53@yahoo.com> X-Spamd-Result: default: False [-1.09 / 15.00]; AUTH_NA(1.00)[]; NEURAL_HAM_LONG(-1.00)[-0.999]; NEURAL_HAM_MEDIUM(-1.00)[-0.999]; NEURAL_HAM_SHORT(-0.99)[-0.988]; WWW_DOT_DOMAIN(0.50)[]; MID_RHS_WWW(0.50)[]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:7065, ipnet:50.1.16.0/20, country:US]; RCVD_TLS_LAST(0.00)[]; MISSING_XM_UA(0.00)[]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; MLMMJ_DEST(0.00)[freebsd-current@freebsd.org]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[yahoo.com]; RCVD_COUNT_TWO(0.00)[2]; DMARC_NA(0.00)[zefox.net]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; R_SPF_NA(0.00)[no SPF record] X-Spamd-Bar: - X-Rspamd-Queue-Id: 4gbnDn5lKgz3rM2 On Tue, Jun 09, 2026 at 08:22:02AM -0700, Mark Millard wrote: > On 6/8/26 20:48, bob prohaska wrote: > > Lately a Pi2B running buildworld reported an > > exhaustion of swap, but buildworld kept running > > and seemingly finished successfully. > > > > The report came on the serial console, I didn't > > find anything in the buildworld log. > > > > This seems a very great improvement. Swap exhaustion > > differs from other sorts of failure, in that one can > > simply re-try the job with some hope of success when > > the workload is lighter. > > > > Am I interpreting this correctly? > > [Because the actual messages are not reported, I'm making some > assumptions about the exact messages that you got.] > > > Remember vm.pageout_oom_seq ? > Yes, /boot/loader.conf contains: vm.pageout_oom_seq="4096" vm.pfault_oom_attempts="3" #vm.pfault_oom_attempts="120" vm.pfault_oom_wait="20" I'll admit to not remembering how 4096 was chosen.... probably just a wild guess. > The larger that value used, the longer the system operates with the > amount of free RAM below the target threshold: in other words, it makes > more tries at getting to the threshold before giving up and starting to > kill processes to get the free RAM. > > Running out of swap of itself just means that SWAP can not be used to > gain free RAM when such is not essential. RAM+SWAP can still be > (marginally) sufficient over such a time if no memory allocations > actually fail. If sufficient RAM/SWAP ends up being freed before > vm.pageout_oom_seq related kills happen, no overall failure happens. > > > As for the messages as I understand them: > > kernel: swap_pager: out of swap space > > does not report a failure, just a limiting condition. > > By contrast: > > kernel: swp_pager_getswapspace(2): failed > > reports a failure: the swap space allocation was necessary. It normally > nleads to the likes of: > > kernel: pid ??? (???), jid ???, uid ???, was killed: failed to reclaim > memory A more recent incident reported in /var/log/messages: Jun 4 12:34:39 www kernel: swap_pager: out of swap space Jun 4 12:34:39 www kernel: swp_pager_getswapspace(12): failed but wasn't followed by a "...was killed..." message. Eventually there appeared what look like repeated disk errors, ending with: Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): Info: 0 Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): Retrying command (per sense data) Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 00 04 63 3 4 50 00 00 18 00 Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): CAM status: SCSI Status Erro r Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): SCSI status: Check Condition Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): SCSI sense: MEDIUM ERROR asc :10,0 (ID CRC or ECC error) Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): Info: 0 Jun 11 02:04:59 www kernel: (da0:umass-sim0:0:0:0): Retrying command (per sense data) which ended in a debugger prompt on the console. There was considerable network activity around the same time which resembled an ssh attack. The machine rebooted without incident, buildworld has been resumed with -j3. If it happens again I'll save a backtrace if it'll be of interest. Thanks for writing! bob prohaska