Re: can't build rust -- out of swap space

From: Yuri Pankov <ypankov_at_fastmail.com>
Date: Tue, 3 Mar 2020 12:56:35 +0300
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.
Received on Tue Mar 03 2020 - 08:56:42 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:23 UTC