From owner-freebsd-current@freebsd.org Tue Mar 3 12:50:49 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 CCB9226E996 for ; Tue, 3 Mar 2020 12:50:49 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 48Wxh85t5Wz4TPn for ; Tue, 3 Mar 2020 12:50:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: by mailman.nyi.freebsd.org (Postfix) id 5E10326E981; Tue, 3 Mar 2020 12:50:48 +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 5D8C526E980 for ; Tue, 3 Mar 2020 12:50:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 48Wxh60ltXz4TL9; Tue, 3 Mar 2020 12:50:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from spqr.komquats.com ([70.67.125.17]) by shaw.ca with ESMTPA id 970Ijk3YekqGX970Jj7OPL; Tue, 03 Mar 2020 05:50:43 -0700 X-Authority-Analysis: v=2.3 cv=c/jVvi1l c=1 sm=1 tr=0 a=VFtTW3WuZNDh6VkGe7fA3g==:117 a=VFtTW3WuZNDh6VkGe7fA3g==:17 a=8nJEP1OIZ-IA:10 a=SS2py6AdgQ4A:10 a=ZLGELXoPAAAA:8 a=YxBL1-UpAAAA:8 a=6I5d2MoRAAAA:8 a=S05Y-LlVDkcdpvOQ3ZoA:9 a=wPNLvfGTeEIA:10 a=CFiPc5v16LZhaT-MVE1c:22 a=Ia-lj3WSrqcvXOmTRaiG:22 a=IjZwj45LgO3ly-622nXo:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTPS id 28DC48F8; Tue, 3 Mar 2020 04:50:29 -0800 (PST) Received: from slippy.cwsent.com (localhost [127.0.0.1]) by slippy.cwsent.com (8.15.2/8.15.2) with ESMTP id 023CoSlm081901; Tue, 3 Mar 2020 04:50:28 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Received: from slippy (cy@localhost) by slippy.cwsent.com (8.15.2/8.15.2/Submit) with ESMTP id 023CoSrh081874; Tue, 3 Mar 2020 04:50:28 -0800 (PST) (envelope-from Cy.Schubert@cschubert.com) Message-Id: <202003031250.023CoSrh081874@slippy.cwsent.com> X-Authentication-Warning: slippy.cwsent.com: cy owned process doing -bs X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.7.1 Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Yuri Pankov cc: =?UTF-8?Q?Trond_Endrest=c3=b8l?= , current@freebsd.org, Jan Beich Subject: Re: can't build rust -- out of swap space In-reply-to: <993c159b-b9e0-cd47-5df6-73288748ae13@fastmail.com> References: <993c159b-b9e0-cd47-5df6-73288748ae13@fastmail.com> Comments: In-reply-to Yuri Pankov message dated "Tue, 03 Mar 2020 15:31:48 +0300." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Date: Tue, 03 Mar 2020 04:50:28 -0800 X-CMAE-Envelope: MS4wfG+x4EXp3Sl7EvoNhO1ZIUOHHLipFbw0ELKGjfH/0IibnTB1A/mNIbwVq8XEkqj03KhH43s9zERRyYdeuh/yjAie1qYJ50/lXoskEnza6t4OfQyZyPT/ LL2arHeDDkjPtl5kDHais9iQya/kJX2Bx1SuYURn28g0LzXa55CrN5cWU3A7r1iAcwyOr4dq19a3K7C+jljcGSqrW2shT5PLKWrpySViG9qb1cSKYN9Q2t2v 525Q1jifg/CXcf4p4HUqhDfFUg1H614UPUnQcsLGK5b2aIiTv+fn17xVccGk7IPX X-Rspamd-Queue-Id: 48Wxh60ltXz4TL9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; dkim=none; spf=none (mx1.freebsd.org: domain of cy.schubert@cschubert.com has no SPF policy when checking 64.59.134.13) smtp.mailfrom=cy.schubert@cschubert.com X-Spamd-Result: default: False [-4.17 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RWL_MAILSPIKE_POSSIBLE(0.00)[13.134.59.64.rep.mailspike.net : 127.0.0.17]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; MIME_GOOD(-0.10)[text/plain]; HAS_XAW(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; REPLYTO_EQ_FROM(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[17.125.67.70.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; R_SPF_NA(0.00)[]; FREEMAIL_TO(0.00)[fastmail.com]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:6327, ipnet:64.59.128.0/20, country:CA]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(-2.48)[ip: (-6.55), ipnet: 64.59.128.0/20(-3.23), asn: 6327(-2.52), country: CA(-0.09)]; RCVD_IN_DNSWL_LOW(-0.10)[13.134.59.64.list.dnswl.org : 127.0.5.1] 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 12:50:49 -0000 In message <993c159b-b9e0-cd47-5df6-73288748ae13@fastmail.com>, Yuri Pankov wri tes: > On 03.03.2020 15:27, Trond Endrestøl wrote: > > On Tue, 3 Mar 2020 12:56+0300, Yuri Pankov wrote: > > > >> On 03.03.2020 12:44, Trond Endrestøl wrote: > >>> 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 eve > r > >>>>> (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-freebs > d/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-aut > o > >>>>> 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 memor > y > >>>> reported as "Active", and swap usage constantly growing being consumed b > y > >>>> 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. > >> > >> Yes, it's rustdoc, and I'm seeing the same behavior as you described in yo > ur > >> other reply. What's more interesting, having a little swap, processes get > >> killed almost immediately, and the build happily continues resulting > >> successful rust package. > > > > In my case, I see this behaviour twice during the build. I'll try and > > reduce my swap partition to 2 GiB and see if that makes a difference > > during the build. > > I wonder if you are seeing the problem for a long time, or it's > something recent for you? I just tried reinstalling the system from > 20200227 snapshot, and NOT seeing it, with or w/o the swap. Once I have > everything installed, I'll update to latest and re-check (note that I > had WITH_CTF defined in src.conf, though I doubt it's related). It's been a problem since rust-1.41 was committed. Your choices are, - revert back to rust-1.40, or - use rust-nightly for now. -- Cheers, Cy Schubert FreeBSD UNIX: Web: http://www.FreeBSD.org The need of the many outweighs the greed of the few.