Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 03 Mar 2020 04:50:28 -0800
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Yuri Pankov <ypankov@fastmail.com>
Cc:        =?UTF-8?Q?Trond_Endrest=c3=b8l?= <trond.endrestol@ximalas.info>, current@freebsd.org, Jan Beich <jbeich@FreeBSD.org>
Subject:   Re: can't build rust -- out of swap space
Message-ID:  <202003031250.023CoSrh081874@slippy.cwsent.com>
In-Reply-To: <993c159b-b9e0-cd47-5df6-73288748ae13@fastmail.com>
References:  <b86e3f65-fcbb-687f-ce94-a3415a561cd3@fastmail.com>  <a6a9f0d2-5c06-9f77-73bb-ec51c0950b46@fastmail.com>  <alpine.BSF.2.22.395.2003031042410.6036@enterprise.ximalas.info>  <d8b08ab9-b925-aa74-ec8a-54477ab7beb9@fastmail.com>  <alpine.BSF.2.22.395.2003031323360.6036@enterprise.ximalas.info>  <993c159b-b9e0-cd47-5df6-73288748ae13@fastmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <Cy.Schubert@cschubert.com>
FreeBSD UNIX:  <cy@FreeBSD.org>   Web:  http://www.FreeBSD.org

	The need of the many outweighs the greed of the few.





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202003031250.023CoSrh081874>