From owner-freebsd-bugs@freebsd.org Fri Oct 4 02:15:12 2019 Return-Path: Delivered-To: freebsd-bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B8152146FD8 for ; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 46ktkS4Tpzz3K2q for ; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 983BB146FD7; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) Delivered-To: bugs@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 97FD1146FD6 for ; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46ktkS3SVpz3K2p for ; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 560AF1D669 for ; Fri, 4 Oct 2019 02:15:12 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id x942FCEL081109 for ; Fri, 4 Oct 2019 02:15:12 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id x942FCau081104 for bugs@FreeBSD.org; Fri, 4 Oct 2019 02:15:12 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 241048] After r349840, OOM reported when swap space is available. Date: Fri, 04 Oct 2019 02:15:12 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 11.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: rkoberman@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Oct 2019 02:15:12 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D241048 Bug ID: 241048 Summary: After r349840, OOM reported when swap space is available. Product: Base System Version: 11.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: rkoberman@gmail.com After the MFC of base r349840 amd base r349841 to 12-STABLE as base r350374, attempts to start a VirtualBox Windows7 guest would fail when there was mem= ory pressure forcing swapping. Another user running HEAD on an RPi3 with 6 GB of RAM is reporting similar OOM issues, though his case is triggered by buildi= ng www/chromium. It does involve OOM with a lot of swap available and it appea= rs to not occur if r349840 and r349841 are rolled back. Just reverting base r349841 does not resolve the issue. Note that r349840 should do absolutely nothing on systems with less than 16= GB of RAM. This is per the author, markj@. So far he has no explanation for the problem. My system is a Lenovo T520 with a Sandy Bridge processor, 8 GB of RAM and *= GB of swap space evenly spit over two drives. The amount of swap space in use seems irrelevant ss the failure has occurred with over 7 GB of free swap sp= ace. The failure never occurs when the free memory is adequate to start the VM without swapping. I have not looked at the code in VirtualBox to see how it allocates memory,= but I would guess that it uses slab allocation for loading the memory image (4 = GB) of the virtual machine. I suspect that it uses malloc for loading the VB (VirtualBox) code. It looks like the load of the virtual machine's memory w= orks OK, as a minimum of 98% of the load always completes regardless of the amou= nt of swap required without problem. At 98%, the load percentage holds for sev= eral seconds and then errors out. If there is no memory pressure, there is no pa= use at 98%. If the VM is restarted, it succeeds with no pause. An occasional non-fatal error is similar except that the pause may happen at 99% and a non-fatal error that the VM could not be started due to lack of memory and applications should be terminated to free memory. The VM is left= in the paused (greyed out) state, but the system may be immediately "un-paused= "=20 and it runs instantly with no other action. The other user, Bob Prohaske, provided information on his case and agreed t= o my including a link to it in this PR. The files are at http://www.zefox.net/~fbsd/rpi3/swaptests/oberman/ I am not attaching he lo= gs due to their size. They include logs of attempts to build chromium which succeeds with r349839 and fails with r349841. Note that his system is runni= ng HEAD. --=20 You are receiving this mail because: You are the assignee for the bug.=