From eugen@grosbein.net Thu Dec 9 07:35:55 2021 X-Original-To: freebsd-stable@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 EBE6D18CE539 for ; Thu, 9 Dec 2021 07:36:32 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [IPv6:2a01:4f8:c2c:26d8::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4J8m7N55knz4sVh for ; Thu, 9 Dec 2021 07:36:32 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221] (may be forged)) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id 1B97a4LY040118 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 9 Dec 2021 07:36:05 GMT (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: pmc@citylink.dinoex.sub.org Received: from [10.58.0.10] (dadvw [10.58.0.10]) by eg.sd.rdtc.ru (8.16.1/8.16.1) with ESMTPS id 1B97a4Qw013793 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Thu, 9 Dec 2021 14:36:04 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: Re: 12.3: "swapon -a" crashes the system To: Peter , freebsd-stable@freebsd.org References: From: Eugene Grosbein Message-ID: Date: Thu, 9 Dec 2021 14:35:55 +0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 List-Id: Production branch of FreeBSD source code List-Archive: https://lists.freebsd.org/archives/freebsd-stable List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT autolearn=disabled version=3.4.2 X-Spam-Report: * -0.0 SHORTCIRCUIT No description available. * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on hz.grosbein.net X-Rspamd-Queue-Id: 4J8m7N55knz4sVh X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N 09.12.2021 13:11, Peter wrote: > if you run out of swapspace and you think you might just create > some extra devices and add them to /etc/fstab and then run "swapon -a" > to enable them, don't do that. > > The result might look like this: > kernel: pid 12296 (daemon), jid 5, uid 5100: exited on signal 10 (core dumped) > kernel: pid 17717 (ruby27), jid 5, uid 5100: exited on signal 6 (core dumped) > kernel: pid 14938 (daemon), jid 10, uid 5100: exited on signal 10 (core dumped) > kernel: pid 19184 (ruby27), jid 10, uid 5100: exited on signal 11 (core dumped) > kernel: pid 19182 (ruby27), jid 10, uid 5100: exited on signal 10 (core dumped) > ... > with a subsequent kernel crash. > > In my case I did run out of swapspace despite proper sizing, because > of unbalanced numa-domains. (Each of them may hit free_target on their > own behalf, and then start paging.) > > So I did as described above, but I added them with the "late" option, > and then did run "swapon -a", which did not even add them - but > nevertheless produced the crash. The processes that do coredump might > be those that are fully swapped out? Did you try using ZFS-backed files or devices for swap? If so, this is somewhat expected.