From owner-freebsd-hackers@freebsd.org Fri Feb 3 08:09:31 2017 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 58BC5CCD98F for ; Fri, 3 Feb 2017 08:09:31 +0000 (UTC) (envelope-from auryn@zirakzigil.org) Received: from mx1.etoilesoft.fr (mx1.etoilesoft.fr [52.57.51.18]) by mx1.freebsd.org (Postfix) with ESMTP id 2256A19AB for ; Fri, 3 Feb 2017 08:09:30 +0000 (UTC) (envelope-from auryn@zirakzigil.org) Received: from mx1.etoilesoft.fr (localhost [127.0.0.1]) by mx1.etoilesoft.fr (Postfix) with ESMTP id B0DA49D19F for ; Fri, 3 Feb 2017 08:09:42 +0000 (UTC) Received: from [10.1.1.206] (localhost [127.0.0.1]) (Authenticated sender: auryn@zirakzigil.org) by mx1.etoilesoft.fr (Postfix) with ESMTPA id 8385B9D19D for ; Fri, 3 Feb 2017 08:09:42 +0000 (UTC) Subject: Re: Leak in file backed swap To: freebsd-hackers@freebsd.org References: <2ba8c327-56c9-e0ff-e449-a583b6106540@zirakzigil.org> <20170203053051.GA90481@server.rulingia.com> From: Giulio Ferro Message-ID: Date: Fri, 3 Feb 2017 09:09:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170203053051.GA90481@server.rulingia.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-Mailman-Approved-At: Fri, 03 Feb 2017 12:22:33 +0000 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Feb 2017 08:09:31 -0000 On 03/02/2017 06:30, Peter Jeremy wrote: > On 2017-Feb-02 15:59:36 +0100, Giulio Ferro 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