From owner-freebsd-current@freebsd.org Tue Mar 3 09:56:42 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 1D6A926A335 for ; Tue, 3 Mar 2020 09:56:42 +0000 (UTC) (envelope-from ypankov@fastmail.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 48WsqF4ZJzz3JDC for ; Tue, 3 Mar 2020 09:56:41 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 9ABFE26A334; Tue, 3 Mar 2020 09:56:41 +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 9A6BF26A333 for ; Tue, 3 Mar 2020 09:56:41 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48WsqD2SmQz3J8l for ; Tue, 3 Mar 2020 09:56:40 +0000 (UTC) (envelope-from ypankov@fastmail.com) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id C3C8635B; Tue, 3 Mar 2020 04:56:38 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 03 Mar 2020 04:56:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm2; bh=X 4QpIRRSMr5fh3C3tSPj9cAzQRsIImFFDAWcPswk6Lo=; b=opMQTAhuTsKuAzoq+ hzB+08Tn5QJP8M1eZ3OMo7h6uhlEEeVZp1E7/FJ0Fralw9S/Lbi0M4fGHY2HndPg KrSwxBzWspHyZz2zM7Dv1JBR3J/nOCMhhVlZFF1o6YM2j6GglALHY05yKCPxorSu ctn6lDJvOFhFaE8vWHa8H+Vx4fl6hYCoucd6YiNFNpYkGyQq8dCzn07u1xqg0uhW g1mgqDDGMPNG0vouokwwqvGw5eTwI14WEOq/RQwTHFP4leLMnXgHJgi+fE8EtfwD vZz1sfhIBpJYzofTXEdkdgnzcwTsGixICapoStPrXDSYqLns05qoism9kTZCsCQM SdbTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=X4QpIRRSMr5fh3C3tSPj9cAzQRsIImFFDAWcPswk6 Lo=; b=m8COC/0/oGJ+tWrfDuPgidYGpw2QQcn6zWYxPJxa7Oix4zMaYkhoRPofu UNAxFHuALupl5RH5yKPVSqIqnaKuhQmsyLUnAgpu75yEwa7fY5uRFzS+5nFE2QC+ BpFOJFpl/X2MnuoNjYfpI/OrfNQNCRt2UBOwLoGH9hlKqIBqTn5Q8s2eIOl1VcEr qqyoAJjqLnEbB6WJWejO8FnO0YEwNj5Pc0QayhZ7uqJRJ/yc/w4XQJxJJ3odkG1T 78dY7R4uJj2nUfZiDP4Aong08ANsmdK1mnmTL9cbxoUrYeAXkAkSQUanaD9fC6lL 9OUNgRdRQHJwGwGhv5/jfUJldfM8A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddtiedguddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvfhfhffkffgfgggjtgfgsehtke ertddtfeejnecuhfhrohhmpegjuhhrihcurfgrnhhkohhvuceohihprghnkhhovhesfhgr shhtmhgrihhlrdgtohhmqeenucfkphepkeehrddujeefrddvuddrudenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpeihphgrnhhkohhvsehfrghs thhmrghilhdrtghomh X-ME-Proxy: Received: from earth.local (unknown [85.173.21.1]) by mail.messagingengine.com (Postfix) with ESMTPA id E76CF3060FD3; Tue, 3 Mar 2020 04:56:36 -0500 (EST) Subject: Re: can't build rust -- out of swap space To: =?UTF-8?Q?Trond_Endrest=c3=b8l?= Cc: current@freebsd.org References: From: Yuri Pankov Message-ID: Date: Tue, 3 Mar 2020 12:56:35 +0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 48WsqD2SmQz3J8l X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=fastmail.com header.s=fm2 header.b=opMQTAhu; dkim=pass header.d=messagingengine.com header.s=fm2 header.b=m8COC/0/; dmarc=pass (policy=none) header.from=fastmail.com; spf=pass (mx1.freebsd.org: domain of ypankov@fastmail.com designates 64.147.123.27 as permitted sender) smtp.mailfrom=ypankov@fastmail.com X-Spamd-Result: default: False [-3.10 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[fastmail.com:s=fm2,messagingengine.com:s=fm2]; NEURAL_HAM_MEDIUM(-1.00)[-0.999,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:64.147.123.27]; FREEMAIL_FROM(0.00)[fastmail.com]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; IP_SCORE_FREEMAIL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[fastmail.com:+,messagingengine.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[fastmail.com,none]; RCVD_TLS_LAST(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[27.123.147.64.list.dnswl.org : 127.0.5.1]; FROM_EQ_ENVFROM(0.00)[]; FREEMAIL_ENVFROM(0.00)[fastmail.com]; ASN(0.00)[asn:11403, ipnet:64.147.123.0/24, country:US]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.00)[ip: (-9.71), ipnet: 64.147.123.0/24(-4.92), asn: 11403(-2.69), country: US(-0.05)]; RECEIVED_SPAMHAUS_PBL(0.00)[1.21.173.85.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11] 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:56:42 -0000 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 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. Yes, it's rustdoc, and I'm seeing the same behavior as you described in your other reply. What's more interesting, having a little swap, processes get killed almost immediately, and the build happily continues resulting successful rust package.