OOMA kill with vm.pfault_oom_attempts="-1" on RPi3 at r357147

Trev freebsd-arm at sentry.org
Tue Jan 28 11:56:10 UTC 2020


Mark Millard via freebsd-arm wrote on 28/01/2020 16:29:
> The vm_pageout_oom(. . .) routine has:
> . . .
>          if (bigproc != NULL) {
>                  if (vm_panic_on_oom != 0)
>                          panic("out of swap space");
>                  PROC_LOCK(bigproc);
>                  killproc(bigproc, "out of swap space");
>                  sched_nice(bigproc, PRIO_MIN);
>                  _PRELE(bigproc);
>                  PROC_UNLOCK(bigproc);
>          }
> 
> That is where the can-be-a-misnomer "out of swap space"
> is from. Looks like it is correct for some conditions,
> but not the conditions we have historically got for our
> contexts. It takes looking at other messages to figure
> out if it is a misnomer: Another type of message carries
> the actual out-of-swap information and if that message
> is not present then the one based on the above is a
> misnomer.

May be related...

I have a Vultr VM running FreeBSD 12.1 Release amd64 under KVM with 
512MB RAM and 20GB of SSD and was recently getting "out of swap space" 
when compiling the binutils port with make -j1. The system had a 1.5G 
swap file setup in fstab as:

md99            none            swap    sw,file=/usr/swap0,late,noatime

 From several compile attempts, I could never see the system using more 
than 98MB of swap space despite the "out of swap space" messages.

Jan 25 10:07:40 sentinel kernel: pid 12934 (gmake), jid 0, uid 0, was 
killed: out of swap space
Jan 25 10:13:40 sentinel kernel: pid 13344 (cc), jid 0, uid 0, was 
killed: out of swap space

The solution was to replace the swap file with a swap partition. While 
monitoring the build of binutils, no more than 98MB of swap ever seem to 
be used.

I should note that the issue never manifested itself under FreeBSD 11.1 
through 11.3 in this VM.


More information about the freebsd-arm mailing list