Leak in file backed swap

Giulio Ferro auryn at zirakzigil.org
Fri Feb 3 08:09:31 UTC 2017


On 03/02/2017 06:30, Peter Jeremy wrote:
> On 2017-Feb-02 15:59:36 +0100, Giulio Ferro <auryn at zirakzigil.org> wrote:
>> FreeBSD 11-Stable recent build.
>>
>> I've set up a FreeBSD instance in AWS with 1GB RAM.
>>
>> and I created a 1GB file under /usr on the instance FS and proceeded to
>> mount it as swap.
>>
>> Even if the machine isn't doing anything, after one day or less the
>> machine becomes unresponsive
> I've used swap to UFS and swap to NFS on a number of hosts without
> problem.  If your /usr was on ZFS then this is a known issue (ZFS
> is CoW and there are known problems dealing with RAM shortage).  If
> not, can you please give more precise details of your configuration.
>

Nope, it's standard UFS:

/etc/fstab

# Custom /etc/fstab for FreeBSD VM images
/dev/gpt/rootfs   /       ufs     rw      1       1


I suspect it may be something related to AWS images...

Anyway I actually think that it should be quite easy to replicate: you 
just need to create

an AWS instance from the images in the community section of AWS (FreeBSD 
11-stable something),

create a 1GB file /usr/swap0 on the file system and mount it


/etc/fstab

...

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


After one day or less the instance will become unresponsive...


Giulio



More information about the freebsd-hackers mailing list