From owner-freebsd-current@freebsd.org Tue Mar 3 09:44:38 2020 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 939DE269CD2 for ; Tue, 3 Mar 2020 09:44:38 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 48WsYL01Whz4GmQ for ; Tue, 3 Mar 2020 09:44:38 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: by mailman.nyi.freebsd.org (Postfix) id F27DE269CD0; Tue, 3 Mar 2020 09:44:37 +0000 (UTC) Delivered-To: current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F2333269CCF for ; Tue, 3 Mar 2020 09:44:37 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (enterprise.ximalas.info [IPv6:2001:700:1100:1::8]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "ximalas.info", Issuer "Hostmaster ximalas.info" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48WsYJ52GCz4Gl6 for ; Tue, 3 Mar 2020 09:44:36 +0000 (UTC) (envelope-from trond.endrestol@ximalas.info) Received: from enterprise.ximalas.info (Ximalas@localhost [127.0.0.1]) by enterprise.ximalas.info (8.15.2/8.15.2) with ESMTPS id 0239iQcZ022223 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 3 Mar 2020 10:44:27 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ximalas.info; s=default; t=1583228667; bh=GHlJPrclJ66X9lFASY9MvFuMRSTAP9Az/zTZjhnSEcg=; h=Date:From:To:cc:Subject:In-Reply-To:References; b=WlQrWLwFjYYz4uCZ5ZmeqYOn5pDHazPblDRdyPB1PefQn10ssl7z2wllEebI4Ie0l Zqo+HF6rxochF2e5xJBa11k1NcLDmV4/bjOvcmvCnG5lk+4TRB1FGgGUDD2siw/xtw jRINik2ItBmMCAE5IZLGfmbJ6jwRrtma1ieSA2N4KJAA+iMCxV87vH+AitWRpUGzct iRlB9MLhIbxmVGNMDHYK89s4egDMI05FA6NejjVYUlq5+yhvoUsQ0BraRs2pWgxuK8 CHhcW9JXz4m1yOBiOnYehcLhTurwQWM08uFR2pqCs7PlSeo7mm6JxVWRthcezfrxLW y7gFGtBNjVWvA== Received: from localhost (trond@localhost) by enterprise.ximalas.info (8.15.2/8.15.2/Submit) with ESMTP id 0239iQlA022220; Tue, 3 Mar 2020 10:44:26 +0100 (CET) (envelope-from trond.endrestol@ximalas.info) X-Authentication-Warning: enterprise.ximalas.info: trond owned process doing -bs Date: Tue, 3 Mar 2020 10:44:26 +0100 (CET) From: =?UTF-8?Q?Trond_Endrest=C3=B8l?= Sender: Trond.Endrestol@ximalas.info To: Yuri Pankov cc: current@freebsd.org Subject: Re: can't build rust -- out of swap space In-Reply-To: Message-ID: References: User-Agent: Alpine 2.22 (BSF 395 2020-01-19) OpenPGP: url=http://ximalas.info/about/tronds-openpgp-public-key MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-1.2 required=5.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on enterprise.ximalas.info X-Rspamd-Queue-Id: 48WsYJ52GCz4Gl6 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=ximalas.info header.s=default header.b=WlQrWLwF; dmarc=pass (policy=none) header.from=ximalas.info; spf=pass (mx1.freebsd.org: domain of trond.endrestol@ximalas.info designates 2001:700:1100:1::8 as permitted sender) smtp.mailfrom=trond.endrestol@ximalas.info X-Spamd-Result: default: False [-5.07 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; R_DKIM_ALLOW(-0.20)[ximalas.info:s=default]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+a:c]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[ximalas.info:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[ximalas.info,none]; FREEMAIL_TO(0.00)[fastmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:224, ipnet:2001:700::/32, country:NO]; IP_SCORE(-2.07)[ip: (-8.18), ipnet: 2001:700::/32(-1.39), asn: 224(-0.76), country: NO(-0.01)] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Mar 2020 09:44:38 -0000 On Tue, 3 Mar 2020 12:40+0300, Yuri Pankov wrote: > On 03.03.2020 11:49, Yuri Pankov wrote: > > With recent pkg fallout, I'm trying to build rust myself first time ever (as > > far as I can remember), and it's failing running out of swap on the > > following step: > > > > Building stage0 std artifacts (x86_64-unknown-freebsd -> > > x86_64-unknown-freebsd) > > running: > > "/usr/ports/lang/rust/work/rustc-1.41.1-src/build/x86_64-unknown-freebsd/stage0/bin/cargo" > > "build" "-Zconfig-profile" "--target" "x86_64-unknown-freebsd" > > "-Zbinary-dep-depinfo" "-j" "1" "-v" "--release" "--frozen" "--features" > > "panic-unwind backtrace compiler-builtins-c" "--manifest-path" > > "/usr/ports/lang/rust/work/rustc-1.41.1-src/src/libtest/Cargo.toml" > > "--message-format" "json-render-diagnostics" > > ^C^C^C > > Build completed unsuccessfully in 0:00:55 > > > > Here I pressed ^C as the build actually continues despite several rustdoc, > > python, and other processes being killed. > > > > swap_pager: out of swap space > > swp_pager_getswapspace(20): failed > > swap_pager: out of swap space > > swp_pager_getswapspace(11): failed > > > > The system has 32G of RAM and 2GB swap partition (as advised by zfs-auto > > installation option), top shows about 28G of memory free at that moment, so > > I'm wondering why the swap is being used, and if 2G should be enough to > > build rust. > > Looks like I got this wrong, adding a file-backed swap space I was actually > able to run top, and seeing only 100M of memory being "Free", ~20G memory > reported as "Active", and swap usage constantly growing being consumed by > rustdoc process; something is really wrong here. Run top(1), hit the o key, type in size, and hit enter to have top sort the process list according to their virtual size. The culprit will eventually work its way to the top. -- Trond.