Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 07 Oct 2018 22:41:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 232048] CURRENT: clang crashes during buildworld
Message-ID:  <bug-232048-227-u0I22peUY0@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-232048-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-232048-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D232048

Mark Millard <marklmi26-fbsd@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |marklmi26-fbsd@yahoo.com

--- Comment #2 from Mark Millard <marklmi26-fbsd@yahoo.com> ---
A common reason for:

c++: error: unable to execute command: Killed

is being low on free RAM for too long (too
many tries to get more free RAM).

The console would have reported a message (that in
part may be a misnomer), something like:

. . . kernel: pid 1010 (stress), uid 0, was killed: out of swap space

You can likely believe the "out of swap space" if you also
got messages like:

. . . kernel: swap_pager_getswapspace(32): failed

but otherwise you may have lots of swap space but still
get "was killed" messages. In part this is because
FreeBSD does not swap out processes that stay runnable,
so runnable processes that keep lots of RAM in the
"active" status can lead to sustained periods of low
free RAM (and, so, probably paging).

Changing vm.pageout_oom_seq from its default figure of
12 to something larger makes FreeBSD tolerate the low
free RAM longer (more tries to free RAM). Folks have
use figures like:

sysctl vm.pageout_oom_seq=3D120
sysctl vm.pageout_oom_seq=3D1024

on small single board computers with 4 cores (1 hardware
thread per core) to allow buildworld buildkernel to complete
for -j4 with 1 GiByte or 2 GiByte of RAM.

I/O/storage latency for paging and swapping can contribute
to needing a larger vm.pageout_oom_seq .

Another thing that might help such builds use less RAM at times
is to use:

LDFLAGS.lld+=3D -Wl,--no-threads

Using a smaller N for -jN is another example (for 1<N).


You were not explicit about properties such as the -jN or
the amount of RAM or other such. So these notes are not
informed by such contextual properties and may not apply.

If they do apply, there are other bugzilla reports that this
is a duplicate of. It has been an on-going issue for some
time but is not obvious from what FreeBSD reports when it
does the process kills. Mark Johnston provided the information
tying vm.pageout_oom_seq values to controlling the behavior.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-232048-227-u0I22peUY0>